incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1140458 - /incubator/easyant/plugins/trunk/build-tools/src/main/resources/build-tools.ant
Date Tue, 28 Jun 2011 07:13:58 GMT
Author: jlboudart
Date: Tue Jun 28 07:13:58 2011
New Revision: 1140458

URL: http://svn.apache.org/viewvc?rev=1140458&view=rev
Log:
Enhance build-tools behavior to support different mode (build all, build modules depending
on me, build my dependencies)

Modified:
    incubator/easyant/plugins/trunk/build-tools/src/main/resources/build-tools.ant

Modified: incubator/easyant/plugins/trunk/build-tools/src/main/resources/build-tools.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/build-tools/src/main/resources/build-tools.ant?rev=1140458&r1=1140457&r2=1140458&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/build-tools/src/main/resources/build-tools.ant (original)
+++ incubator/easyant/plugins/trunk/build-tools/src/main/resources/build-tools.ant Tue Jun
28 07:13:58 2011
@@ -17,11 +17,44 @@
 <project name="org.apache.easyant.plugins#build-tools" xmlns:ea="antlib:org.apache.easyant">
 
     <ea:core-version requiredrevision="[0.9,+]" />
-
     <ea:parameter property="project.ivy.instance" default="project.ivy.instance" description="ivy
instance name" />
     <ea:parameter property="project.ivy.file" required="true" description="ivy file (use
to resolve dependencies for the project)" />
     <ea:parameter property="pre.module.targets" default="validate,clean" description="list
of targets that must be executed BEFORE subproject(s) delegation" />
 
     <ea:parameter property="submodule.dirs" description="pattern or comma-separated list
indicating which submodules directories should be included in the build" default="**/*" />
+    <ea:parameter property="metabuild.root" description="root directory level of a metabuild
project" default="${basedir}"/>
+    <ea:parameter property="metabuild.includes" description="Pattern describing modules
to include in a metabuild" default="${submodule.dirs}" />
+<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"/>
+
+<fileset id="submodules.fileset" dir="${metabuild.root}" includes="${metabuild.includes}"
excludes="${metabuild.excludes}">
+	<filename name="**/module.ivy" />
+</fileset>
+<condition property="current-module" value="${ivy.module}" else="*">
+	<available file="module.ivy" />
+</condition>
+
+<ac:if>
+	<equals arg1="dependencies" arg2="${metabuild.mode}" />
+	<ac:then>
+		<ivy:buildlist reference="build-path" root="${current-module}" ivyfilepath="module.ivy"
excluderoot="true" settingsref="easyant.ivy.instance">
+			<fileset refid="submodules.fileset" />
+		</ivy:buildlist>
+	</ac:then>
+	<ac:elseif>
+		<equals arg1="dependents" arg2="${metabuild.mode}" />
+		<ac:then>
+			<ivy:buildlist reference="build-path" leaf="${current-module}" ivyfilepath="module.ivy"
excludeleaf="true" settingsref="easyant.ivy.instance">
+				<fileset refid="submodules.fileset" />
+			</ivy:buildlist>
+		</ac:then>
+	</ac:elseif>
+	<ac:else>
+		<ivy:buildlist reference="build-path" ivyfilepath="module.ivy" settingsref="easyant.ivy.instance">
+			<fileset refid="submodules.fileset" />
+		</ivy:buildlist>
+
+	</ac:else>
+</ac:if>
 
 </project>



Mime
View raw message