In maven-turbine-plugin (M.E.T.A.), pom.build.sourceDirectory is used interchangeably with turbine.plugin.src.compile, the location of generated sources (typically $PROJECT/target/src). I would rather that sourceDirectory refer to the location of the original sources ($PROJECT/src/java), in part because mevenide/NetBeans expects this. This is simple enough to implement:

- In project.jelly, change three instances of "${pom.build.SourceDirectory}" to "${turbine.plugin.src.compile}". - In each of the sample project.xml files, set <sourceDirectory> to TURBINE_PLUGIN_SRC_JAVA instead of TURBINE_PLUGIN_SRC_COMPILE.

Now, M.E.T.A. refers only to turbine.plugin.src.compile and turbine.plugin.src.java, not to sourceDirectory.

Attached is a patch that ought to do the trick.

Shane
diff -Naur maven-turbine-plugin-1.3/src/plugin/plugin.jelly 
maven-turbine-plugin-1.3.nosrcdir/src/plugin/plugin.jelly
--- maven-turbine-plugin-1.3/src/plugin/plugin.jelly    2005-10-03 
12:05:06.000000000 -0500
+++ maven-turbine-plugin-1.3.nosrcdir/src/plugin/plugin.jelly   2006-01-04 
20:17:08.000000000 -0600
@@ -428,7 +428,7 @@
     </j:forEach>
 
     <copy todir="${turbine.target.dir}/WEB-INF/classes" filtering="no">
-      <fileset dir="${pom.build.SourceDirectory}">
+      <fileset dir="${turbine.plugin.src.compile}">
         <exclude name="**/*.java"/>
         <exclude name="report.${torque.project}.om.generation"/>
       </fileset>
@@ -617,11 +617,11 @@
     </j:if>
 
     <path id="maven.compile.src.set">
-      <pathelement location="${pom.build.SourceDirectory}"/>
+      <pathelement location="${turbine.plugin.src.compile}"/>
     </path>
 
     <j:if 
test="${!context.getVariable('turbine.plugin.mode').equalsIgnoreCase('inplace')}">
-      <copy todir="${pom.build.SourceDirectory}" filtering="no">
+      <copy todir="${turbine.plugin.src.compile}" filtering="no">
         <fileset dir="${turbine.plugin.src.java}"/>
       </copy>
     </j:if>
diff -Naur 
maven-turbine-plugin-1.3/src/plugin-resources/flavor/turbine-2.3/maven/project.xml
 
maven-turbine-plugin-1.3.nosrcdir/src/plugin-resources/flavor/turbine-2.3/maven/project.xml
--- 
maven-turbine-plugin-1.3/src/plugin-resources/flavor/turbine-2.3/maven/project.xml
  2005-10-03 12:05:06.000000000 -0500
+++ 
maven-turbine-plugin-1.3.nosrcdir/src/plugin-resources/flavor/turbine-2.3/maven/project.xml
 2006-01-04 20:16:03.000000000 -0600
@@ -393,7 +393,7 @@
     <!-- with the generated OM classes "on the fly" and copied to  -->
     <!-- this directory. Then all java classes are compiled to     -->
     <!-- class files. Do not change this lightly!                  -->
-    <sourceDirectory>@TURBINE_PLUGIN_SRC_COMPILE@</sourceDirectory>
+    <sourceDirectory>@TURBINE_PLUGIN_SRC_JAVA@</sourceDirectory>
 
     <!-- Unit test classes -->
     
<unitTestSourceDirectory>@TURBINE_PLUGIN_SRC_TEST@</unitTestSourceDirectory>
diff -Naur 
maven-turbine-plugin-1.3/src/plugin-resources/flavor/turbine-2.3.1/maven/project.xml
 
maven-turbine-plugin-1.3.nosrcdir/src/plugin-resources/flavor/turbine-2.3.1/maven/project.xml
--- 
maven-turbine-plugin-1.3/src/plugin-resources/flavor/turbine-2.3.1/maven/project.xml
        2005-10-03 12:05:06.000000000 -0500
+++ 
maven-turbine-plugin-1.3.nosrcdir/src/plugin-resources/flavor/turbine-2.3.1/maven/project.xml
       2006-01-04 20:16:03.000000000 -0600
@@ -465,7 +465,7 @@
     <!-- with the generated OM classes "on the fly" and copied to  -->
     <!-- this directory. Then all java classes are compiled to     -->
     <!-- class files. Do not change this lightly!                  -->
-    <sourceDirectory>@TURBINE_PLUGIN_SRC_COMPILE@</sourceDirectory>
+    <sourceDirectory>@TURBINE_PLUGIN_SRC_JAVA@</sourceDirectory>
 
     <!-- Unit test classes -->
     
<unitTestSourceDirectory>@TURBINE_PLUGIN_SRC_TEST@</unitTestSourceDirectory>
diff -Naur 
maven-turbine-plugin-1.3/src/plugin-resources/flavor/turbine-2.3.2/maven/project.xml
 
maven-turbine-plugin-1.3.nosrcdir/src/plugin-resources/flavor/turbine-2.3.2/maven/project.xml
--- 
maven-turbine-plugin-1.3/src/plugin-resources/flavor/turbine-2.3.2/maven/project.xml
        2005-10-03 12:05:06.000000000 -0500
+++ 
maven-turbine-plugin-1.3.nosrcdir/src/plugin-resources/flavor/turbine-2.3.2/maven/project.xml
       2006-01-04 20:16:03.000000000 -0600
@@ -491,7 +491,7 @@
     <!-- with the generated OM classes "on the fly" and copied to  -->
     <!-- this directory. Then all java classes are compiled to     -->
     <!-- class files. Do not change this lightly!                  -->
-    <sourceDirectory>@TURBINE_PLUGIN_SRC_COMPILE@</sourceDirectory>
+    <sourceDirectory>@TURBINE_PLUGIN_SRC_JAVA@</sourceDirectory>
 
     <!-- Unit test classes -->
     
<unitTestSourceDirectory>@TURBINE_PLUGIN_SRC_TEST@</unitTestSourceDirectory>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to