Personnally, I think that duplicate resource declaration is a bad conception of directory structure. It isn't readable, and it's necessary to check the pom for know which file go to which directory.
I'm -0 for rework the plugin for accept this bad conception. Emmanuel ----- Original Message ----- From: "Eric Pugh" <[EMAIL PROTECTED]> To: "Maven-Dev" <[EMAIL PROTECTED]> Sent: Tuesday, October 19, 2004 4:48 PM Subject: [eclipse] Need to rethink using pom.build.resources in .classpath for Eclipse Plugin > Hi all, > > A while ago some patches where made that allowed the <resources/> elements > to be added to the Eclipse .classpath. This looked good, and I committed > it. However, as I have gone on with more testing, I think this needs to be > reworked. > > What happens is right now the resources for the regular java files and in > the <unitTest> section are duplicated... This can lead to a situation where > you import the same path twice. For example, in the below (trimmed) > section, I want to copy some resources always, and a log4j.properties when > running unit tests: > > <build> > <unitTest> > <resources> > <resource> > <directory>src/conf</directory> > <targetPath>/</targetPath> > <includes> > <include>test.avalonconf.xml</include> > </includes> > <filtering>false</filtering> > </resource> > <resource> > <includes> > <include>log4j.properties</include> > </includes> > <filtering>false</filtering> > </resource> > </resources> > </unitTest> > <resources> > <resource> > <directory>src/conf</directory> > <targetPath>/</targetPath> > <includes> > <include>hibernate.hbm.xml</include> > <include>ehcache.xml</include> > </includes> > <filtering>false</filtering> > </resource> > </resources> > </build> > > However, because they both go from src/conf to /, this causes two records to > be created in Eclipse. I think, what needs to done is that a map of all the > possible sources needs to be made, and then we aggreagate together all the > changes. However, this is a pretty big change, and I've not got the time > for it right now, but I'll be happy to help. > > Also, we where not properly dealing with includes and excludes either.. I > added that. > > Because this change can break things, I've added an extra check. If > maven.eclipse.addResources=true in your project.properties, then the > existing logic will occur. By default this is turned off so we don't start > breaking everybodies builds. > > Eric Pugh > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]