Why you do this?
Emmanuel
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 19, 2004 4:13 PM
Subject: cvs commit: maven-plugins/eclipse/xdocs changes.xml
> epugh 2004/10/19 07:13:04
>
> Modified: eclipse plugin.properties plugin.jelly
> eclipse/src/plugin-resources/templates classpath.jelly
> eclipse/src/plugin-test maven.xml
> eclipse/xdocs changes.xml
> Log:
> Turn off the inclusion of pom build resources by default.
>
> Revision Changes Path
> 1.7 +1 -0 maven-plugins/eclipse/plugin.properties
>
> Index: plugin.properties
> ===================================================================
> RCS file: /home/cvs/maven-plugins/eclipse/plugin.properties,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -u -r1.6 -r1.7
> --- plugin.properties 15 Oct 2004 09:45:05 -0000 1.6
> +++ plugin.properties 19 Oct 2004 14:13:04 -0000 1.7
> @@ -26,3 +26,4 @@
> maven.eclipse.goals = plugins
> maven.gen.src=${maven.build.dir}/generated-sources
> maven.eclipse.src.extension = zip
> +maven.eclipse.addResources=false
>
>
>
> 1.30 +1 -1 maven-plugins/eclipse/plugin.jelly
>
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvs/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.29
> retrieving revision 1.30
> diff -u -r1.29 -r1.30
> --- plugin.jelly 15 Oct 2004 18:08:28 -0000 1.29
> +++ plugin.jelly 19 Oct 2004 14:13:04 -0000 1.30
> @@ -31,7 +31,7 @@
> <define:tag name="write-classpath-entry">
> <maven:param-check value="${groupId}" fail="true"
message="'groupId' must be specified"/>
> <maven:param-check value="${artifactId}" fail="true"
message="'artifactId' must be specified"/>
> - <maven:param-check value="${version}" fail="true"
message="'version' must be specified"/>
> + <maven:param-check value="${version}" fail="false"
message="'version' should be specified for artifact
${groupId}.${artifactId}"/>
> <!-- relativePath is optional, used for jar override -->
>
> <j:set var="relativePathCheck" value="${relativePath}X" />
>
>
>
> 1.28 +24 -2
maven-plugins/eclipse/src/plugin-resources/templates/classpath.jelly
>
> Index: classpath.jelly
> ===================================================================
> RCS file:
/home/cvs/maven-plugins/eclipse/src/plugin-resources/templates/classpath.jel
ly,v
> retrieving revision 1.27
> retrieving revision 1.28
> diff -u -r1.27 -r1.28
> --- classpath.jelly 19 Oct 2004 11:55:28 -0000 1.27
> +++ classpath.jelly 19 Oct 2004 14:13:04 -0000 1.28
> @@ -57,14 +57,25 @@
> <classpathentry kind="src" path="${srcDir}"
excluding="${excluding}" />
>
> <j:if test="${!pom.build.resources.isEmpty()}">
> + <!-- Turn off for most users this buggy code-->
> + <j:if test="${maven.eclipse.addResources == 'true'}">
> <j:forEach var="resource" items="${pom.build.resources}">
> + <j:set var="includingAsString" value="" />
> + <j:forEach var="res" items="${resource.includes}">
> + <j:set var="includingAsString"
value="${includingAsString}${res}|" />
> + </j:forEach>
> + <j:set var="excludingAsString" value="" />
> + <j:forEach var="res" items="${resource.excludes}">
> + <j:set var="excludingAsString"
value="${excludingAsString}${res}|" />
> + </j:forEach>
> <maven:makeRelativePath var="resourceDirectory"
basedir="${basedir}" path="${resource.directory}" separator="/"/>
> <!-- don't add duplicate directories -->
> <j:if test="${!resourceDirectory.equals(srcDir)}">
> - <classpathentry kind="src" path="${resourceDirectory}"
including="${include}" excluding="${exclude}" />
> + <classpathentry kind="src" path="${resourceDirectory}"
including="${includingAsString}" excluding="${excludingAsString}" />
> </j:if>
> </j:forEach>
> </j:if>
> + </j:if>
> </j:if>
>
> <!-- Add the list of additional directories for the classpath from
${maven.eclipse.classpath.include}-->
> @@ -127,13 +138,24 @@
>
> <j:if test="${pom.build.unitTest != null}">
> <j:if test="${!pom.build.unitTest.resources.isEmpty()}">
> + <!-- Turn off for most users this buggy code-->
> + <j:if test="${maven.eclipse.addResources == 'true'}">
> <j:forEach var="resource"
items="${pom.build.unitTest.resources}">
> + <j:set var="includingAsString" value="" />
> + <j:forEach var="res" items="${resource.includes}">
> + <j:set var="includingAsString"
value="${includingAsString}${res}|" />
> + </j:forEach>
> + <j:set var="excludingAsString" value="" />
> + <j:forEach var="res" items="${resource.excludes}">
> + <j:set var="excludingAsString"
value="${excludingAsString}${res}|" />
> + </j:forEach>
> <maven:makeRelativePath var="resourceDirectory"
basedir="${basedir}" path="${resource.directory}" separator="/"/>
> <!-- don't add duplicate directories -->
> <j:if test="${!resourceDirectory.equals(testSrcDir)}">
> - <classpathentry kind="src" path="${resourceDirectory}"
output="${testOutputDir}" />
> + <classpathentry kind="src" path="${resourceDirectory}"
output="${testOutputDir}" including="${includingAsString}"
excluding="${excludingAsString}"/>
> </j:if>
> </j:forEach>
> + </j:if>
> </j:if>
> </j:if>
> </j:if>
>
>
>
> 1.16 +18 -2 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.15
> retrieving revision 1.16
> diff -u -r1.15 -r1.16
> --- maven.xml 19 Oct 2004 11:55:28 -0000 1.15
> +++ maven.xml 19 Oct 2004 14:13:04 -0000 1.16
> @@ -20,7 +20,7 @@
> xmlns:u="jelly:util"
> xmlns:x="jelly:xml">
>
> - <goal name="testPlugin"
prereqs="test-eclipse,test-natures,test-builders,test-natures-and-builders,t
est-classpath-has-generated-source,test-classpath-has-overridden-jar,test-no
duplicates,test-classpath-con-entry">
> + <goal name="testPlugin"
prereqs="test-eclipse,test-natures,test-builders,test-natures-and-builders,t
est-classpath-has-generated-source,test-classpath-has-overridden-jar,test-no
duplicates,test-classpath-con-entry,test-maven-eclipse-addResources">
> </goal>
>
> <goal name="test-init">
> @@ -111,7 +111,7 @@
> <u:file var="classpathFile" name="${dotClasspath}"/>
> <x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
> <x:set var="count"
select="count($classpathDoc/classpath/classpathentry[contains(@kind,'src')])
"/>
> - <assert:assertEquals expected="6"
value="${count.intValue().toString()}" msg="Wrong number of generated src
directories found"/>
> + <assert:assertEquals expected="4"
value="${count.intValue().toString()}" msg="Wrong number of generated src
directories found"/>
>
> </goal>
>
> @@ -153,6 +153,22 @@
> <x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
> <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-maven-eclipse-addResources">
> + <attainGoal name="test-init"/>
> + <!-- Not working! ARgh-->
> + <j:set var="maven.eclipse.addResources" value="true"/>
> + <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(@kind,'src')])
"/>
> + <assert:assertEquals expected="4"
value="${count.intValue().toString()}" msg="Wrong number of generated src
directories found"/>
> +
> </goal>
>
> </project>
>
>
>
> 1.35 +2 -0 maven-plugins/eclipse/xdocs/changes.xml
>
> Index: changes.xml
> ===================================================================
> RCS file: /home/cvs/maven-plugins/eclipse/xdocs/changes.xml,v
> retrieving revision 1.34
> retrieving revision 1.35
> diff -u -r1.34 -r1.35
> --- changes.xml 19 Oct 2004 11:55:28 -0000 1.34
> +++ changes.xml 19 Oct 2004 14:13:04 -0000 1.35
> @@ -25,6 +25,8 @@
> </properties>
> <body>
> <release version="1.9" date="in cvs">
> + <action dev="epugh" type="add">add property
maven.eclipse.addResources=false to prevent the build resources from
breaking old Eclipse builds.</action>
> + <action dev="epugh" type="add">Allow includes/excludes in build
resources to be used in the classpath generation.</action>
> <action dev="epugh" type="add" issue="MPECLIPSE-50" due-to="Simon
Ringuette">Support for Eclipse-Plugin maven projects (or kind="con"
classpath).</action>
> <action dev="epugh" type="fix" issue="MPECLIPSE-49"
due-to="Fabrizio Giustina">duplicate build path added if resouce directory
is the same as java source dir.</action>
> <action dev="epugh" type="fix" issue="MPECLIPSE-48"
due-to="Fabrizio Giustina">Simple implementation of handling source
artifacts.</action>
>
>
>
>
> ---------------------------------------------------------------------
> 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]