incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1140457 - in /incubator/easyant/plugins/trunk/meta-build-autoactivator: ./ module.ivy src/ src/main/ src/main/resources/ src/main/resources/meta-build-autoactivator.ant
Date Tue, 28 Jun 2011 07:13:00 GMT
Author: jlboudart
Date: Tue Jun 28 07:13:00 2011
New Revision: 1140457

URL: http://svn.apache.org/viewvc?rev=1140457&view=rev
Log:
Introduce meta-build-autoactivator plugin

Added:
    incubator/easyant/plugins/trunk/meta-build-autoactivator/
    incubator/easyant/plugins/trunk/meta-build-autoactivator/module.ivy
    incubator/easyant/plugins/trunk/meta-build-autoactivator/src/
    incubator/easyant/plugins/trunk/meta-build-autoactivator/src/main/
    incubator/easyant/plugins/trunk/meta-build-autoactivator/src/main/resources/
    incubator/easyant/plugins/trunk/meta-build-autoactivator/src/main/resources/meta-build-autoactivator.ant

Added: incubator/easyant/plugins/trunk/meta-build-autoactivator/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/meta-build-autoactivator/module.ivy?rev=1140457&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/meta-build-autoactivator/module.ivy (added)
+++ incubator/easyant/plugins/trunk/meta-build-autoactivator/module.ivy Tue Jun 28 07:13:00
2011
@@ -0,0 +1,30 @@
+<!--
+   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="meta-build-autoactivator"
revision="0.1">
+           <description>This module is a build tools for multi-module projects.</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/meta-build-autoactivator/src/main/resources/meta-build-autoactivator.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/meta-build-autoactivator/src/main/resources/meta-build-autoactivator.ant?rev=1140457&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/meta-build-autoactivator/src/main/resources/meta-build-autoactivator.ant
(added)
+++ incubator/easyant/plugins/trunk/meta-build-autoactivator/src/main/resources/meta-build-autoactivator.ant
Tue Jun 28 07:13:00 2011
@@ -0,0 +1,66 @@
+<!--
+   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#meta-build-autoactivator"
+	xmlns:ac="antlib:net.sf.antcontrib"
+	xmlns:ea="antlib:org.apache.easyant" 
+	xmlns:ivy="antlib:org.apache.ivy.ant">
+
+    <ea:core-version requiredrevision="[0.9,+]" />
+    <ea:parameter property="metabuild.root" description="root directory level of a metabuild
project" default="."/>
+    <ea:parameter property="metabuild.excludes" description="Pattern describing modules
to exclude in a metabuild" default="src/ test/ lib/ WEB-INF/ classes/ bin/ module.ivy" />
+
+    <ea:parameter property="metabuild.mode" description="defines execution mode of metabuild
feature (all,dependents,dependencies)" default="all"/>
+    <ac:if>
+    	<or>
+        	<equals arg1="dependents" arg2="${metabuild.mode}"/>
+        	<equals arg1="dependencies" arg2="${metabuild.mode}"/>
+    	</or>
+    	<then>
+        	<!-- locate the first module.ivy we assume that a user can be in a subdirectory
of the project -->
+            <ea:findparentdir filename="module.ivy" property="first.parent.directory"
haltonfirstfound="true"/>
+    	    <!-- locate the highest module.ivy" -->
+    		<ea:findparentdir filename="module.ivy" property="parent.directory"/>
+    		
+            <ivy:info file="${first.parent.directory}/module.ivy" settingsRef="easyant.ivy.instance"/>
+
+    		<echo message="Setting basedir to ${parent.directory}" level="verbose"/>
+    	    <property name="project.basedir" value="${parent.directory}" />
+    		<property name="current-module" value="${ivy.module}"/>
+    	</then>
+    	<else>
+    	    <ac:if>
+    	    	<and>
+        	    	<not>
+        	    	    <available file="module.ivy"/>
+    
+        	    	</not>
+        	        <available file="module.ivy">
+        	            <filepath>
+        	               <fileset dir="${metabuild.root}" includes="*/module.ivy" excludes="${metabuild.excludes}"/>
+        	            </filepath>
+        	        </available>
+    	    	</and>
+    	        <ac:then>
+    	            <echo>Multimodule project detected !</echo>
+    	            <ea:build module="meta-build" revision="0.2"/>
+    	        </ac:then>
+    	    </ac:if>
+
+    	</else>
+    </ac:if>
+
+</project>



Mime
View raw message