incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1232620 - in /incubator/easyant/plugins/trunk: abstract-compile/ abstract-compile/src/ abstract-compile/src/main/ abstract-compile/src/main/resources/ compile-groovy/src/main/resources/ compile-java/src/main/resources/ compile-scala/src/ma...
Date Tue, 17 Jan 2012 22:46:23 GMT
Author: jlboudart
Date: Tue Jan 17 22:46:22 2012
New Revision: 1232620

URL: http://svn.apache.org/viewvc?rev=1232620&view=rev
Log:
Refactoring phases in favor of extensionPoint : Introduce abstract-compile plugin

Added:
    incubator/easyant/plugins/trunk/abstract-compile/
    incubator/easyant/plugins/trunk/abstract-compile/module.ivy
    incubator/easyant/plugins/trunk/abstract-compile/src/
    incubator/easyant/plugins/trunk/abstract-compile/src/main/
    incubator/easyant/plugins/trunk/abstract-compile/src/main/resources/
    incubator/easyant/plugins/trunk/abstract-compile/src/main/resources/abstract-compile.ant
Modified:
    incubator/easyant/plugins/trunk/compile-groovy/src/main/resources/compile-groovy.ant
    incubator/easyant/plugins/trunk/compile-java/src/main/resources/compile-java.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

Added: incubator/easyant/plugins/trunk/abstract-compile/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/abstract-compile/module.ivy?rev=1232620&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/abstract-compile/module.ivy (added)
+++ incubator/easyant/plugins/trunk/abstract-compile/module.ivy Tue Jan 17 22:46:22 2012
@@ -0,0 +1,33 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
+    <info organisation="org.apache.easyant.plugins" module="abstract-compile" revision="0.1">
+           <description>Abstract base plugin, that any modules providing
+           compilation features should include.  abstract-compile
+           defines common configuration properties governing code compilation
+           behavior.</description>
+           <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin"
revision="0.1"/>
+        </info>
+        <configurations>
+                <conf name="default" description="runtime dependencies artifact can be
used with this conf"/>
+                <conf name="test" description="this scope indicates that the dependency
is not required for normal use of the application, and is only available for the test compilation
and execution phases."/>
+                <conf name="provided" description="this is much like compile, but indicates
you expect the JDK or a container to provide it. It is only available on the compilation classpath,
and is not transitive."/>
+        </configurations>
+    <publications>
+        <artifact type="ant"/>
+    </publications>
+</ivy-module>

Added: 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=1232620&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/abstract-compile/src/main/resources/abstract-compile.ant
(added)
+++ incubator/easyant/plugins/trunk/abstract-compile/src/main/resources/abstract-compile.ant
Tue Jan 17 22:46:22 2012
@@ -0,0 +1,37 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project name="org.apache.easyant.plugins#abstract-compile" xmlns:ea="antlib:org.apache.easyant">
+
+    <ea:core-version requiredrevision="[0.9,+]" />
+
+    <ea:parameter property="target" default="target" description="the target directory"
/>
+    <ea:parameter property="target.main.classes" required="true" 
+        description="destination directory for compiled classes" />
+    <ea:parameter property="target.main.classes" required="true" 
+        description="destination directory for compiled test classes" />
+	
+    <ea:import mrid="org.apache.easyant.plugins#abstract-provisioning;0.1" />
+
+
+	<!-- 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" />
+
+
+</project>

Modified: incubator/easyant/plugins/trunk/compile-groovy/src/main/resources/compile-groovy.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-groovy/src/main/resources/compile-groovy.ant?rev=1232620&r1=1232619&r2=1232620&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/compile-groovy/src/main/resources/compile-groovy.ant (original)
+++ incubator/easyant/plugins/trunk/compile-groovy/src/main/resources/compile-groovy.ant Tue
Jan 17 22:46:22 2012
@@ -18,20 +18,21 @@
 
     <ea:core-version requiredrevision="[0.9,+]" />
 
+    <ea:import mrid="org.apache.easyant.plugins#abstract-provisioning;0.1" />
+    <ea:import mrid="org.apache.easyant.plugins#abstract-compile;0.2" />
+
+
     <target name="compile-groovy:init">
         <ea:parameter property="src.main.groovy" required="true" description="directory
where sources to be compiled are" />
-        <ea:parameter property="target.main.classes" required="true" description="destination
directory for compiled test classes" />
 
         <ea:parameter property="compile.groovy.includes.pattern" default="**/*.groovy"
description="Pattern describing files included in compilation process" />
         <ea:parameter property="compile.groovy.excludes.pattern" default="" description="Pattern
describing files excluded in compilation process" />
 
         <available file="${src.main.groovy}" property="has.src.main.groovy" />
 
-        <ea:path pathid="compile.main.classpath" overwrite="false" />
-        
     </target>
 
-    <target name="-compile-groovy:configure" depends="compile-groovy:init">
+    <target name="-compile-groovy:configure" depends="compile-groovy:init,abstract-compile:compile-ready">
         <ea:findclasspath pathid="resolved.groovy.classpath" organisation="org.codehaus.groovy"
module="groovy-all" revision="1.6.0">
             <ea:project-dependency-strategy />
             <ea:environment-strategy env="GROOVY_HOME"/>
@@ -42,7 +43,7 @@
 
     </target>
 
-    <target name="compile-groovy:compile" depends="compile-groovy:init" if="has.src.main.groovy">
+    <target name="compile-groovy:compile" depends="compile-groovy:configure" if="has.src.main.groovy">
         <mkdir dir="${target.main.classes}" />
         <!--
         <groovyc> Attributes

Modified: incubator/easyant/plugins/trunk/compile-java/src/main/resources/compile-java.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-java/src/main/resources/compile-java.ant?rev=1232620&r1=1232619&r2=1232620&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/compile-java/src/main/resources/compile-java.ant (original)
+++ incubator/easyant/plugins/trunk/compile-java/src/main/resources/compile-java.ant Tue Jan
17 22:46:22 2012
@@ -19,16 +19,11 @@
 
     <ea:core-version requiredrevision="[0.9,+]" />
 
-    <ea:import mrid="org.apache.easyant.plugins#abstract-provisioning;0.1" />
-
-    <!-- We expect at this point to have every source available, even the ones which are
generated -->
-    <extension-point name="compile-java:compile-ready" />
-
+    <ea:import mrid="org.apache.easyant.plugins#abstract-compile;0.2" />
+	
     <target name="compile-java:init">
         <ea:parameter property="src.main.java" required="true"
             description="directory where sources to be compiled are" />
-        <ea:parameter property="target.main.classes" required="true" 
-            description="destination directory for compiled test classes" />
         <ea:parameter property="javac.debug.mode" default="true" 
             description="javac debug mode, true or false" />
 
@@ -44,10 +39,9 @@
 
         <available file="${src.main.java}" property="has.src.main.java" />
 
-        <ea:path pathid="compile.main.classpath" overwrite="false" />
     </target>
 
-    <target name="compile-java:compile" depends="compile-java:init,abstract-provisioning:provisioning-finished,compile-java:compile-ready"
if="has.src.main.java">
+    <target name="compile-java:compile" depends="compile-java:init,abstract-compile:compile-ready"
if="has.src.main.java">
         <mkdir dir="${target.main.classes}" />
         <javac  srcdir="${src.main.java}"
                 destdir="${target.main.classes}"

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=1232620&r1=1232619&r2=1232620&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 Tue
Jan 17 22:46:22 2012
@@ -19,12 +19,12 @@
     
     <ea:core-version requiredrevision="[0.9,+]" />
     
+    <ea:import mrid="org.apache.easyant.plugins#abstract-compile;0.2" />
+
     <target name="compile-scala:init">
         <property environment="env"/>
         <ea:parameter property="src.main.scala" required="true"
             description="directory where sources to be compiled are" />
-        <ea:parameter property="target.main.classes" required="true" 
-            description="destination directory for compiled test classes" />
         <ea:parameter property="scalac.debug.mode" default="true" 
             description="scalac debug mode, true or false" />
         <ea:parameter property="scala.home" default="${env.SCALA_HOME}"
@@ -36,10 +36,9 @@
         
         <available file="${src.main.scala}" property="has.src.main.scala" />
 
-        <ea:path pathid="compile.main.classpath" overwrite="false" />
     </target>
 
-    <target name="-compile-scala:configure" depends="compile-scala:init">
+    <target name="compile-scala:configure" depends="compile-scala:init,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 />
             <ea:environment-strategy env="SCALA_HOME"/>
@@ -55,7 +54,7 @@
         </ea:path>
     </target>
 
-    <target name="compile-scala:compile" depends="-compile-scala:configure" if="has.src.main.scala">
+    <target name="compile-scala:compile" depends="compile-scala:configure" if="has.src.main.scala">
         <mkdir dir="${target.main.classes}" />
         <scalac  srcdir="${src.main.scala}"
                 destdir="${target.main.classes}"

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=1232620&r1=1232619&r2=1232620&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
Tue Jan 17 22:46:22 2012
@@ -19,7 +19,7 @@
 
     <ea:core-version requiredrevision="[0.9,+]" />
 
-    <ea:import mrid="org.apache.easyant.plugins#ivy-provisioning;0.2" />
+    <ea:import mrid="org.apache.easyant.plugins#abstract-compile;0.2" />
 
     <macrodef name="compile-groovy-tests">
         <attribute name="prefix"/>
@@ -33,7 +33,7 @@
         </sequential>
     </macrodef>
 
-    <target name="-compile-test-groovy:configure" depends="ivy-provisioning:resolve-test-confs">
+    <target name="compile-test-groovy:configure" depends="abstract-compile:compile-ready">
         <ea:findclasspath pathid="resolved.groovy.classpath" organisation="org.codehaus.groovy"
module="groovy-all" revision="1.6.0">
             <ea:project-dependency-strategy />
             <ea:environment-strategy env="GROOVY_HOME"/>
@@ -43,11 +43,11 @@
         <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">
+    <target name="compile-test-groovy:compile" depends="compile-test-groovy:configure"
if="has.src.test.java">
         <compile-groovy-tests prefix="test"/>
     </target>
 
-    <target name="compile-test-groovy:compile-integration" depends="-compile-test-groovy:configure"
if="has.src.test.integration.java">
+    <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>
 

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=1232620&r1=1232619&r2=1232620&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
Tue Jan 17 22:46:22 2012
@@ -19,7 +19,7 @@
 
     <ea:core-version requiredrevision="[0.9,+]" />
 
-    <ea:import mrid="org.apache.easyant.plugins#abstract-provisioning;0.1" />
+    <ea:import mrid="org.apache.easyant.plugins#abstract-compile;0.1" />
 
     <macrodef name="compile-java-tests">
         <attribute name="prefix"/>
@@ -38,7 +38,7 @@
         </sequential>
     </macrodef>
 
-    <target name="compile-test-java:compile" depends="abstract-provisioning:provisioning-finished"
if="has.src.test.java">
+    <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}"

             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}"

@@ -46,7 +46,7 @@
         <compile-java-tests prefix="test"/>
     </target>
 
-    <target name="compile-test-java:compile-integration" depends="abstract-provisioning:provisioning-finished"
if="has.src.test.integration.java">
+    <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}"

             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}"


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=1232620&r1=1232619&r2=1232620&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
Tue Jan 17 22:46:22 2012
@@ -19,9 +19,9 @@
 
     <ea:core-version requiredrevision="[0.9,+]" />
 
-    <ea:import mrid="org.apache.easyant.plugins#ivy-provisioning;0.2" />
+	<ea:import mrid="org.apache.easyant.plugins#abstract-compile;0.1" />
 
-    <target name="-compile-test-scala:configure" depends="ivy-provisioning:resolve-test-confs">
+    <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 />
             <ea:environment-strategy env="SCALA_HOME"/>
@@ -50,11 +50,11 @@
         </sequential>
     </macrodef>
 
-    <target name="compile-test-scala:compile" depends="-compile-test-scala:configure"
if="has.src.test.java">
+    <target name="compile-test-scala:compile" depends="compile-test-scala:configure" if="has.src.test.java">
         <compile-scala-tests prefix="test"/>
     </target>
 
-    <target name="compile-test-scala:compile-integration" depends="-compile-test-scala:configure"
if="has.src.test.integration.java">
+    <target name="compile-test-scala:compile-integration" depends="compile-test-scala:configure"
if="has.src.test.integration.java">
         <compile-scala-tests prefix="test.integration"/>
     </target>
 



Mime
View raw message