[ http://jira.codehaus.org/browse/MECLIPSE-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_87185 ]
Martin Onis commented on MECLIPSE-78: ------------------------------------- Rob, My original root pom looked something like this: ... <modules> <module>Commons</module> <module>Server</module> </modules> ... <build> ... </plugins> ... <plugin> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <downloadSources>true</downloadSources> <!-- TODO: De Maven plugin blijkt niet meer in alle gevallen te werken, wacht daarom op de versie na 0.0.9, en hoop dat het dan opgelost is. Tot die tijd kunnen in de probleem projecten de M2_REPO variabelen in de .classpath bestanden blijven staan. --> <!-- Project namen moeten aangepast worden om duplicaten in Eclipse te voorkomen. --> <!-- M2_REPO variabelen moeten uit de .classpath bestanden verwijderd worden om dubbele referenties te voorkomen. --> <buildcommands> <java.lang.String>org.maven.ide.eclipse.maven2Builder</java.lang.String> <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String> </buildcommands> <classpathContainers> <java.lang.String>org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER</java.lang.String> <java.lang.String>org.eclipse.jdt.launching.JRE_CONTAINER</java.lang.String> </classpathContainers> <projectnatures> <java.lang.String>org.maven.ide.eclipse.maven2Nature</java.lang.String> <java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String> </projectnatures> </configuration> </plugin> </plugins> </build> ... My current root pom is something like this: ... <modules> <module>Commons</module> <module>Server</module> </modules> ... <build> ... </plugins> ... <plugin> <artifactId>maven-eclipse-plugin</artifactId> <version>2.3-patch</version> <!-- Gebruik de gepatchte versie in afwachting van http://63.246.20.114/browse/MECLIPSE-78 --> <configuration> <m2eclipse>true</m2eclipse> <downloadSources>true</downloadSources> </configuration> </plugin> </plugins> </build> ... As you can see I have removed the classPathContainer (used to be necessary). I refer to the patched plugin (obviously). The plugin is only configured in the root pom. Sub-poms refer to their respective parents (by coordinates and relativePath). The first level that contains an actual project is 2 levels deep (a sub-sub-pom if you will). I call maven through a batch file which in turn will issue the following command: mvn -D"stream.version=ap-JBoss4_Int" -D"stream.name=ap-JBoss4_Int" -D"view.name=Martin_ap-JBoss4_int" -D"view.dir=D:\cc\Martin_ap-JBoss4_int" eclipse:eclipse If you cannot reproduce this behaviour, then I probably patched the plugin incorrectly. The only patch I've applied was MECLIPSE-78-tag-2.3-rev2.patch. If this was unsufficient then I'm sorry to have waisted your time. L8r, MO > create eclipse projects which are m2eclipse ready > ------------------------------------------------- > > Key: MECLIPSE-78 > URL: http://jira.codehaus.org/browse/MECLIPSE-78 > Project: Maven 2.x Eclipse Plugin > Issue Type: New Feature > Environment: Fedora Core 3, Sun JDK 1.5.0.06, Eclipse 3.1.1, Maven > 2.0.2 > Reporter: Joshua Nichols > Attachments: m2eclipse-add-repo-tag-2.3.patch, > m2eclipse-add-repo.patch, m2eclipse.patch, m2eclipse.patch, m2eclipse.patch, > m2eclipse.patch, MECLIPSE-78-tag-2.3-rev2.patch, MECLIPSE-78-tag-2.3.patch, > MECLIPSE-78.patch > > > WIth the recent development of the m2eclipse plugin, I believe it is useful > to create eclipse projects via mvn eclipse:eclipse that use m2eclipse from > the start. One of the advantages of using m2eclipse is that you don't have to > rerun eclipse:eclipse when you update any dependencies. > A few things are necessary to accomplish this, in terms of changes to > .classpath and .project. > .project needs a new nature and builder added. For the builder: > <buildCommand> > <name>org.maven.ide.eclipse.maven2Builder</name> > <arguments/> > </buildCommand> > For the nature: > <nature>org.maven.ide.eclipse.maven2Nature</nature> > In the .classpath, we need to add: > <classpathentry kind="con" > path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> > In .classpath, you also don't want entries <classpathentry kind="var" > path="M2_REPO/blah/blah/x.y.z/blah-x.y.z.jar"/>, because they would conflict > with m2eclipse setting up the classpath. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira