On 05/01/2008, Stefano Lenzi <[EMAIL PROTECTED]> wrote: > > Hi All, > > I don't know how many of you use the eclipse:m2eclipse withing Felix but > after some tests it seems that the goal has broken since commit 608391, > when most of the pom.xml were start to point to > org.apache.felix:felix:1.0.1 instead of > org.apache.felix:felix:1.1.0-SNAPSHOT as parent pom. > > The problem with the new configuration is that generated .project > containg the following extra tags: > <buildCommand> > <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> > <arguments> > <dictionary> > <key>LaunchConfigHandle</key> > > > <value><project>/.externalToolBuilders/Maven_Ant_Builder.launch</value> > </dictionary> > </arguments> > </buildCommand> > which lead to a non-working Eclipse project :S
looking at the sources for the maven-eclipse-plugin, this entry is added when the project has "special" resource directories (basically when the directory is located above another resource directory, ie. nested resource directories). This requires special handling because Eclipse doesn't like nested resource directories :( hence the external ant script to copy the resources (if this leads to a non-working project then that sounds like a bug with the eclipse plugin) Unfortunately I couldn't figure out how to fix the problem other than > changing the parent pom version back to 1.1.0-SNAPSHOT. the 1.1.0-SNAPSHOT version was before Carsten's change to automatically add LICENSE and NOTICE files to the right part of the jar by specifying a resource with a directory of "." (with the right filter) - as "." is above "src/main/resources" then you'll get this additional build entry. technically this is a limitation of Eclipse, but the eclipse plugin could also help by providing an option to skip this - or at least make sure the generated project still works in Eclipse! in the meantime, a possible workaround would be to put the "." resource entry inside a profile, which is active by default but could be disabled using a property when you want to use the eclipse plugin. however, this is not ideal the other workaround is to manually edit the generated Eclipse files ;) Also I'm wondering if it's correct to set parent pom to non-SNAPSHOT > release for project in SVN repository? why not? - in fact most Maven projects prefer to use non-snapshot dependencies where possible, because it makes the build more reproducible - especially if you want to selectively check out and build parts of the project tree with a clean repo. ( basically depends if the snapshot parent pom is easily available on a snapshot repo, how often it's deployed, and if you need the latest and greatest settings ) but for sub-projects that need stable parent settings, using a snapshot is fine Ciao, > Stefano "Kismet" Lenzi > -- Cheers, Stuart
