Added ability for maven eclipse goal to add cactus tests to classpath if they exist.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b42326c0cb
commit
04da231ad9
@ -4,9 +4,11 @@
|
|||||||
xmlns:j="jelly:core"
|
xmlns:j="jelly:core"
|
||||||
xmlns:ant="jelly:ant"
|
xmlns:ant="jelly:ant"
|
||||||
xmlns:test="test"
|
xmlns:test="test"
|
||||||
|
xmlns:cactus="cactus"
|
||||||
xmlns:util="jelly:util">
|
xmlns:util="jelly:util">
|
||||||
|
|
||||||
<test:dependency-handle/>
|
<test:dependency-handle/>
|
||||||
|
<cactus:dependency-handle/>
|
||||||
|
|
||||||
<!--==================================================================-->
|
<!--==================================================================-->
|
||||||
<!-- Generate Eclipse .project and .classpath files -->
|
<!-- Generate Eclipse .project and .classpath files -->
|
||||||
@ -75,7 +77,7 @@
|
|||||||
</j:if>
|
</j:if>
|
||||||
|
|
||||||
<j:if test="${unitTestSourcesPresent}">
|
<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:set var="testSrcDir" value="${pom.build.unitTestSourceDirectory}"/>
|
||||||
<j:if test="${ testSrcDir.startsWith( basedir ) }">
|
<j:if test="${ testSrcDir.startsWith( basedir ) }">
|
||||||
<ant:echo>Cutting off basedir from testSourceDirectory</ant:echo>
|
<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:set var="depVersion">${pom.getPluginContext('maven-test-plugin').getVariable('plugin').getDependency('junit').getVersion()}</j:set>
|
||||||
|
|
||||||
<j:if test="${pom.getDependency('junit') != null}">
|
<j:if test="${pom.getDependency('junit') != null}">
|
||||||
<j:set var="depVersion" value="${pom.getDependency('junit').getVersion()}"/>
|
<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 == '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>
|
||||||
</j:if>
|
</j:if>
|
||||||
|
|
||||||
<j:if test="${verX != 'X'}">
|
<j:set var="cactusSrcDir"
|
||||||
<j:set var="depVersion">${maven.eclipse.junit}</j:set>
|
value="${pom.getPluginContext('maven-cactus-plugin').getVariable('cactus.src.dir')}"/>
|
||||||
</j:if>
|
<util:available file="${cactusSrcDir}">
|
||||||
|
<j:set var="cactusSourcePresent" value="true"/>
|
||||||
|
</util:available>
|
||||||
|
|
||||||
<j:if test="${verX == 'noneX'}">
|
<j:if test="${cactusSourcePresent == 'true'}">
|
||||||
<j:set var="depVersion" value="none"/>
|
<ant:echo>Contains Cactus Tests!</ant:echo>
|
||||||
</j:if>
|
<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:if test="${depVersion != 'none'}">
|
<j:set var="depVersion">${pom.getPluginContext('maven-cactus-plugin').getVariable('plugin').getDependency('cactus').getVersion()}</j:set>
|
||||||
<classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-${depVersion}.jar"/>
|
<classpathentry kind="var" path="MAVEN_REPO/cactus/jars/cactus-${depVersion}.jar"/>
|
||||||
</j:if>
|
</j:if>
|
||||||
</j:if>
|
|
||||||
|
|
||||||
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
|
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
|
||||||
<j:forEach var="lib" items="${pom.artifacts}">
|
<j:forEach var="lib" items="${pom.artifacts}">
|
||||||
|
|||||||
@ -7,6 +7,9 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<release version="1.4" date="In CVS">
|
<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">
|
<action dev="dion" type="add">
|
||||||
Added support for Eclipse 2.1 external tools
|
Added support for Eclipse 2.1 external tools
|
||||||
</action>
|
</action>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user