Print

Print


Hi,

I figured out the best way to setup the Eclipse workspace for a multi-module Maven project such as hps-java or lcsim, which has a top level pom file and many sub-modules.

Follow these steps....

1) Checkout the trunk into your workspace using SVN.  (You can actually use any directory for this, but organizationally it is probably best to use your Eclipse workspace.)

2) In Eclipse, go to File > Import > and then select Maven > Existing Maven Projects from the tree menu.

3) Click Next and then enter the path to the local trunk directory under the Root Directory field.  This will then show all the pom.xml files that were found under the trunk.  You can leave all of these checked, unless you do not want some modules to be imported as projects, in which case uncheck those modules.

4) In the same panel, click "Add projects to working set" and then create an "HPS" working set to which the new projects will be assigned.

5) Finally, click Next once that is all correctly configured, and Eclipse will automatically import all the selected modules into your workspace as projects with the Maven and Java natures.  (These new projects should have all the correct jar libraries assigned to them by this process.)

6) To enable working set commands, go to Window > Customize Perspective and click the boxes for "Window Working Set" and "Working Set Manipulation" under "Command Groups Availability".

After step #6, the working set toolbar should be added to your dock.  There should be an icon (looks like two folders) where you can select the working sets to view e.g. HPS or LCSIM etc.  This will filter the Package Explorer and similar views to only show projects from that working group.  

Configuring m2e to include all the modules within one project is not the preferred way to do this, as all the .classpath and .project files need to be created and managed separately for each module, which requires them to each have a separate Eclipse project, unless you want to manually get into hacking the .classpath files, etc.

Hope that makes sense.  I'll add this to our Confluence doc when I get a chance.

--Jeremy

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1