[jboss-svn-commits] JBL Code SVN: r24443 - in labs/jbossbuild/buildmagic/trunk: tasks/src/it and 20 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Dec 19 15:22:34 EST 2008
Author: pgier
Date: 2008-12-19 15:22:33 -0500 (Fri, 19 Dec 2008)
New Revision: 24443
Added:
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/build/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/build/build.xml
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/build.xml
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/etc/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/etc/default.mf
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/org/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/org/jboss/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/org/jboss/buildmagic/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/org/jboss/buildmagic/test/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/org/jboss/buildmagic/test/HelloModule1.java
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/resources/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/test/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/build.xml
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/etc/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/etc/default.mf
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/org/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/org/jboss/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/org/jboss/buildmagic/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/org/jboss/buildmagic/test/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/org/jboss/buildmagic/test/HelloModule2.java
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/resources/
labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/test/
labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/Module.java
Modified:
labs/jbossbuild/buildmagic/trunk/tasks/build.xml
labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/ExecuteModules.java
labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/ModuleConfig.java
labs/jbossbuild/buildmagic/trunk/tools/buildmagic/lib/buildmagic-tasks.jar
Log:
[JBBUILD-508] Allow new property in modules to allow module builds external to buildmagic.
Modified: labs/jbossbuild/buildmagic/trunk/tasks/build.xml
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/build.xml 2008-12-19 19:18:33 UTC (rev 24442)
+++ labs/jbossbuild/buildmagic/trunk/tasks/build.xml 2008-12-19 20:22:33 UTC (rev 24443)
@@ -234,23 +234,23 @@
<fileset dir="src/it"/>
</copy>
- <mkdir dir="${output.it}/simple-build/tools/buildmagic"/>
- <copy todir="${output.it}/simple-build/tools/buildmagic">
- <fileset dir="${dist.root}"/>
- </copy>
-
- <!--<ant antfile="${output.it}/simple-build/build/build.xml" inheritAll="false"
- output="${output.it}/simple-build/buildlog.txt"/>-->
- <exec executable="ant" dir="${output.it}/simple-build/build/"
- output="${output.it}/simple-build/buildlog.txt" failonerror="true"/>
- <fail>
- <condition>
+ <run-it dir="simple-build">
+ <failure-conditions>
<not>
<available file="${output.it}/simple-build/module2/output"/>
</not>
- </condition>
- </fail>
+ </failure-conditions>
+ </run-it>
+ <run-it dir="simple-external-build">
+ <failure-conditions>
+ <available file="${output.it}/simple-external-build/module1/output"/>
+ <not>
+ <available file="${output.it}/simple-external-build/module2/output"/>
+ </not>
+ </failure-conditions>
+ </run-it>
+
<echo>
End Integration Tests
</echo>
@@ -278,4 +278,42 @@
<target name="most" depends="output"/>
<target name="help"/>
+ <!--+====================================================================+-->
+ <!--| Macro Definitions |-->
+ <!--| |-->
+ <!--| Some useful macros. |-->
+ <!--+====================================================================+-->
+
+ <macrodef name="run-it">
+ <attribute name="dir"/>
+ <element name="failure-conditions" optional="yes"/>
+ <sequential>
+ <mkdir dir="${output.it}/@{dir}/tools/buildmagic"/>
+ <copy todir="${output.it}/@{dir}/tools/buildmagic">
+ <fileset dir="${dist.root}"/>
+ </copy>
+
+ <exec executable="ant" dir="${output.it}/@{dir}/build/"
+ output="${output.it}/simple-build/buildlog.txt" resultproperty="@{dir}-clean-result">
+ <arg line="clean"/>
+ </exec>
+ <exec executable="ant" dir="${output.it}/@{dir}/build/"
+ output="${output.it}/simple-build/buildlog.txt" resultproperty="@{dir}-build-result"/>
+ <fail message="Test @{dir} failed. For more information, see ${output.it}/@{dir}/buildlog.txt">
+ <condition>
+ <or>
+ <not>
+ <equals arg1="${@{dir}-clean-result}" arg2="0" trim="true"/>
+ </not>
+ <not>
+ <equals arg1="${@{dir}-build-result}" arg2="0" trim="true"/>
+ </not>
+ <failure-conditions/>
+ </or>
+ </condition>
+ </fail>
+ <echo message="Successful completion of test: @{dir}"/>
+ </sequential>
+ </macrodef>
+
</project>
Added: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/build/build.xml
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/build/build.xml (rev 0)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/build/build.xml 2008-12-19 20:22:33 UTC (rev 24443)
@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+ <!ENTITY buildmagic SYSTEM "../tools/buildmagic/etc/buildmagic.ent">
+ <!ENTITY tools SYSTEM "../tools/buildmagic/etc/tools.ent">
+ <!ENTITY modules SYSTEM "../tools/buildmagic/etc/modules.ent">
+ <!ENTITY defaults SYSTEM "../tools/buildmagic/etc/defaults.ent">
+]>
+
+<!-- $Id$ -->
+
+<!--+======================================================================+-->
+<!--| JBoss (The OpenSource J2EE WebOS) Build File |-->
+<!--| |-->
+<!--| Distributable under LGPL license. |-->
+<!--| See terms of license at http://www.gnu.org. |-->
+<!--| |-->
+<!--| This file has been designed to work with the 'tools' module and |-->
+<!--| Buildmagic extentions. |-->
+<!--+======================================================================+-->
+
+<project default="main" name="JBoss Buildmagic">
+
+ <!--+====================================================================+-->
+ <!--| Setup |-->
+ <!--| |-->
+ <!--| Include the common build elements. |-->
+ <!--| |-->
+ <!--| This defines several different targets, properties and paths. |-->
+ <!--| It also sets up the basic extention tasks amoung other things. |-->
+ <!--+====================================================================+-->
+
+ &buildmagic;
+ &defaults;
+ &tools;
+
+
+ <!--+====================================================================+-->
+ <!--| Initialization |-->
+ <!--| |-->
+ <!--| Initialize the build system. Other targets should depend on |-->
+ <!--| 'init'. |-->
+ <!--+====================================================================+-->
+
+ <target name="init" depends="_buildmagic:init">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!-- fake, to keep tests target happy -->
+ <target name="compile" depends="init"/>
+
+
+ <!--+====================================================================+-->
+ <!--| Configuration |-->
+ <!--| |-->
+ <!--| This target is invoked by the Buildmagic initialization logic |-->
+ <!--| and should contain module specific configuration elements. |-->
+ <!--+====================================================================+-->
+
+ <target name="configure" unless="configure.disable">
+
+ <!--+==============================+-->
+ <!--| Project version information. |-->
+ <!--+==============================+-->
+
+ <!-- Version identifiers for the server. -->
+ <property name="version.major" value="2"/>
+ <property name="version.minor" value="1"/>
+ <property name="version.revision" value="0"/>
+ <property name="version.tag" value="ga"/>
+ <property name="version.name" value="supyo"/>
+
+ <!-- Module name(s) & version -->
+ <!-- =================== -->
+ <!-- Basic Configuration -->
+ <!-- =================== -->
+
+ <!-- Module name(s) & version -->
+ <property name="module.name" value="simple-build"/>
+ <property name="module.Name" value="Simple Test Build"/>
+ <property name="module.version" value="${version.major}.${version.minor}.${version.revision}${version.tag}"/>
+
+ <!--+================================+-->
+ <!--| Library & Module Dependencies. |-->
+ <!--+================================+-->
+
+ <!-- Configure thirdparty libraries -->
+ <!--<call target="configure-libraries"/>-->
+ <path id="library.classpath">
+ <!-- Add thirdparty library elements here. -->
+ </path>
+
+ <!-- Configure modules -->
+ <!--<call target="configure-modules"/>-->
+ <path id="dependentmodule.classpath">
+ <!-- Add dependent module classpath elements here. -->
+ </path>
+
+ <!--+=======================================+-->
+ <!--| Override any default properties here. |-->
+ <!--+=======================================+-->
+
+ <!-- Configure defaults & build tools -->
+ <call target="configure-defaults"/>
+ <call target="configure-tools"/>
+
+ <!--+=======================================+-->
+ <!--| Define module specific elements here. |-->
+ <!--+=======================================+-->
+
+ <!--+================================+-->
+ <!--| Define project structure here. |-->
+ <!--+================================+-->
+
+ <!-- The group to use by default -->
+ <property name="groups" value="default"/>
+
+ <!-- Sets up the module configuration. -->
+ <moduleconfig property="modules" selected="${groups}">
+
+ <!-- Modules -->
+
+ <module name="module1" externalBuild="true"/>
+ <module name="module2"/>
+
+ <!-- Module groups -->
+
+ <group name="core">
+ <include modules="module1, module2"/>
+ </group>
+
+ <group name="default">
+ <include groups="core"/>
+ </group>
+
+ </moduleconfig>
+
+ <!-- Configure project defaults -->
+ <!--<call target="configure-project"/>-->
+
+ <!-- ===== -->
+ <!-- Tasks -->
+ <!-- ===== -->
+
+ <!-- Skip any missing modules and issue a warning -->
+ <property name="executemodules.skipmissing" value="true"/>
+
+ <!-- The header and footer displayed during each module execution -->
+ <property name="executemodules.header"><![CDATA[
+ ======================================================================
+ == Header Executing '${target}' in module '${module}'...
+ ==]]></property>
+
+ <property name="executemodules.footer"><![CDATA[
+ ==
+ == Footer Finished with '${target}' in module '${module}'.
+ ======================================================================
+ ]]></property>
+
+ <property name="executemodules.exportproperties">
+ version.major,
+ version.minor,
+ version.revision,
+ version.tag,
+ version.name,
+ version.svntag,
+
+ specification.title,
+ specification.version,
+ specification.vendor,
+
+ implementation.title,
+ implementation.version,
+ implementation.vendor,
+ implementation.vendor.id,
+ implementation.url
+ </property>
+
+
+ </target>
+
+
+ <!-- ================================================================== -->
+ <!-- Module Pass-through Targets -->
+ <!-- ================================================================== -->
+
+ <!--
+ | These targets will execute all configured modules with the specified
+ | target.
+ -->
+ <target name="modules-all" depends="_buildmagic:modules:all" />
+ <target name="modules-most" depends="_buildmagic:modules:most" />
+ <target name="modules-main" depends="_buildmagic:modules:main"/>
+ <target name="modules-release" depends="_buildmagic:modules:release"/>
+ <target name="modules-tests" depends="_buildmagic:modules:tests"/>
+ <target name="modules-clean" depends="_buildmagic:modules:clean"/>
+ <target name="modules-clobber" depends="_buildmagic:modules:clobber"/>
+ <target name="modules-docs" depends="_buildmagic:modules:docs"/>
+
+ <!--+====================================================================+-->
+ <!--| Module Pass-through Hooks |-->
+ <!--| |-->
+ <!--| These hooks are executed after the above pass-through targets have |-->
+ <!--| finished with a given module. |-->
+ <!--+====================================================================+-->
+
+ <!-- ====== -->
+ <!-- Common -->
+ <!-- ====== -->
+
+ <target name="_module-common-most">
+ <property name="_module.name" value="common" override="true"/>
+ <property name="_module.output" override="true"
+ value="${project.root}/${_module.name}/output"/>
+
+ <!-- ??? -->
+
+ </target>
+
+ <target name="_module-common-all" depends="_module-common-most">
+
+ <!-- ??? -->
+
+ </target>
+
+ <!-- ===== -->
+ <!-- Tasks -->
+ <!-- ===== -->
+
+ <target name="_module-tasks-most">
+ <property name="_module.name" value="tasks" override="true"/>
+ <property name="_module.output" override="true"
+ value="${project.root}/${_module.name}/output"/>
+
+ <!-- ??? -->
+
+ </target>
+
+ <target name="_module-tasks-all" depends="_module-tasks-most">
+ <!-- Copy the generated javadocs -->
+ <mkdir dir="${install.api}/${_module.name}"/>
+ <copy todir="${install.api}/${_module.name}" filtering="no">
+ <fileset dir="${_module.output}/api">
+ <include name="**/*"/>
+ </fileset>
+ </copy>
+ </target>
+
+
+ <!--+====================================================================+-->
+ <!--| Generate Output |-->
+ <!--| |-->
+ <!--| Generates the target output for this module. Target output is |-->
+ <!--| the output which is ment to be released or used by external |-->
+ <!--| modules. |-->
+ <!--+====================================================================+-->
+
+ <target name="output"
+ description="Generate all target output."
+ depends="init">
+ <!-- Add module specific elements here. -->
+ </target>
+
+
+ <!--+====================================================================+-->
+ <!--| Documents |-->
+ <!--| |-->
+ <!--| Generate all documentation for this module. |-->
+ <!--+====================================================================+-->
+
+ <target name="docs">
+ <!-- Add module specific elements here. -->
+ </target>
+
+
+ <!--+====================================================================+-->
+ <!--| Install & Release |-->
+ <!--+====================================================================+-->
+
+ <target name="release"
+ description="Builds the default release structure."
+ depends="modules-most, output"/>
+
+ <target name="release-full"
+ description="Builds the full release structure."
+ depends="modules-most, release"/>
+
+
+ <!--+====================================================================+-->
+ <!--| Misc. |-->
+ <!--| |-->
+ <!--| Standard targets and psuedo-targets. |-->
+ <!--+====================================================================+-->
+
+ <target name="clean" depends="init, modules-clean, _buildmagic:clean"
+ description="Cleans up most generated files.">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <target name="clobber" depends="_buildmagic:clobber, clean, modules-clobber"
+ description="Cleans up all generated files.">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <target name="main" depends="most"
+ description="Executes the default target (most)."/>
+
+ <target name="all" depends="modules-all"
+ description="Executes all modules and builds everything."/>
+
+ <target name="most" depends="modules-most"
+ description="Executes all modules and builds most everything."/>
+
+ <target name="help" depends="_buildmagic:help:build"
+ description="Show this help message."/>
+
+</project>
Property changes on: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/build/build.xml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/build.xml
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/build.xml (rev 0)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/build.xml 2008-12-19 20:22:33 UTC (rev 24443)
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+ <!ENTITY buildmagic SYSTEM "../tools/buildmagic/etc/buildmagic.ent">
+ <!ENTITY tools SYSTEM "../tools/buildmagic/etc/tools.ent">
+ <!ENTITY modules SYSTEM "../tools/buildmagic/etc/modules.ent">
+ <!ENTITY defaults SYSTEM "../tools/buildmagic/etc/defaults.ent">
+]>
+
+<!-- $Id$ -->
+
+<!--+======================================================================+-->
+<!--| JBoss (The OpenSource J2EE WebOS) Build File |-->
+<!--| |-->
+<!--| Distributable under LGPL license. |-->
+<!--| See terms of license at http://www.gnu.org. |-->
+<!--| |-->
+<!--| This file has been designed to work with the 'tools' module and |-->
+<!--| Buildmagic extentions. |-->
+<!--+======================================================================+-->
+
+<project name="Buildmagic/Tasks" default="main">
+
+ <!--+====================================================================+-->
+ <!--| Setup |-->
+ <!--| |-->
+ <!--| Include the common build elements. |-->
+ <!--| |-->
+ <!--| This defines several different targets, properties and paths. |-->
+ <!--| It also sets up the basic extention tasks amoung other things. |-->
+ <!--+====================================================================+-->
+
+ &buildmagic;
+ &defaults;
+ &tools;
+
+ <target name="resolve-compile-dependencies" description="dependency placeholder">
+ <path id="library.classpath">
+ </path>
+ </target>
+
+ <target name="resolve-test-dependencies" description="dependency placeholder">
+ <path id="test.dependencies.classpath">
+ </path>
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Initialization |-->
+ <!--| |-->
+ <!--| Initialize the build system. Other targets should depend on |-->
+ <!--| 'init'. |-->
+ <!--+====================================================================+-->
+
+ <target name="init" depends="_buildmagic:init">
+
+ </target>
+
+
+ <!--+====================================================================+-->
+ <!--| Configuration |-->
+ <!--| |-->
+ <!--| This target is invoked by the Buildmagic initialization logic |-->
+ <!--| and should contain module specific configuration elements. |-->
+ <!--+====================================================================+-->
+
+ <target name="configure" unless="configure.disable">
+
+ <!-- Module name(s) & version -->
+ <property name="module.name" value="module1"/>
+ <property name="module.Name" value="Module1"/>
+
+ <!--+================================+-->
+ <!--| Library & Module Dependencies. |-->
+ <!--+================================+-->
+
+ <!-- Configure modules -->
+ <!--<path id="jboss.common.root" path="../common"/>
+ <property name="jboss.common.root" value="../common"/>-->
+
+
+ <!--<call target="configure-modules"/>
+ <path id="dependentmodule.classpath">
+ <path refid="jboss.common.classpath"/>
+ </path>-->
+
+ <!--+=======================================+-->
+ <!--| Override any default properties here. |-->
+ <!--+=======================================+-->
+
+ <!-- We need the Ant RT classes -->
+ <property name="javac.include.ant.runtime" value="true"/>
+
+ <!-- Configure defaults & build tools -->
+ <call target="configure-defaults"/>
+ <call target="configure-tools"/>
+
+ <!--+=======================================+-->
+ <!--| Define module specific elements here. |-->
+ <!--+=======================================+-->
+
+ </target>
+
+
+ <!--+====================================================================+-->
+ <!--| Compile |-->
+ <!--| |-->
+ <!--| This target should depend on other compile-* targets for each |-->
+ <!--| different type of compile that needs to be performed, short of |-->
+ <!--| documentation compiles. |-->
+ <!--+====================================================================+-->
+
+ <target name="compile"
+ description="Compile all source files."
+ depends="resolve-compile-dependencies,
+ _default:compile-classes,
+ _default:compile-etc,
+ _default:compile-resources">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Test |-->
+ <!--| |-->
+ <!--| Run unit tests |-->
+ <!--+====================================================================+-->
+
+ <target name="test"
+ description="Run junit tests."
+ depends="compile, resolve-test-dependencies">
+
+ <mkdir dir="${build.test}"/>
+ <mkdir dir="${build.reports}"/>
+
+ <javac srcdir="${source.test}"
+ destdir="${build.test}"
+ debug="on">
+ <classpath>
+ <pathelement location="${build.classes}"/>
+ <path refid="test.dependencies.classpath"/>
+ </classpath>
+ </javac>
+
+ <junit printsummary="yes" haltonfailure="yes">
+ <classpath>
+ <pathelement location="${build.test}"/>
+ <pathelement location="${build.classes}"/>
+ <path refid="test.dependencies.classpath"/>
+ </classpath>
+
+ <formatter type="plain"/>
+
+ <!--<test name="my.test.TestCase" haltonfailure="no" outfile="result">
+ <formatter type="xml"/>
+ </test>-->
+
+ <batchtest fork="yes" todir="${build.reports}">
+ <fileset dir="${source.test}">
+ <include name="**/*Test*.java"/>
+ <exclude name="**/AllTests.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+
+ <!--+====================================================================+-->
+ <!--| Generate Output |-->
+ <!--| |-->
+ <!--| Generates the target output for this module. Target output is |-->
+ <!--| the output which is ment to be released or used by external |-->
+ <!--| modules. |-->
+ <!--+====================================================================+-->
+
+ <target name="output"
+ description="Generate all target output."
+ depends="compile, test">
+
+ <mkdir dir="${build.lib}"/>
+
+ <!-- buildmagic-tasks.jar -->
+ <jar jarfile="${build.lib}/module1.jar" manifest="${build.etc}/default.mf">
+ <fileset dir="${build.classes}">
+ <include name="**"/>
+ </fileset>
+ </jar>
+
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Misc. |-->
+ <!--| |-->
+ <!--| Standard targets and psuedo-targets. |-->
+ <!--+====================================================================+-->
+
+ <target name="clean" depends="_buildmagic:clean">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <target name="clobber" depends="_buildmagic:clobber">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!-- main, all, most and help are primary psuedo-targets -->
+ <target name="main" depends="most"/>
+ <target name="all"/>
+ <target name="most" depends="output"/>
+ <target name="help"/>
+
+</project>
Property changes on: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/build.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/etc/default.mf
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/etc/default.mf (rev 0)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/etc/default.mf 2008-12-19 20:22:33 UTC (rev 24443)
@@ -0,0 +1,7 @@
+Specification-Title: Buildmagic
+Specification-Version: 2.0
+Specification-Vendor: JBoss, a Division of Red Hat, Inc (http://www.jboss.org)
+Implementation-Title: Buildmagic ()
+Implementation-Version: 2.0.2 (200812181629)
+Implementation-Vendor: JBoss, a Division of Red Hat, Inc
+Source-Repository-URL: http://anonsvn.jboss.org/repos/labs/labs/jbossbuild/buildmagic/tags/buildmagic-2.0.2
Added: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/org/jboss/buildmagic/test/HelloModule1.java
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/org/jboss/buildmagic/test/HelloModule1.java (rev 0)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/org/jboss/buildmagic/test/HelloModule1.java 2008-12-19 20:22:33 UTC (rev 24443)
@@ -0,0 +1,6 @@
+package org.jboss.buildmagic.test;
+
+public class HelloModule1
+{
+
+}
Property changes on: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module1/src/main/org/jboss/buildmagic/test/HelloModule1.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/build.xml
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/build.xml (rev 0)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/build.xml 2008-12-19 20:22:33 UTC (rev 24443)
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+ <!ENTITY buildmagic SYSTEM "../tools/buildmagic/etc/buildmagic.ent">
+ <!ENTITY tools SYSTEM "../tools/buildmagic/etc/tools.ent">
+ <!ENTITY modules SYSTEM "../tools/buildmagic/etc/modules.ent">
+ <!ENTITY defaults SYSTEM "../tools/buildmagic/etc/defaults.ent">
+]>
+
+<!-- $Id$ -->
+
+<!--+======================================================================+-->
+<!--| JBoss (The OpenSource J2EE WebOS) Build File |-->
+<!--| |-->
+<!--| Distributable under LGPL license. |-->
+<!--| See terms of license at http://www.gnu.org. |-->
+<!--| |-->
+<!--| This file has been designed to work with the 'tools' module and |-->
+<!--| Buildmagic extentions. |-->
+<!--+======================================================================+-->
+
+<project name="Buildmagic/Tasks" default="main">
+
+ <!--+====================================================================+-->
+ <!--| Setup |-->
+ <!--| |-->
+ <!--| Include the common build elements. |-->
+ <!--| |-->
+ <!--| This defines several different targets, properties and paths. |-->
+ <!--| It also sets up the basic extention tasks amoung other things. |-->
+ <!--+====================================================================+-->
+
+ &buildmagic;
+ &defaults;
+ &tools;
+
+ <target name="resolve-compile-dependencies" description="dependency placeholder">
+ <path id="library.classpath">
+ </path>
+ </target>
+
+ <target name="resolve-test-dependencies" description="dependency placeholder">
+ <path id="test.dependencies.classpath">
+ </path>
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Initialization |-->
+ <!--| |-->
+ <!--| Initialize the build system. Other targets should depend on |-->
+ <!--| 'init'. |-->
+ <!--+====================================================================+-->
+
+ <target name="init" depends="_buildmagic:init">
+
+ </target>
+
+
+ <!--+====================================================================+-->
+ <!--| Configuration |-->
+ <!--| |-->
+ <!--| This target is invoked by the Buildmagic initialization logic |-->
+ <!--| and should contain module specific configuration elements. |-->
+ <!--+====================================================================+-->
+
+ <target name="configure" unless="configure.disable">
+
+ <!-- Module name(s) & version -->
+ <property name="module.name" value="module2"/>
+ <property name="module.Name" value="Module2"/>
+
+ <!--+================================+-->
+ <!--| Library & Module Dependencies. |-->
+ <!--+================================+-->
+
+ <!-- Configure modules -->
+ <!--<path id="jboss.common.root" path="../common"/>
+ <property name="jboss.common.root" value="../common"/>-->
+
+
+ <!--<call target="configure-modules"/>
+ <path id="dependentmodule.classpath">
+ <path refid="jboss.common.classpath"/>
+ </path>-->
+
+ <!--+=======================================+-->
+ <!--| Override any default properties here. |-->
+ <!--+=======================================+-->
+
+ <!-- We need the Ant RT classes -->
+ <property name="javac.include.ant.runtime" value="true"/>
+
+ <!-- Configure defaults & build tools -->
+ <call target="configure-defaults"/>
+ <call target="configure-tools"/>
+
+ <!--+=======================================+-->
+ <!--| Define module specific elements here. |-->
+ <!--+=======================================+-->
+
+ </target>
+
+
+ <!--+====================================================================+-->
+ <!--| Compile |-->
+ <!--| |-->
+ <!--| This target should depend on other compile-* targets for each |-->
+ <!--| different type of compile that needs to be performed, short of |-->
+ <!--| documentation compiles. |-->
+ <!--+====================================================================+-->
+
+ <target name="compile"
+ description="Compile all source files."
+ depends="resolve-compile-dependencies,
+ _default:compile-classes,
+ _default:compile-etc,
+ _default:compile-resources">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Test |-->
+ <!--| |-->
+ <!--| Run unit tests |-->
+ <!--+====================================================================+-->
+
+ <target name="test"
+ description="Run junit tests."
+ depends="compile, resolve-test-dependencies">
+
+ <mkdir dir="${build.test}"/>
+ <mkdir dir="${build.reports}"/>
+
+ <javac srcdir="${source.test}"
+ destdir="${build.test}"
+ debug="on">
+ <classpath>
+ <pathelement location="${build.classes}"/>
+ <path refid="test.dependencies.classpath"/>
+ </classpath>
+ </javac>
+
+ <junit printsummary="yes" haltonfailure="yes">
+ <classpath>
+ <pathelement location="${build.test}"/>
+ <pathelement location="${build.classes}"/>
+ <path refid="test.dependencies.classpath"/>
+ </classpath>
+
+ <formatter type="plain"/>
+
+ <!--<test name="my.test.TestCase" haltonfailure="no" outfile="result">
+ <formatter type="xml"/>
+ </test>-->
+
+ <batchtest fork="yes" todir="${build.reports}">
+ <fileset dir="${source.test}">
+ <include name="**/*Test*.java"/>
+ <exclude name="**/AllTests.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+
+ <!--+====================================================================+-->
+ <!--| Generate Output |-->
+ <!--| |-->
+ <!--| Generates the target output for this module. Target output is |-->
+ <!--| the output which is ment to be released or used by external |-->
+ <!--| modules. |-->
+ <!--+====================================================================+-->
+
+ <target name="output"
+ description="Generate all target output."
+ depends="compile, test">
+
+ <mkdir dir="${build.lib}"/>
+
+ <!-- buildmagic-tasks.jar -->
+ <jar jarfile="${build.lib}/module2.jar" manifest="${build.etc}/default.mf">
+ <fileset dir="${build.classes}">
+ <include name="**"/>
+ </fileset>
+ </jar>
+
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Misc. |-->
+ <!--| |-->
+ <!--| Standard targets and psuedo-targets. |-->
+ <!--+====================================================================+-->
+
+ <target name="clean" depends="_buildmagic:clean">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <target name="clobber" depends="_buildmagic:clobber">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!-- main, all, most and help are primary psuedo-targets -->
+ <target name="main" depends="most"/>
+ <target name="all"/>
+ <target name="most" depends="output"/>
+ <target name="help"/>
+
+</project>
Property changes on: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/build.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/etc/default.mf
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/etc/default.mf (rev 0)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/etc/default.mf 2008-12-19 20:22:33 UTC (rev 24443)
@@ -0,0 +1,7 @@
+Specification-Title: Buildmagic
+Specification-Version: 2.0
+Specification-Vendor: JBoss, a Division of Red Hat, Inc (http://www.jboss.org)
+Implementation-Title: Buildmagic ()
+Implementation-Version: 2.0.2 (200812181629)
+Implementation-Vendor: JBoss, a Division of Red Hat, Inc
+Source-Repository-URL: http://anonsvn.jboss.org/repos/labs/labs/jbossbuild/buildmagic/tags/buildmagic-2.0.2
Added: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/org/jboss/buildmagic/test/HelloModule2.java
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/org/jboss/buildmagic/test/HelloModule2.java (rev 0)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/org/jboss/buildmagic/test/HelloModule2.java 2008-12-19 20:22:33 UTC (rev 24443)
@@ -0,0 +1,10 @@
+package org.jboss.buildmagic.test;
+
+public class HelloModule2
+{
+
+ public static void main ( String [] args )
+ {
+ //HelloModule1 mod1 = new HelloModule1();
+ }
+}
Property changes on: labs/jbossbuild/buildmagic/trunk/tasks/src/it/simple-external-build/module2/src/main/org/jboss/buildmagic/test/HelloModule2.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/ExecuteModules.java
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/ExecuteModules.java 2008-12-19 19:18:33 UTC (rev 24442)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/ExecuteModules.java 2008-12-19 20:22:33 UTC (rev 24443)
@@ -53,54 +53,45 @@
*/
public class ExecuteModules extends Task
{
- /*
- static {
- Runtime.getRuntime().addShutdownHook(new Thread("Buildmagic Shutdown Hook")
- {
- public void run() {
- // Halt when ask'd to shutdown
- Runtime.getRuntime().halt(-1);
- }
- });
- }
- */
/** Instance logger. */
protected final TaskLogger log = new TaskLogger(this);
/** The target name to execute. */
- protected String target;
+ private String target;
/** The buildfile to use. */
- protected String antfile;
+ private String antfile;
/** The list of module names to exectue. */
- protected List modules;
+ private List moduleNames;
/** The root directory that contains modules. */
- protected String root;
+ private String root;
/** User properties that will be passed to each module. */
- protected List properties = new LinkedList();
+ private List properties = new LinkedList();
/** A internal project to hold property defs. */
- protected Project _project;
+ private Project internalProject;
- protected String moduleProperty = "module";
+ private String moduleProperty = "module";
+
+ private String modulesReference = "modules";
- protected String targetProperty = "target";
+ private String targetProperty = "target";
/** Skip over modules that do not exist. */
- protected boolean skipMissing = false;
+ private boolean skipMissing = false;
- protected boolean inheritAll = false;
+ private boolean inheritAll = false;
/** Tasks to echo some output before and after each module executes. */
- protected List headers = new LinkedList();
+ private List headers = new LinkedList();
- protected List footers = new LinkedList();
+ private List footers = new LinkedList();
- protected List beforeHooks = new LinkedList();
+ private List beforeHooks = new LinkedList();
protected List afterHooks = new LinkedList();
@@ -126,6 +117,16 @@
}
}
+ public String getModulesReference()
+ {
+ return modulesReference;
+ }
+
+ public void setModulesReference(String modulesReference)
+ {
+ this.modulesReference = modulesReference;
+ }
+
public void setModuleproperty(String property)
{
moduleProperty = property;
@@ -144,11 +145,11 @@
/** Setup the internal project. */
public void init()
{
- _project = new Project();
- _project.setJavaVersionProperty();
+ internalProject = new Project();
+ internalProject.setJavaVersionProperty();
Map tasks = getProject().getTaskDefinitions();
- _project.addTaskDefinition("property", (Class) tasks.get("property"));
- _project.addTaskDefinition("echo", (Class) tasks.get("echo"));
+ internalProject.addTaskDefinition("property", (Class) tasks.get("property"));
+ internalProject.addTaskDefinition("echo", (Class) tasks.get("echo"));
}
/** Re-initialize the internal project. */
@@ -160,7 +161,7 @@
for (int i = 0; i < properties.size(); i++)
{
Property a = (Property) properties.get(i);
- Property b = (Property) _project.createTask("property");
+ Property b = (Property) internalProject.createTask("property");
copy(a, b);
properties.set(i, b);
}
@@ -204,10 +205,10 @@
{
names = ResolveProperties.subst(names, getProject(), true);
StringTokenizer stok = new StringTokenizer(names, ",");
- modules = new LinkedList();
+ moduleNames = new LinkedList();
while (stok.hasMoreTokens())
{
- modules.add(stok.nextToken().trim());
+ moduleNames.add(stok.nextToken().trim());
}
}
@@ -229,37 +230,45 @@
*/
public void execute() throws BuildException
{
- try
+ // need the root directory
+ if (root == null)
{
- // need at least one module name
- if (modules == null || modules.size() == 0)
- {
- throw new BuildException("No module names were specified", getLocation());
- }
+ throw new BuildException("Root directory not specified", getLocation());
+ }
- // need the root directory
- if (root == null)
- {
- throw new BuildException("Root directory not specified", getLocation());
- }
+ List modules = (List) getProject().getReference(this.modulesReference);
+ if (modules != null)
+ {
Iterator iter = modules.iterator();
while (iter.hasNext())
{
- executeModule((String) iter.next());
+ executeModule((Module) iter.next());
}
}
- finally
+ else if (moduleNames != null)
{
- // help the gc
- _project = null;
+ Iterator iter = moduleNames.iterator();
+ while (iter.hasNext())
+ {
+ executeModule((String) iter.next(), false);
+ }
}
+ else
+ {
+ throw new BuildException("No module names were specified", getLocation());
+ }
}
+ public void executeModule(Module module)
+ {
+ executeModule( module.getName(), module.isExternalBuild() );
+ }
+
/**
* Execute a single module.
*/
- protected void executeModule(final String module) throws BuildException
+ public void executeModule(final String module, final boolean externalBuild) throws BuildException
{
this.module = module;
@@ -277,7 +286,7 @@
System.out.println("Setting propery - " + moduleProperty + ":" + module);
p.execute();*/
// project.setUserProperty(moduleProperty, module);
- _project.setProperty(moduleProperty, module);
+ internalProject.setProperty(moduleProperty, module);
// add a property for the target of the module (our name that is)
String tempTargetName = (target == null) ? "<default>" : target;
@@ -288,7 +297,7 @@
copy(p, ant.createProperty());
p.execute();*/
// project.setUserProperty(targetProperty, tempTargetName);
- _project.setProperty(targetProperty, tempTargetName);
+ internalProject.setProperty(targetProperty, tempTargetName);
ant.setLocation(getLocation());
tempTargetName = ResolveProperties.subst(root, getProject());
@@ -326,8 +335,7 @@
// see if this is a valid ant file
try
{
- if (ant.getBuildFile() != null)
- ;
+ ant.getBuildFile();
}
catch (BuildException e)
{
@@ -383,7 +391,10 @@
printHeading(headers);
log.verbose("Executing " + targetName + " in module '" + module + "'...");
- ant.execute();
+ if ( !externalBuild )
+ {
+ ant.execute();
+ }
log.verbose("Finished with " + targetName + " in module '" + module + "'...");
printHeading(footers);
@@ -433,12 +444,12 @@
/** Create a nested property. */
public Property createProperty(List list)
{
- if (_project == null)
+ if (internalProject == null)
{
reinit();
}
- Property prop = (Property) _project.createTask("property");
+ Property prop = (Property) internalProject.createTask("property");
if (list != null)
{
@@ -451,7 +462,7 @@
/** Create a nested header. */
public Echo createHeader()
{
- if (_project == null)
+ if (internalProject == null)
{
reinit();
}
@@ -464,7 +475,7 @@
/** Create a nested footer. */
public Echo createFooter()
{
- if (_project == null)
+ if (internalProject == null)
{
reinit();
}
@@ -486,10 +497,10 @@
Map props = getProject().getUserProperties();
expr = ResolveProperties.subst(expr, props, false);
- props = _project.getUserProperties();
+ props = internalProject.getUserProperties();
expr = ResolveProperties.subst(expr, props, false);
- props = _project.getProperties();
+ props = internalProject.getProperties();
expr = ResolveProperties.subst(expr, props, false);
return expr;
Added: labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/Module.java
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/Module.java (rev 0)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/Module.java 2008-12-19 20:22:33 UTC (rev 24443)
@@ -0,0 +1,64 @@
+package org.jboss.tools.buildmagic.task.module;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+public class Module implements NamedElement
+{
+ private String name;
+
+ private List dependencies = new LinkedList();
+
+ private boolean externalBuild;
+
+ public Module( )
+ {
+
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public boolean isExternalBuild()
+ {
+ return externalBuild;
+ }
+
+ public void setExternalBuild(boolean externalBuild)
+ {
+ this.externalBuild = externalBuild;
+ }
+
+ public void addDependency(String name)
+ {
+ dependencies.add(name);
+ }
+
+ public void setDependencies(String dependencies)
+ {
+ StringTokenizer stok = new StringTokenizer(dependencies, ",");
+ while (stok.hasMoreTokens())
+ {
+ addDependency(stok.nextToken().trim());
+ }
+ }
+
+ public List getDependencies()
+ {
+ return this.dependencies;
+ }
+
+ public String toString()
+ {
+ return "{ name=" + name + ", depends=" + dependencies + " }";
+ }
+
+}
Property changes on: labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/Module.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/ModuleConfig.java
===================================================================
--- labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/ModuleConfig.java 2008-12-19 19:18:33 UTC (rev 24442)
+++ labs/jbossbuild/buildmagic/trunk/tasks/src/main/org/jboss/tools/buildmagic/task/module/ModuleConfig.java 2008-12-19 20:22:33 UTC (rev 24443)
@@ -23,13 +23,13 @@
package org.jboss.tools.buildmagic.task.module;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.StringTokenizer;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
-
import org.jboss.tools.buildmagic.task.MissingAttributeException;
import org.jboss.tools.buildmagic.task.MissingElementException;
import org.jboss.tools.buildmagic.task.util.ConditionalExecution;
@@ -47,22 +47,25 @@
public class ModuleConfig extends Task
{
/** Instance logger. */
- protected TaskLogger log = new TaskLogger(this);
+ private TaskLogger log = new TaskLogger(this);
/** The list of modules. */
- protected List modules = new LinkedList();
+ private LinkedHashMap modules = new LinkedHashMap();
/** The list of groups. */
- protected List groups = new LinkedList();
+ private List groups = new LinkedList();
/** The name of the property that is to be set. */
- protected String property = "modules";
+ private String property = "modules";
- /** The selected group. */
- protected String selected;
+ /** The name of the reference containing the modules. */
+ //private String modulesReference = "modules";
+ /** The selected groups. */
+ private String selected;
+
/** The conditional execution helper. */
- protected ConditionalExecution cond = new ConditionalExecution(this);
+ private ConditionalExecution cond = new ConditionalExecution(this);
/** Set the property name. */
public void setProperty(String property)
@@ -70,6 +73,12 @@
this.property = property;
}
+ /** Set the property name. */
+ /*public void setModulesReference(String modulesReference)
+ {
+ this.modulesReference = modulesReference;
+ }*/
+
/** Set the selected group. */
public void setSelected(String selected)
{
@@ -77,17 +86,15 @@
}
/** Create a module. */
- public Module createModule()
+ public void addConfiguredModule(Module module)
{
- Module m = new Module(this);
- modules.add(m);
- return m;
+ modules.put(module.getName(), module);
}
/** Create a group. */
public Group createGroup()
{
- Group g = new Group(this);
+ Group g = new Group( this );
groups.add(g);
return g;
}
@@ -106,7 +113,7 @@
public void execute() throws BuildException
{
if (selected == null)
- throw new MissingAttributeException("name", this);
+ throw new MissingAttributeException("selected", this);
if (modules.size() == 0)
throw new MissingElementException("module", this);
if (groups.size() == 0)
@@ -115,7 +122,7 @@
if (!cond.canExecute())
return;
- List list = new LinkedList();
+ List moduleList = new LinkedList();
StringTokenizer stok = new StringTokenizer(selected, ",");
while (stok.hasMoreTokens())
{
@@ -131,28 +138,29 @@
if (allModules == null)
throw new BuildException("Invalid group: " + name);
- list.addAll(allModules);
+ moduleList.addAll(allModules);
}
- log.debug("full module list: " + list);
+ log.debug("full module list: " + moduleList);
- String value = generatePropertyValue(list);
- getProject().setProperty(property, value);
- log.verbose("Module list: " + value);
+ String moduleListString = generatePropertyValue(moduleList);
+ getProject().setProperty(property, moduleListString);
+ getProject().addReference(property, moduleList);
+ log.verbose("Module list: " + moduleListString);
}
/**
- * Generate the property value from the given module list.
+ * Generate a comma separated list of the modules.
*/
- protected String generatePropertyValue(List list)
+ protected String generatePropertyValue(List moduleList)
{
StringBuffer buff = new StringBuffer();
- Iterator iter = list.iterator();
+ Iterator iter = moduleList.iterator();
while (iter.hasNext())
{
Module mod = (Module) iter.next();
if (mod == null)
- throw new BuildException("Null module in list: " + list);
+ throw new BuildException("Null module in list: " + moduleList);
buff.append(mod.getName());
if (iter.hasNext())
@@ -188,7 +196,7 @@
*/
protected Module getModule(String name)
{
- return (Module) getNamedElement(modules, name);
+ return (Module) modules.get( name );
}
/**
@@ -204,73 +212,15 @@
/////////////////////////////////////////////////////////////////////////
/**
- * A module element.
- */
- protected class Module implements NamedElement
- {
- private String name;
-
- private Task parentTask;
-
- private List depends = new LinkedList();
-
- private boolean externalBuild;
-
- public Module( Task parentTask )
- {
- parentTask = parentTask;
- }
-
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- public boolean isExternalBuild()
- {
- return externalBuild;
- }
-
- public void setExternalBuild(boolean externalBuild)
- {
- this.externalBuild = externalBuild;
- }
-
- public void addDependency(String name)
- {
- depends.add(name);
- }
-
- public void setDepends(String depends)
- {
- StringTokenizer stok = new StringTokenizer(depends, ",", false);
- while (stok.hasMoreTokens())
- {
- addDependency(stok.nextToken().trim());
- }
- }
-
- public String toString()
- {
- return "{ name=" + name + ", depends=" + depends + " }";
- }
- }
-
- /**
* A group element.
*/
protected class Group implements NamedElement
{
/** The list of includes. */
- protected List includes = new LinkedList();
+ private List includes = new LinkedList();
/** The conditional execution helper. */
- protected ConditionalExecution cond;
+ private ConditionalExecution cond;
private Task parentTask;
Modified: labs/jbossbuild/buildmagic/trunk/tools/buildmagic/lib/buildmagic-tasks.jar
===================================================================
(Binary files differ)
More information about the jboss-svn-commits
mailing list