Importing Projects

This section provides procedures on importing a Visual Studio project using Generate Solution's POM Information... feature.
This feature will generate <<<pom.xml>>> files from an existing Visual Studio solution file. The generated <<<pom.xml>>>
file will contain the latest versions of the artifact dependencies used for the project.

1 Right click on the project and select the Generate Solution's POM Information...

2 In the pop-up screen, Browse to the directory location of the parent solution file to use. Group Id is generated by default with the format of <<<(companyid).(solutionname)>>>.

3 Click Generate Solution's POM Information.

Underscores and spaces in artifact's groupId are automatically deleted when added to the project's <<<pom.xml>>>.
The table below shows the conversion of certain values of groupIds.

<<Artifact Group Id>> ==> <<Converted Group Id>> |
The.Project ==> The.Project
the.project ==> the.project
the project ==> TheProject
the_project ==> TheProject

4 From the Project Units Tests window, select the test modules to be used for the project and click OK.

<<<pom.xml>>> files will be generated for all the projects that are included in the solution file: the parent project and its sub-projects,
if there are any.

For projects with web references, the <<<pom.xml>>> generated will contain <<<maven-wsdl-plugin>>> configuration similar to the following:

<path>Web References/AnotherWebService/AnotherWS.wsdl</path>
<output>Web References/AnotherWebService/</output>

The wsdl goal is the one responsible for building and creating webservice proxy classes. And, all the web references used in the project
are listed inside the <<< \<webreferences\> >>> tag. For more instructions on adding, renaming, and deleting web references,
refer to {references.html} Web References section of this document.

  • Importing Projects with Resource File

If the project you are importing includes a resource file, the <<<maven-resgen>>> plugin is added to <<<pom.xml>>> during import.

In the plugin's configuration, you can find the list of resource (<<<resx>>>) files with corresponding names.
By default, <<<RootNamespace>>> is the assembly name and <<<RootNamespace.Filename>>> is the filename of the <<<resx>>> files.
To ensure that the plugin works, the following are required:
  • The classname and the filename of the item that contains the resx files must have the same name. Example:

<<<"public class frmMaestroName" = frmMaestroName.resx = frmMaestroName.cs>>>

<<Note>>: Changing the codefile(.cs/.vb) automatically updates the resource(resx) file. In some instances, however, this does not hold true.
  • The namespace of the project should be equal to the DefaultNamespace of the project assembly. To check the default name,
  • Right-click on the project and select Properties. This displays a project property window.
  • Select the Application tab.
  • In the DefaultNamespace field, you will find <<<RootNamespace>>>.

Once the above requirements are met, the importer automatically does the work and there is no need to edit <<<pom.xml>>>.

Removing the configuration part of the <<<maven-resgen>>> plugin allows the plugin to locate all the resx files and compile them
as <<<ArtifactId.Filename>>>. If you set the namespace as the artifactId, you do not need to list all the resx files in the <<<pom.xml>>>.

<<Note>>: This feature does not support cultured esx files such as <<<eu-US>>>, <<<it>>>, <<<jp>>>, <<<de>>>, <<<eu-UK>>>, and even custom culture.

Last edited Mar 6, 2009 at 6:56 AM by jocaba, version 2


No comments yet.