added maven.eclipse.resources.addtoclasspath switch to provide backwards compatibilty

with older project structures using the plugin.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116186 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
epugh committed 2004-10-26 07:57:06 +00:00
1 parent e87957e80a
commit 0046ae6bab
6 files changed
+64 -33

No files matched your search

+18 -1
View File
@@ -21,7 +21,7 @@
xmlns:maven="jelly:maven"
xmlns:x="jelly:xml">
<goal name="testPlugin" prereqs="test-eclipse,test-natures,test-builders,test-natures-and-builders,test-classpath-has-generated-source,test-classpath-has-overridden-jar,test-noduplicates,test-classpath-con-entry">
<goal name="testPlugin" prereqs="test-eclipse,test-natures,test-builders,test-natures-and-builders,test-classpath-has-generated-source,test-classpath-has-overridden-jar,test-noduplicates,test-classpath-con-entry,test-classpath-no-resources">
</goal>
<goal name="test-init">
@@ -169,5 +169,22 @@
<x:set var="countConEntries" select="count($classpathDoc/classpath/classpathentry[contains(@kind,'con')])"/>
<assert:assertEquals expected="2" value="${countConEntries.intValue().toString()}" msg="Classpath entry kind='con' should be added twice, once mandatory, other variable"/>
</goal>
<goal name="test-classpath-no-resources">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.resources.addtoclasspath" value="false"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotProject}" />
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'src/resources')])"/>
<assert:assertEquals expected="0" value="${count.intValue().toString()}" msg="The src/resources dir should not be imported"/>
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'src/test-resources')])"/>
<assert:assertEquals expected="0" value="${count.intValue().toString()}" msg="The src/test-resources dir should not be imported"/>
</goal>
</project>
@@ -1,3 +1,4 @@
cactus.src.dir=${basedir}/src/cactus-test
maven.jar.override=on
maven.jar.commons-dude=${maven.repo.local}/commons-logging/jars/commons-logging-1.0.3.jar
maven.eclipse.resources.addtoclasspath=true