bwalding 2003/07/27 15:51:52
Modified: src/plugins-build/eclipse plugin.jelly
Log:
Update the .classpath output such that it utilises the per source directory
output path.
At the moment,
source dir -> default output path (i.e. unset)
test dir -> test output path (eg. target/test-classes)
default output path -> (eg. target/classes).
There could be some argument to go to a system like
source dir -> output path (eg. target/classes).
test dir -> test output path (eg. target/test-classes)
default output path -> (eg. target/classes).
But it'd make the plugin.jelly a bit more complicated than it already is.
I'm very tempted to extract the code out into a separate jelly file and let it follow
the xdoc/navigation.jelly pattern.
This also fixes the "missing target/test-classes" errors that eclipse was giving.
Revision Changes Path
1.22 +22 -20 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.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- plugin.jelly 8 Jul 2003 08:18:41 -0000 1.21
+++ plugin.jelly 27 Jul 2003 22:51:52 -0000 1.22
@@ -85,7 +85,28 @@
<!-- cut off also slash or backslash -->
<j:set var="testSrcDir" value="${testSrcDir.substring(1)}"/>
</j:if>
- <classpathentry kind="src" path="${testSrcDir}"/>
+
+ <!-- Eclipse supports an output directory per input directory -->
+ <j:set var="testOutputDir" value="${maven.eclipse.test.output.dir}"/>
+ <j:if test="${empty testOutputDir}">
+ <j:set var="testOutputDir"
+
value="${pom.getPluginContext('maven-test-plugin').getVariable('maven.test.dest')}"/>
+ </j:if>
+ <j:if test="${ testOutputDir.startsWith( basedir ) }">
+ <ant:echo>Cutting off basedir from testOutputDir</ant:echo>
+ <j:set var="testOutputDir"
value="${testOutputDir.substring(basedir.length())}"/>
+ <!--
+ cut off also slash or backslash from basedir.
+ Is there a way to make it in one step in Jelly?
+ -->
+ <j:set var="testOutputDir" value="${testOutputDir.substring(1)}"/>
+ </j:if>
+
+ <classpathentry kind="src" path="${testSrcDir}"
output="${testOutputDir}"/>
+
+
+
+
<!-- Here are the rules:
If the project has maven.eclipse.junit property, add that ver of junit
If the project has maven.eclipse.junit property and it is empty,
don't add junit
@@ -152,25 +173,6 @@
</j:forEach>
<!-- add the unit test build directory so that any files generated via Maven
are available -->
-
-
- <j:if test="${unitTestSourcesPresent}">
- <j:set var="testOutputDir" value="${maven.eclipse.test.output.dir}"/>
- <j:if test="${empty testOutputDir}">
- <j:set var="testOutputDir"
-
value="${pom.getPluginContext('maven-test-plugin').getVariable('maven.test.dest')}"/>
- </j:if>
- <j:if test="${ testOutputDir.startsWith( basedir ) }">
- <ant:echo>Cutting off basedir from testOutputDir</ant:echo>
- <j:set var="testOutputDir"
value="${testOutputDir.substring(basedir.length())}"/>
- <!--
- cut off also slash or backslash from basedir.
- Is there a way to make it in one step in Jelly?
- -->
- <j:set var="testOutputDir" value="${testOutputDir.substring(1)}"/>
- </j:if>
- <classpathentry kind="lib" path="${testOutputDir}"/>
- </j:if>
<j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
<j:if test="${empty outputDir}">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]