epugh 2004/08/09 08:01:39 Modified: eclipse plugin.jelly eclipse/xdocs goals.xml changes.xml eclipse/src/plugin-test maven.xml Log: add eclipse:clean goal. Use in unit tests! Revision Changes Path 1.28 +14 -0 maven-plugins/eclipse/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /home/cvs/maven-plugins/eclipse/plugin.jelly,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- plugin.jelly 6 Jul 2004 12:37:17 -0000 1.27 +++ plugin.jelly 9 Aug 2004 15:01:39 -0000 1.28 @@ -224,5 +224,19 @@ <j:otherwise>The property $${maven.eclipse.workspace} was not set. MAVEN_REPO may not be set.</j:otherwise> </j:choose> </goal> + + <!--==================================================================--> + <!-- Clean up eclipse generated files --> + <!--==================================================================--> + <goal name="eclipse:clean" + description="Clean eclipse generated files"> + <j:set var="projectFileName" value="${basedir}/.project"/> + <j:set var="classpathFileName" value="${basedir}/.classpath"/> + + <ant:delete file="${projectFileName}"/> + <ant:delete file="${classpathFileName}"/> + + <ant:echo>Cleaned up eclipse generated files</ant:echo> + </goal> </project> 1.6 +7 -0 maven-plugins/eclipse/xdocs/goals.xml Index: goals.xml =================================================================== RCS file: /home/cvs/maven-plugins/eclipse/xdocs/goals.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- goals.xml 4 Mar 2004 18:04:37 -0000 1.5 +++ goals.xml 9 Aug 2004 15:01:39 -0000 1.6 @@ -34,6 +34,13 @@ <a href="#eclipse:generate-classpath">eclipse:generate-classpath</a> goals. </description> </goal> + + <goal> + <name>eclipse:clean</name> + <description> + Deletes the <code>.project</code> and <code>.classpath</code> files. + </description> + </goal> <goal> <name>eclipse:generate-project</name> 1.25 +1 -0 maven-plugins/eclipse/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/maven-plugins/eclipse/xdocs/changes.xml,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- changes.xml 9 Aug 2004 14:28:15 -0000 1.24 +++ changes.xml 9 Aug 2004 15:01:39 -0000 1.25 @@ -25,6 +25,7 @@ </properties> <body> <release version="1.8" date="In CVS"> + <action dev="epugh" type="add" issue="MPECLIPSE-27" due-to="Kristopher Brown">Add eclipse:clean goal.</action> <action dev="epugh" type="fix" issue="MPECLIPSE-36" due-to="Felipe Leme">Fixed a 'race condition' where JUnit dependency is not added to .classpath.</action> <action dev="epugh" type="add">Add maven.gen.src property that points to a directory whose subdirectories are included as separate source directories.</action> <action dev="epugh" type="add" issue="MPECLIPSE-10" due-to="Thierry Lack">Set eclipse.dependency=false to explicity ignore dependencies in classpath generation</action> 1.9 +13 -14 maven-plugins/eclipse/src/plugin-test/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/maven-plugins/eclipse/src/plugin-test/maven.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- maven.xml 9 Aug 2004 14:31:13 -0000 1.8 +++ maven.xml 9 Aug 2004 15:01:39 -0000 1.9 @@ -20,17 +20,17 @@ xmlns:u="jelly:util" xmlns:x="jelly:xml"> - <goal name="testPlugin" prereqs="test-init,test-eclipse,test-natures,test-builders,test-natures-and-builders,test-classpath-has-generated-source"> + <goal name="testPlugin" prereqs="test-eclipse,test-natures,test-builders,test-natures-and-builders,test-classpath-has-generated-source"> </goal> <goal name="test-init"> <j:set var="dotProject" value="${basedir}/.project"/> <j:set var="dotClasspath" value="${basedir}/.classpath"/> + <attainGoal name="eclipse:clean"/> </goal> - <goal name="test-eclipse" prereqs="test-init"> - <delete file="${dotProject}" failonerror="false"/> - <delete file="${dotClasspath}" failonerror="false"/> + <goal name="test-eclipse"> + <attainGoal name="test-init"/> <attainGoal name="eclipse"/> <assert:assertFileExists file="${dotProject}" /> @@ -43,8 +43,8 @@ </goal> - <goal name="test-natures" prereqs="test-init"> - <delete file="${dotProject}" failonerror="false"/> + <goal name="test-natures"> + <attainGoal name="test-init"/> <j:set var="maven.eclipse.projectnatures" value="n1,a.b.c.n2"/> <attainGoal name="eclipse:generate-project"/> @@ -57,9 +57,10 @@ <assert:assertEquals expected="a.b.c.n2" value="${natures[2].text}" msg="a.b.c.n2 is not the third nature"/> </goal> - <goal name="test-builders" prereqs="test-init"> + <goal name="test-builders"> + <attainGoal name="test-init"/> <j:set var="maven.eclipse.buildcommands" value="c1,c2,c3"/> - <delete file="${dotProject}" failonerror="false"/> + <attainGoal name="eclipse:generate-project"/> <assert:assertFileExists file="${dotProject}" /> @@ -73,8 +74,8 @@ </goal> - <goal name="test-natures-and-builders" prereqs="test-init"> - <delete file="${dotProject}" failonerror="false"/> + <goal name="test-natures-and-builders"> + <attainGoal name="test-init"/> <j:set var="maven.eclipse.projectnatures" value="n7,n9,n11"/> <j:set var="maven.eclipse.buildcommands" value="c11,c21,c31"/> <attainGoal name="eclipse:generate-project"/> @@ -96,9 +97,8 @@ <assert:assertEquals expected="c31" value="${builders[3].text}" msg="c31 is not the second build command name"/> </goal> - <goal name="test-classpath-has-generated-source" prereqs="test-init"> - <delete file="${dotProject}" failonerror="false"/> - <delete file="${dotClasspath}" failonerror="false"/> + <goal name="test-classpath-has-generated-source"> + <attainGoal name="test-init"/> <mkdir dir="${maven.gen.src}/gensrc1"/> <mkdir dir="${maven.gen.src}/gensrc2"/> <attainGoal name="eclipse"/> @@ -108,7 +108,6 @@ <u:file var="classpathFile" name="${dotClasspath}"/> <x:parse var="classpathDoc" xml="${classpathFile.toURL()}" /> - <!-- FIXME. This should filter where kind="src" --> <x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@kind,'src')])"/> <assert:assertEquals expected="2" value="${count.intValue().toString()}"/>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]