You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ca...@apache.org on 2005/06/15 17:22:58 UTC
svn commit: r190759 - in /maven/maven-1/plugins/trunk/eclipse:
src/plugin-resources/templates/classpath.jelly xdocs/changes.xml
Author: carlos
Date: Wed Jun 15 08:22:57 2005
New Revision: 190759
URL: http://svn.apache.org/viewcvs?rev=190759&view=rev
Log:
Moved test classpath before main so test classpath resources override main ones
Modified:
maven/maven-1/plugins/trunk/eclipse/src/plugin-resources/templates/classpath.jelly
maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml
Modified: maven/maven-1/plugins/trunk/eclipse/src/plugin-resources/templates/classpath.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/eclipse/src/plugin-resources/templates/classpath.jelly?rev=190759&r1=190758&r2=190759&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/eclipse/src/plugin-resources/templates/classpath.jelly (original)
+++ maven/maven-1/plugins/trunk/eclipse/src/plugin-resources/templates/classpath.jelly Wed Jun 15 08:22:57 2005
@@ -27,67 +27,12 @@
trim="true">
<classpath>
- <!-- Add any generated source directories as seperate src directories -->
- <u:available file="${maven.gen.src}">
- <u:file var="genSrcRootDir" name="${maven.gen.src}"/>
- <j:forEach var="genSrcDir" items="${genSrcRootDir.listFiles()}">
- <maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${genSrcDir}" separator="/"/>
- <classpathentry kind="src" path="${srcDir}"/>
- </j:forEach>
- </u:available>
<j:if test="${unitTestSourcesPresent}">
<ant:echo>Contains JUnit tests</ant:echo>
<maven:makeRelativePath var="testSrcDir" basedir="${basedir}" path="${pom.build.unitTestSourceDirectory}" separator="/"/>
</j:if>
- <j:if test="${sourcesPresent}">
- <maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${pom.build.sourceDirectory}" separator="/"/>
- <j:set var="excluding" value=""/>
- <j:forEach var="sm" items="${pom.build.sourceModifications}">
- <ant:available property="classPresent" classname="${sm.className}"/>
- <j:if test="${classPresent != 'true'}">
- <j:forEach var="exclude" items="${sm.excludes}">
- <j:choose>
- <j:when test="${excluding.length() == 0}">
- <j:set var="excluding" value="${exclude}"/>
- </j:when>
- <j:otherwise>
- <j:set var="excluding" value="${excluding},${exclude}"/>
- </j:otherwise>
- </j:choose>
- </j:forEach>
- </j:if>
- </j:forEach>
- <classpathentry kind="src" path="${srcDir}" excluding="${excluding}" />
- <j:if test="${maven.eclipse.resources.addtoclasspath}">
- <j:if test="${!pom.build.resources.isEmpty()}">
- <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) and (!resourceDirectory.equals(testSrcDir) or !unitTestSourcesPresent)}">
- <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}-->
- <u:tokenize var="maven.eclipse.classpath.include.split" delim=",">${maven.eclipse.classpath.include}</u:tokenize>
- <!-- add extra directories to be included in the classpath -->
- <j:forEach var="res" items="${maven.eclipse.classpath.include.split}">
- <maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${res}" separator="/"/>
- <classpathentry kind="src" path="${srcDir}"/>
- </j:forEach>
<!-- set a flag so JUnit jar is included only once -->
<j:set var="ignoreJUnit" value="false" />
<j:if test="${unitTestSourcesPresent}">
@@ -158,6 +103,64 @@
</j:if>
</j:if>
</j:if>
+
+ <!-- Add any generated source directories as seperate src directories -->
+ <u:available file="${maven.gen.src}">
+ <u:file var="genSrcRootDir" name="${maven.gen.src}"/>
+ <j:forEach var="genSrcDir" items="${genSrcRootDir.listFiles()}">
+ <maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${genSrcDir}" separator="/"/>
+ <classpathentry kind="src" path="${srcDir}"/>
+ </j:forEach>
+ </u:available>
+
+ <j:if test="${sourcesPresent}">
+ <maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${pom.build.sourceDirectory}" separator="/"/>
+ <j:set var="excluding" value=""/>
+ <j:forEach var="sm" items="${pom.build.sourceModifications}">
+ <ant:available property="classPresent" classname="${sm.className}"/>
+ <j:if test="${classPresent != 'true'}">
+ <j:forEach var="exclude" items="${sm.excludes}">
+ <j:choose>
+ <j:when test="${excluding.length() == 0}">
+ <j:set var="excluding" value="${exclude}"/>
+ </j:when>
+ <j:otherwise>
+ <j:set var="excluding" value="${excluding},${exclude}"/>
+ </j:otherwise>
+ </j:choose>
+ </j:forEach>
+ </j:if>
+ </j:forEach>
+ <classpathentry kind="src" path="${srcDir}" excluding="${excluding}" />
+ <j:if test="${maven.eclipse.resources.addtoclasspath}">
+ <j:if test="${!pom.build.resources.isEmpty()}">
+ <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) and (!resourceDirectory.equals(testSrcDir) or !unitTestSourcesPresent)}">
+ <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}-->
+ <u:tokenize var="maven.eclipse.classpath.include.split" delim=",">${maven.eclipse.classpath.include}</u:tokenize>
+
+ <!-- add extra directories to be included in the classpath -->
+ <j:forEach var="res" items="${maven.eclipse.classpath.include.split}">
+ <maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${res}" separator="/"/>
+ <classpathentry kind="src" path="${srcDir}"/>
+ </j:forEach>
<maven:get var="cactusSrcDir" plugin='cactus-maven' property='cactus.src.dir' />
<u:available file="${cactusSrcDir}">
Modified: maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml?rev=190759&r1=190758&r2=190759&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml Wed Jun 15 08:22:57 2005
@@ -25,6 +25,7 @@
</properties>
<body>
<release version="1.10" date="IN CVS">
+ <action dev="carlos" type="fix">Moved test classpath before main so test classpath resources override main ones</action>
<action dev="epugh" type="fix" issue="MPECLIPSE-68">eclipse:add-maven-repo doesn't update correct Eclipse property file for Eclipse 3.x</action>
<action dev="epugh" type="fix" issue="MPECLIPSE-67">add-maven-repo fails if Eclipse hasn't been started yet. Property file needs to be created
by the plugin.</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org