incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1358819 - in /incubator/easyant/plugins/trunk: abstract-compile/src/main/resources/ abstract-test/src/main/resources/ compile-scala/src/main/resources/ compile-test-groovy/src/main/resources/ compile-test-java/src/main/resources/ compile-t...
Date Sun, 08 Jul 2012 19:14:39 GMT
Author: jlboudart
Date: Sun Jul  8 19:14:38 2012
New Revision: 1358819

URL: http://svn.apache.org/viewvc?rev=1358819&view=rev
Log:
Refactoring test plugin, all common stuff should be in abstract-compile, not abstract-test
plugin

Modified:
    incubator/easyant/plugins/trunk/abstract-compile/src/main/resources/abstract-compile.ant
    incubator/easyant/plugins/trunk/abstract-test/src/main/resources/abstract-test.ant
    incubator/easyant/plugins/trunk/compile-scala/src/main/resources/compile-scala.ant
    incubator/easyant/plugins/trunk/compile-test-groovy/src/main/resources/compile-test-groovy.ant
    incubator/easyant/plugins/trunk/compile-test-java/src/main/resources/compile-test-java.ant
    incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant

Modified: incubator/easyant/plugins/trunk/abstract-compile/src/main/resources/abstract-compile.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/abstract-compile/src/main/resources/abstract-compile.ant?rev=1358819&r1=1358818&r2=1358819&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/abstract-compile/src/main/resources/abstract-compile.ant
(original)
+++ incubator/easyant/plugins/trunk/abstract-compile/src/main/resources/abstract-compile.ant
Sun Jul  8 19:14:38 2012
@@ -19,19 +19,24 @@
     <ea:core-version requiredrevision="[0.9,+]" />
 
     <ea:parameter property="target" default="target" description="the target directory"
/>
-    <ea:parameter property="target.main.classes" required="true" 
+    <ea:parameter property="target.main.classes" default="${target}/main/classes" 
         description="destination directory for compiled classes" />
-    <ea:parameter property="target.main.classes" required="true" 
+    <ea:parameter property="target.test.classes" default="${target}/test/classes" 
         description="destination directory for compiled test classes" />
-	
-    <ea:import mrid="org.apache.easyant.plugins#abstract-provisioning;0.9" />
+    <ea:parameter property="target.test.integration.classes" default="${target}/integration-test/classes"

+        description="destination directory for compiled integration test classes" />
 
+    <ea:import mrid="org.apache.easyant.plugins#abstract-provisioning;0.9" />
 
 	<!-- We expect at this point to have every source available, even the ones which are
generated -->
 	<extension-point name="abstract-compile:compile-ready" depends="abstract-provisioning:provisioning-finished"/>
 	
 	<!-- Creates a empty classpath for compilation if it doesn't exist yet -->
     <ea:path pathid="compile.main.classpath" overwrite="false" />
-
+	
+    <path id="compile.test.classpath">
+        <pathelement location="${target.main.classes}" />
+        <path refid="compile.main.classpath" />
+    </path>
 
 </project>

Modified: incubator/easyant/plugins/trunk/abstract-test/src/main/resources/abstract-test.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/abstract-test/src/main/resources/abstract-test.ant?rev=1358819&r1=1358818&r2=1358819&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/abstract-test/src/main/resources/abstract-test.ant (original)
+++ incubator/easyant/plugins/trunk/abstract-test/src/main/resources/abstract-test.ant Sun
Jul  8 19:14:38 2012
@@ -36,23 +36,12 @@
     </target>
 
     <target name="abstract-test:init" depends="abstract-provisioning:provisioning-finished">
-        <ea:parameter property="src.test.java" required="true" 
-            description="directory with unit test source files" />
-        <ea:parameter property="src.test.integration.java" default="${basedir}/src/integration-test/java"

-                description="directory for integration test source files" />
 
         <ea:parameter property="src.test.resources" default="${basedir}/src/test/resources"
             description="directory with unit test resource files (configuration files, data
files, etc)" />
         <ea:parameter property="src.test.integration.resources" default="${basedir}/src/integration-test/resources"
                 description="directory for integration test resources (configuration files,
data files, etc)"/>
 
-        <ea:parameter property="target.main.classes" required="true" 
-            description="directory where main compiled classes are" />
-        <ea:parameter property="target.test.classes" required="true" 
-            description="destination directory for compiled unit test classes" />
-        <ea:parameter property="target.test.integration.classes" default="${basedir}/target/integration-test/classes"

-                description="destination directory for compiled integration test classes"
/>
-
         <ea:parameter property="target.test.xml" required="true" 
             description="destination directory for xml test report" />
         <ea:parameter property="target.test.html" required="true" 
@@ -61,30 +50,9 @@
         <ea:parameter property="test.mode" default="run"
             description="mode to use to execute tests: 'run' to only run tests, 'report'
to generate html report" />
         
-    	<ea:parameter property="javac.debug.mode" default="true" 
-            description="javac debug mode, true or false" />
-        
-    	<ea:parameter property="test.compile.includes.pattern" default="**/*.java" 
-            description="Pattern describing files included in test compilation process" />
-        <ea:parameter property="test.compile.excludes.pattern" default="" 
-            description="Pattern describing files excluded in test compilation process" />
-        
-    	<ea:parameter property="test.integration.compile.includes.pattern" default="**/*.java"

-            description="Pattern describing files included in integration test compilation
process" />
-        <ea:parameter property="test.integration.compile.excludes.pattern" default=""

-            description="Pattern describing files excluded in integration test compilation
process" />
-
         <ea:parameter property="test.run.failonerror" default="true"
             description="specify if the build should be stopped when tests are failed. Typically
this property should be set to false in continuous environmnent systems"/>
 
-        <ea:parameter path="compile.main.classpath" required="true" 
-            description="path used to compile main sources" />
-
-        <path id="compile.test.classpath">
-                <pathelement location="${target.main.classes}" />
-                <path refid="compile.main.classpath" />
-        </path>
-    	
 	    <ea:parameter property="test.run.dir"
             default="${basedir}" description="working directory for unit test process, defaults
to the project basedir"/>
         <ea:parameter property="test.integration.run.dir"
@@ -110,6 +78,11 @@
         <ea:parameter property="test.integration.run.excludes.pattern" 
             default="" description="Pattern describing class files excluded in integration
test run" />
 
+    	<ea:parameter property="target.test.classes" default="${target}/test/classes" 
+            description="destination directory for compiled test classes" />
+        <ea:parameter property="target.test.integration.classes" default="${target}/integration-test/classes"

+            description="destination directory for compiled integration test classes" />
+    	
         <ea:path pathid="run.test.classpath" overwrite="append-if-not-exist">
             <pathelement location="${target.test.classes}" />
             <path refid="compile.test.classpath" />
@@ -121,9 +94,6 @@
         </ea:path>
 
 
-        <available file="${src.test.java}" property="has.src.test.java" />
-        <available file="${src.test.integration.java}" property="has.src.test.integration.java"/>
-
         <condition property="test.mode.run">
             <equals arg1="${test.mode}" arg2="run" />
         </condition>

Modified: incubator/easyant/plugins/trunk/compile-scala/src/main/resources/compile-scala.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-scala/src/main/resources/compile-scala.ant?rev=1358819&r1=1358818&r2=1358819&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/compile-scala/src/main/resources/compile-scala.ant (original)
+++ incubator/easyant/plugins/trunk/compile-scala/src/main/resources/compile-scala.ant Sun
Jul  8 19:14:38 2012
@@ -27,9 +27,8 @@
             description="directory where sources to be compiled are" />
         <ea:parameter property="scalac.debug.mode" default="true" 
             description="scalac debug mode, true or false" />
-        <ea:parameter property="scala.home" default="${env.SCALA_HOME}"
-            description="scala home directory"/>
-        <ea:parameter property="compile.scala.includes.pattern" default="**/*.scala"
+
+    	<ea:parameter property="compile.scala.includes.pattern" default="**/*.scala"
                     description="Pattern describing files included in compilation process"/>
         <ea:parameter property="compile.scala.excludes.pattern" default=""
                             description="Pattern describing files excluded in compilation
process"/>

Modified: incubator/easyant/plugins/trunk/compile-test-groovy/src/main/resources/compile-test-groovy.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-test-groovy/src/main/resources/compile-test-groovy.ant?rev=1358819&r1=1358818&r2=1358819&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/compile-test-groovy/src/main/resources/compile-test-groovy.ant
(original)
+++ incubator/easyant/plugins/trunk/compile-test-groovy/src/main/resources/compile-test-groovy.ant
Sun Jul  8 19:14:38 2012
@@ -21,11 +21,19 @@
 
     <ea:import mrid="org.apache.easyant.plugins#abstract-compile;0.9" />
 
+    <ea:parameter property="src.test.groovy" default="${basedir}/src/test/groovy"
+        description="directory where test sources to be compiled are" />
+    <ea:parameter property="src.test.integration.groovy" default="${basedir}/src/integration-test/groovy"
+        description="directory where integration test sources to be compiled are" />
+
+    <available file="${src.test.groovy}" property="has.src.test.groovy" />
+    <available file="${src.test.integration.groovy}" property="has.src.test.integration.groovy"
/>
+
     <macrodef name="compile-groovy-tests">
         <attribute name="prefix"/>
         <sequential>
             <mkdir dir="${target.@{test}.classes}" />
-            <groovyc  srcdir="${src.@{test}.java}"
+            <groovyc  srcdir="${src.@{test}.groovy}"
                 destdir="${target.@{test}.classes}"
                 classpathref="compile.test.classpath"
                 includes="${@{test}.compile.includes.pattern}"
@@ -43,12 +51,22 @@
         <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="resolved.groovy.classpath"
/>
     </target>
 
-    <target name="compile-test-groovy:compile" depends="compile-test-groovy:configure"
if="has.src.test.java">
-        <compile-groovy-tests prefix="test"/>
+    <target name="compile-test-groovy:compile" depends="compile-test-groovy:configure"
if="has.src.test.groovy">
+        <ea:parameter property="test.compile.includes.pattern" default="**/*.groovy" 
+            description="Pattern describing files included in test compilation process" />
+        <ea:parameter property="test.compile.excludes.pattern" default="" 
+            description="Pattern describing files excluded in test compilation process" />
+
+    	<compile-groovy-tests prefix="test"/>
     </target>
 
-    <target name="compile-test-groovy:compile-integration" depends="compile-test-groovy:configure"
if="has.src.test.integration.java">
-        <compile-groovy-tests prefix="test.integration"/>
+    <target name="compile-test-groovy:compile-integration" depends="compile-test-groovy:configure"
if="has.src.test.integration.groovy">
+        <ea:parameter property="test.integration.compile.includes.pattern" default="**/*.groovy"

+            description="Pattern describing files included in integration test compilation
process" />
+        <ea:parameter property="test.integration.compile.excludes.pattern" default=""

+            description="Pattern describing files excluded in integration test compilation
process" />
+
+    	<compile-groovy-tests prefix="test.integration"/>
     </target>
 
 </project>

Modified: incubator/easyant/plugins/trunk/compile-test-java/src/main/resources/compile-test-java.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-test-java/src/main/resources/compile-test-java.ant?rev=1358819&r1=1358818&r2=1358819&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/compile-test-java/src/main/resources/compile-test-java.ant
(original)
+++ incubator/easyant/plugins/trunk/compile-test-java/src/main/resources/compile-test-java.ant
Sun Jul  8 19:14:38 2012
@@ -21,7 +21,19 @@
 
     <ea:import mrid="org.apache.easyant.plugins#abstract-compile;0.9" />
 
-    <macrodef name="compile-java-tests">
+    <ea:parameter property="src.test.java" default="${basedir}/src/test/java"
+        description="directory where test sources to be compiled are" />
+    <ea:parameter property="src.test.integration.java" default="${basedir}/src/integration-test/java"
+        description="directory where integration test sources to be compiled are" />
+
+    <ea:parameter property="javac.debug.mode" default="true" 
+        description="javac debug mode, true or false" />
+    
+    <available file="${src.test.java}" property="has.src.test.java" />
+    <available file="${src.test.integration.java}" property="has.src.test.integration.java"
/>
+
+	
+	<macrodef name="compile-java-tests">
         <attribute name="prefix"/>
         <sequential>
             <mkdir dir="${target.@{prefix}.classes}" />
@@ -37,21 +49,31 @@
             </javac>
         </sequential>
     </macrodef>
-
+	
     <target name="compile-test-java:compile" depends="abstract-compile:compile-ready"
if="has.src.test.java">
-        <ea:parameter property="test.compile.java.target.version" default="${ant.java.version}"

+    	<ea:parameter property="test.compile.java.target.version" default="${ant.java.version}"

             description="Specify a VM version for Generated class files (e.g., 1.1 or 1.2)."
/>
         <ea:parameter property="test.compile.java.source.version" default="${ant.java.version}"

             description="Specify a value of the -source command-line switch; will be ignored
by all implementations prior to javac1.4 (or modern when Ant is not running in a 1.3 VM) and
jikes" />
-        <compile-java-tests prefix="test"/>
+        <ea:parameter property="test.compile.includes.pattern" default="**/*.java" 
+            description="Pattern describing files included in test compilation process" />
+        <ea:parameter property="test.compile.excludes.pattern" default="" 
+            description="Pattern describing files excluded in test compilation process" />
+
+    	<compile-java-tests prefix="test"/>
     </target>
 
     <target name="compile-test-java:compile-integration" depends="abstract-compile:compile-ready"
if="has.src.test.integration.java">
-        <ea:parameter property="test.integration.compile.java.target.version" default="${ant.java.version}"

+    	<ea:parameter property="test.integration.compile.java.target.version" default="${ant.java.version}"

             description="Specify a VM version for Generated class files (e.g., 1.1 or 1.2)."
/>
         <ea:parameter property="test.integration.compile.java.source.version" default="${ant.java.version}"

             description="Specify a value of the -source command-line switch; will be ignored
by all implementations prior to javac1.4 (or modern when Ant is not running in a 1.3 VM) and
jikes" />
-        <compile-java-tests prefix="test.integration"/> 
+        <ea:parameter property="test.integration.compile.includes.pattern" default="**/*.java"

+            description="Pattern describing files included in integration test compilation
process" />
+        <ea:parameter property="test.integration.compile.excludes.pattern" default=""

+            description="Pattern describing files excluded in integration test compilation
process" />
+
+    	<compile-java-tests prefix="test.integration"/> 
     </target>
 
 </project>

Modified: incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant?rev=1358819&r1=1358818&r2=1358819&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant
(original)
+++ incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant
Sun Jul  8 19:14:38 2012
@@ -21,6 +21,14 @@
 
 	<ea:import mrid="org.apache.easyant.plugins#abstract-compile;0.9" />
 
+    <ea:parameter property="src.test.scala" default="${basedir}/src/test/scala"
+        description="directory where test sources to be compiled are" />
+    <ea:parameter property="src.test.integration.scala" default="${basedir}/src/integration-test/scala"
+        description="directory where integration test sources to be compiled are" />
+
+    <available file="${src.test.scala}" property="has.src.test.scala" />
+    <available file="${src.test.integration.scala}" property="has.src.test.integration.scala"
/>
+
     <target name="compile-test-scala:configure" depends="abstract-compile:compile-ready">
         <ea:findclasspath pathid="resolved.scala.classpath" organisation="org.scala-lang"
module="scala-compiler" revision="2.7.7">
             <ea:project-dependency-strategy />
@@ -51,11 +59,21 @@
     </macrodef>
 
     <target name="compile-test-scala:compile" depends="compile-test-scala:configure" if="has.src.test.java">
-        <compile-scala-tests prefix="test"/>
+        <ea:parameter property="test.compile.includes.pattern" default="**/*.scala" 
+            description="Pattern describing files included in test compilation process" />
+        <ea:parameter property="test.compile.excludes.pattern" default="" 
+            description="Pattern describing files excluded in test compilation process" />
+
+    	<compile-scala-tests prefix="test"/>
     </target>
 
     <target name="compile-test-scala:compile-integration" depends="compile-test-scala:configure"
if="has.src.test.integration.java">
-        <compile-scala-tests prefix="test.integration"/>
+        <ea:parameter property="test.integration.compile.includes.pattern" default="**/*.groovy"

+            description="Pattern describing files included in integration test compilation
process" />
+        <ea:parameter property="test.integration.compile.excludes.pattern" default=""

+            description="Pattern describing files excluded in integration test compilation
process" />
+
+    	<compile-scala-tests prefix="test.integration"/>
     </target>
 
 </project>



Mime
View raw message