epugh 2003/07/08 01:18:42
Modified: src/plugins-build/eclipse/xdocs changes.xml
src/plugins-build/eclipse plugin.jelly
Log:
Added ability for maven eclipse goal to add cactus tests to classpath if they exist.
Revision Changes Path
1.5 +3 -0 maven/src/plugins-build/eclipse/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/eclipse/xdocs/changes.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- changes.xml 30 Jun 2003 05:56:07 -0000 1.4
+++ changes.xml 8 Jul 2003 08:18:41 -0000 1.5
@@ -7,6 +7,9 @@
<body>
<release version="1.4" date="In CVS">
+ <action dev="epugh" type="add">
+ Added support for referencing cactus tests in classpath.
+ </action>
<action dev="dion" type="add">
Added support for Eclipse 2.1 external tools
</action>
1.21 +36 -13 maven/src/plugins-build/eclipse/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/eclipse/plugin.jelly,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- plugin.jelly 4 Jul 2003 00:04:14 -0000 1.20
+++ plugin.jelly 8 Jul 2003 08:18:41 -0000 1.21
@@ -4,9 +4,11 @@
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:test="test"
+ xmlns:cactus="cactus"
xmlns:util="jelly:util">
<test:dependency-handle/>
+ <cactus:dependency-handle/>
<!--==================================================================-->
<!-- Generate Eclipse .project and .classpath files -->
@@ -75,7 +77,7 @@
</j:if>
<j:if test="${unitTestSourcesPresent}">
- <ant:echo>Test!</ant:echo>
+ <ant:echo>Contains JUnit Tests!</ant:echo>
<j:set var="testSrcDir" value="${pom.build.unitTestSourceDirectory}"/>
<j:if test="${ testSrcDir.startsWith( basedir ) }">
<ant:echo>Cutting off basedir from testSourceDirectory</ant:echo>
@@ -94,22 +96,43 @@
<j:set
var="depVersion">${pom.getPluginContext('maven-test-plugin').getVariable('plugin').getDependency('junit').getVersion()}</j:set>
- <j:if test="${pom.getDependency('junit') != null}">
- <j:set var="depVersion"
value="${pom.getDependency('junit').getVersion()}"/>
- </j:if>
+ <j:if test="${pom.getDependency('junit') != null}">
+ <j:set var="depVersion"
value="${pom.getDependency('junit').getVersion()}"/>
+ </j:if>
- <j:if test="${verX != 'X'}">
- <j:set var="depVersion">${maven.eclipse.junit}</j:set>
- </j:if>
+ <j:if test="${verX != 'X'}">
+ <j:set var="depVersion">${maven.eclipse.junit}</j:set>
+ </j:if>
- <j:if test="${verX == 'noneX'}">
- <j:set var="depVersion" value="none"/>
- </j:if>
+ <j:if test="${verX == 'noneX'}">
+ <j:set var="depVersion" value="none"/>
+ </j:if>
- <j:if test="${depVersion != 'none'}">
- <classpathentry kind="var"
path="MAVEN_REPO/junit/jars/junit-${depVersion}.jar"/>
+ <j:if test="${depVersion != 'none'}">
+ <classpathentry kind="var"
path="MAVEN_REPO/junit/jars/junit-${depVersion}.jar"/>
+ </j:if>
+ </j:if>
+
+ <j:set var="cactusSrcDir"
+
value="${pom.getPluginContext('maven-cactus-plugin').getVariable('cactus.src.dir')}"/>
+ <util:available file="${cactusSrcDir}">
+ <j:set var="cactusSourcePresent" value="true"/>
+ </util:available>
+
+ <j:if test="${cactusSourcePresent == 'true'}">
+ <ant:echo>Contains Cactus Tests!</ant:echo>
+ <j:set var="testSrcDir" value="${cactusSrcDir}"/>
+ <j:if test="${ testSrcDir.startsWith( basedir ) }">
+ <ant:echo>Cutting off basedir from Cactus source directory</ant:echo>
+ <j:set var="testSrcDir"
value="${testSrcDir.substring(basedir.length())}"/>
+ <!-- cut off also slash or backslash -->
+ <j:set var="testSrcDir" value="${testSrcDir.substring(1)}"/>
+ </j:if>
+ <classpathentry kind="src" path="${testSrcDir}"/>
+
+ <j:set
var="depVersion">${pom.getPluginContext('maven-cactus-plugin').getVariable('plugin').getDependency('cactus').getVersion()}</j:set>
+ <classpathentry kind="var"
path="MAVEN_REPO/cactus/jars/cactus-${depVersion}.jar"/>
</j:if>
- </j:if>
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT"
sourcepath="JRE_SRC"/>
<j:forEach var="lib" items="${pom.artifacts}">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]