leosimons 2003/09/04 04:35:41
Modified: framework/impl project.properties
Added: framework build.xml maven-common-gump-build-reactor.xml
maven-common-gump-build.xml project.properties
framework/api build.xml project.properties
framework/impl build.xml
Log:
adding in support for gump integration. Any
project that is api/impl seperated like this
one should be able to copy over
build.xml
project.properties
api/build.xml
api/project.properties
impl/build.xml
impl/project.properties
to be able to fully participate in gump builds,
both as individual projects (blah-api and
blah-impl) and as a combined project
(blah).
Will be testing tonight.
Revision Changes Path
1.1 avalon-sandbox/framework/build.xml
Index: build.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project default="warning" name="Gump Build Support" basedir=".">
<property file="${basedir}/project.properties"/>
<target name="need-for-common-build" unless="avalon.buildsystem.available">
<fail>
===================================================================
BUILD SYSTEM FAILURE!
===================================================================
a required file, ${avalon.buildsystem}/maven-common-gump-build-reactor.xml,
cannot be found. Try setting the avalon.buildsystem property in
project.properties to the correct location.
</fail>
</target>
<target name="delegate">
<available file="${avalon.buildsystem}/maven-common-gump-build-reactor.xml"
property="avalon.buildsystem.available"/>
<antcall target="need-for-common-build"/>
<ant inheritRefs="true" target="avalon:${target}"
antfile="${avalon.buildsystem}/maven-common-gump-build-reactor.xml" inheritAll="true"/>
</target>
<target name="warning">
<antcall target="delegate">
<param name="target" value="warning"/>
</antcall>
</target>
<target name="jar">
<antcall target="delegate">
<param name="target" value="jar"/>
</antcall>
</target>
<target name="javadocs">
<antcall target="delegate">
<param name="target" value="javadocs"/>
</antcall>
</target>
<target name="dist">
<antcall target="delegate">
<param name="target" value="dist"/>
</antcall>
</target>
<target name="clean">
<antcall target="delegate">
<param name="target" value="distclean"/>
</antcall>
</target>
</project>
1.1 avalon-sandbox/framework/maven-common-gump-build-reactor.xml
Index: maven-common-gump-build-reactor.xml
===================================================================
<?xml version="1.0"?>
<!-- this ant buildfile provides base functionality for gump
integration. You should not normally have to modify this
by hand. -->
<project name="Gump Build Support" default="warning" basedir=".">
<!-- note the lack of property file inclusion. You should
do that from the script which calls this file. -->
<target name="avalon:warning" unless="do.not.warn">
<echo>
=======================================================================
WARNING!
This buildfile is only here for gump integration. Please use
maven (http://maven.apache.org/) for normal builds.
=======================================================================
</echo>
</target>
<target name="avalon:debug" unless="do.not.debug">
<echo>
=======================================================================
DEBUG INFO
maven.src.dir = ${maven.src.dir}
maven.build.dir = ${maven.build.dir}
maven.compile.debug = ${maven.compile.debug}
maven.compile.deprecation = ${maven.compile.deprecation}
maven.compile.optimize = ${maven.compile.optimize}
project.name = ${project.name}
project.version = ${project.version}
project.copyright.year = ${project.copyright.year}
java sources = ${maven.src.dir}/java
java classes = ${maven.build.dir}/classes
jarfile = ${maven.build.dir}/${project.name}-${project.version}.jar
javadocs = ${maven.build.dir}/docs/apidocs
junitreports = ${maven.build.dir}/docs/junitreports
=======================================================================
</echo>
</target>
<target name="avalon:warn-project.name" unless="project.name.set">
<echo>
=======================================================================
WARNING!
The property 'project.name' has not been set. This will result in a
jar file with a rather dumb name, being
${maven.build.dir}/${project.name}-${project.version}.jar
To fix this, add a property to the gump build definition or the
properties file for the current component.
=======================================================================
</echo>
</target>
<target name="avalon:init">
<antcall target="avalon:warning"/>
<!-- defaults -->
<property name="maven.src.dir" value="${basedir}/src"/>
<property name="maven.build.dir" value="${basedir}/target"/>
<property name="maven.compile.debug" value="on"/>
<property name="maven.compile.optimize" value="off"/>
<property name="maven.compile.deprecation" value="off"/>
<property name="maven.junit.fork" value="off"/>
<property name="maven.junit.dir" value="${basedir}"/>
<property name="maven.junit.usefile" value="true"/>
<property name="project.name" value="some-nameless-gump-built-component"/>
<tstamp>
<format property="project.version" pattern="yyyyMMdd"/>
</tstamp>
<property name="project.copyright.year" value="1997-2003"/>
<condition property="project.name.set">
<isset property="project.name"/>
</condition>
<antcall target="avalon:warn-project.name"/>
<available file="${basedir}/src/java" property="java.src.present"/>
<available file="${basedir}/src/test" property="test.src.present"/>
<condition property="no.sources.available">
<and>
<not><isset property="java.src.present"/></not>
<not><isset property="test.src.present"/></not>
</and>
</condition>
<antcall target="avalon:debug"/>
</target>
<target name="avalon:compile" depends="avalon:init">
<antcall target="avalon:reactor">
<param name="target" value="jar"/>
</antcall>
<echo>
=======================================================================
Gathering sources and classes from subprojects
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}"/>
<mkdir dir="${maven.build.dir}/classes"/>
<copy todir="${maven.build.dir}/classes">
<fileset dir="api/target/classes"/>
<fileset dir="impl/target/classes"/>
</copy>
<mkdir dir="${maven.build.dir}/src"/>
<copy todir="${maven.build.dir}/src">
<fileset dir="api/src/java"/>
<fileset dir="impl/src/java"/>
</copy>
</target>
<target name="avalon:test" depends="avalon:compile">
<echo>
=======================================================================
Consolidating test reports
=======================================================================
</echo>
<!-- note: this completely deviates from the approach maven
takes to generating the junit reports and stores them
in a different location. -->
<mkdir dir="${maven.build.dir}/docs/junitreports"/>
<junitreport todir="${maven.build.dir}/docs/junitreports">
<fileset dir="api/target/test-reports">
<include name="TEST-*.xml"/>
</fileset>
<fileset dir="impl/target/test-reports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${maven.build.dir}/docs/junitreports"/>
</junitreport>
</target>
<target name="avalon:jar" depends="avalon:init,avalon:compile,avalon:test">
<echo>
=======================================================================
Generating combined jar
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}/classes"/>
<jar destfile="${maven.build.dir}/${project.name}-${project.version}.jar"
basedir="${maven.build.dir}/classes"/>
</target>
<target name="avalon:javadocs" depends="avalon:init,avalon:compile">
<antcall target="avalon:reactor">
<param name="target" value="javadocs"/>
</antcall>
<echo>
=======================================================================
Generating combined javadocs
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}/docs"/>
<mkdir dir="${maven.build.dir}/docs/apidocs"/>
<mkdir dir="${maven.build.dir}/classes"/><!-- to ensure <classpath/> works
-->
<property name="copyright"
value="Copyright &copy; ${project.copyright.year} Apache Software
Foundation. All Rights Reserved." />
<property name="title" value="Avalon ${project.name} API"/>
<javadoc
sourcepath="${maven.build.dir}/src"
packagenames="org.apache.*"
destdir="${maven.build.dir}/docs/apidocs"
windowtitle="${title}"
doctitle="${title}"
bottom="${copyright}">
<link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
<link href="http://avalon.apache.org/framework/api/"/>
<classpath>
<path location="${maven.build.dir}/classes"/>
</classpath>
</javadoc>
</target>
<target name="avalon:dist" depends="avalon:init,avalon:jar">
<antcall target="avalon:reactor">
<param name="target" value="dist"/>
</antcall>
<mkdir dir="${maven.build.dir}"/>
<mkdir dir="${maven.build.dir}/${project.name}-${project.version}"/>
<mkdir dir="${maven.build.dir}/dist"/>
<echo>
=======================================================================
Building Source/Binary Distribution
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}/${project.name}-${project.version}/bin"/>
<copy todir="${maven.build.dir}/${project.name}-${project.version}/bin">
<fileset dir="${maven.build.dir}">
<include name="*.jar"/>
<include name="*.txt"/>
<include name="*.zip"/>
<include name="docs"/>
</fileset>
<fileset dir="api/target/">
<include name="*.jar"/>
<include name="*.zip"/>
</fileset>
<fileset dir="impl/target/">
<include name="*.jar"/>
<include name="*.zip"/>
</fileset>
</copy>
<zip
destfile="${maven.build.dir}/${project.name}-${project.version}/bin/scr.zip">
<zipfileset dir="${maven.build.dir}/src"/>
</zip>
<zip
destfile="${maven.build.dir}/dist/${project.name}-${project.version}.zip">
<zipfileset
dir="${maven.build.dir}/${project.name}-${project.version}/bin"
prefix="${project.name}-${project.version}"/>
</zip>
</target>
<target name="avalon:distclean" depends="avalon:init">
<delete dir="${maven.build.dir}"/>
<delete dir="api/target"/>
<delete dir="impl/target"/>
</target>
<target name="avalon:reactor"
depends="avalon:init">
<echo>
=======================================================================
Building the api/ and impl/ subprojects, target ${target}
=======================================================================
</echo>
<condition property="reactor.target.isset">
<isset property="target"/>
</condition>
<available file="api/build.xml" property="api.proj.present"/>
<available file="impl/build.xml" property="impl.proj.present"/>
<antcall target="avalon:reactor-run-api"/>
<antcall target="avalon:reactor-run-impl"/>
</target>
<target name="avalon:reactor-run-api" if="api.proj.present">
<antcall target="avalon:reactor-run">
<param name="dir" value="api"/>
</antcall>
</target>
<target name="avalon:reactor-run-impl" if="impl.proj.present">
<antcall target="avalon:reactor-run">
<param name="dir" value="impl"/>
</antcall>
</target>
<target name="avalon:reactor-run" if="reactor.target.isset">
<ant dir="${dir}" target="${target}" inheritAll="false"/>
</target>
</project>
1.1 avalon-sandbox/framework/maven-common-gump-build.xml
Index: maven-common-gump-build.xml
===================================================================
<?xml version="1.0"?>
<!-- this ant buildfile provides base functionality for gump
integration. You should not normally have to modify this
by hand. -->
<project name="Gump Build Support" default="warning" basedir=".">
<!-- note the lack of property file inclusion. You should
do that from the script which calls this file. -->
<target name="avalon:warning" unless="do.not.warn">
<echo>
=======================================================================
WARNING!
This buildfile is only here for gump integration. Please use
maven (http://maven.apache.org/) for normal builds.
=======================================================================
</echo>
</target>
<target name="avalon:debug" unless="do.not.debug">
<echo>
=======================================================================
DEBUG INFO
maven.src.dir = ${maven.src.dir}
maven.build.dir = ${maven.build.dir}
maven.compile.debug = ${maven.compile.debug}
maven.compile.deprecation = ${maven.compile.deprecation}
maven.compile.optimize = ${maven.compile.optimize}
project.name = ${project.name}
project.version = ${project.version}
project.copyright.year = ${project.copyright.year}
java sources = ${maven.src.dir}/java
java classes = ${maven.build.dir}/classes
jarfile = ${maven.build.dir}/${project.name}-${project.version}.jar
javadocs = ${maven.build.dir}/docs/apidocs
junitreports = ${maven.build.dir}/docs/junitreports
=======================================================================
</echo>
</target>
<target name="avalon:warn-project.name" unless="project.name.set">
<echo>
=======================================================================
WARNING!
The property 'project.name' has not been set. This will result in a
jar file with a rather dumb name, being
${maven.build.dir}/${project.name}-${project.version}.jar
To fix this, add a property to the gump build definition or the
properties file for the current component.
=======================================================================
</echo>
</target>
<target name="avalon:warn-avail-java-src" unless="java.src.present">
<echo>
=======================================================================
NOTE!
The directory
${maven.src.dir}/java
does not exist. This means the jar that will be created will be
empty.
=======================================================================
</echo>
</target>
<target name="avalon:warn-avail-test-src" unless="test.src.present">
<echo>
=======================================================================
NOTE!
The directory
${maven.src.dir}/test
does not exist. This means no unit tests will be run.
=======================================================================
</echo>
</target>
<target name="avalon:warn-avail-no-sources" if="no.sources.available">
<fail>
=======================================================================
ERROR!
This project does not contain any java source files in
${maven.src.dir}/java or
${maven.src.dir}/test or
that means it is not possible to generate any classes, jars or
javadocs.
=======================================================================
</fail>
</target>
<target name="avalon:warn-avail">
<antcall target="avalon:warn-avail-no-sources"/>
<antcall target="avalon:warn-avail-java-src"/>
<antcall target="avalon:warn-avail-test-src"/>
</target>
<target name="avalon:init">
<antcall target="avalon:warning"/>
<!-- defaults -->
<property name="maven.src.dir" value="${basedir}/src"/>
<property name="maven.build.dir" value="${basedir}/target"/>
<property name="maven.compile.debug" value="on"/>
<property name="maven.compile.optimize" value="off"/>
<property name="maven.compile.deprecation" value="off"/>
<property name="maven.junit.fork" value="off"/>
<property name="maven.junit.dir" value="${basedir}"/>
<property name="maven.junit.usefile" value="true"/>
<property name="project.name" value="some-nameless-gump-built-component"/>
<tstamp>
<format property="project.version" pattern="yyyyMMdd"/>
</tstamp>
<property name="project.copyright.year" value="1997-2003"/>
<condition property="project.name.set">
<isset property="project.name"/>
</condition>
<antcall target="avalon:warn-project.name"/>
<available file="${basedir}/src/java" property="java.src.present"/>
<available file="${basedir}/src/test" property="test.src.present"/>
<condition property="no.sources.available">
<and>
<not><isset property="java.src.present"/></not>
<not><isset property="test.src.present"/></not>
</and>
</condition>
<antcall target="avalon:debug"/>
<antcall target="avalon:warn-avail"/>
</target>
<target name="avalon:jar"
depends="avalon:init, avalon:java-compile, avalon:test, avalon:regular-jar"/>
<target name="avalon:java-compile" if="java.src.present"
depends="avalon:init">
<echo>
=======================================================================
Compiling Sources
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}"/>
<mkdir dir="${maven.build.dir}/classes"/>
<javac
destdir="${maven.build.dir}/classes"
excludes="**/package.html"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}">
<src>
<pathelement path="${maven.src.dir}/java"/>
</src>
</javac>
<mkdir dir="${maven.build.dir}/src"/>
<copy todir="${maven.build.dir}/src">
<fileset dir="${maven.src.dir}/java"/>
</copy>
</target>
<target name="avalon:test" if="test.src.present"
depends="avalon:init,avalon:java-compile">
<echo>
=======================================================================
Compiling Tests
======================================================================
</echo>
<mkdir dir="${maven.build.dir}/test-classes"/>
<mkdir dir="${maven.build.dir}/classes"/><!-- to ensure <classpath/> works
-->
<javac
destdir="${maven.build.dir}/test-classes"
excludes="**/package.html"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}">
<src>
<pathelement path="${maven.src.dir}/test"/>
</src>
<classpath>
<pathelement path="${maven.build.dir}/classes"/>
</classpath>
</javac>
<echo>
=======================================================================
Running tests
=======================================================================
</echo>
<taskdef
name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
<mkdir dir="${maven.build.dir}/test-reports"/>
<junit printSummary="yes"
failureProperty="maven.test.failure"
fork="${maven.junit.fork}"
dir="${maven.junit.dir}">
<sysproperty key="basedir" value="${basedir}"/>
<formatter type="xml"/>
<formatter type="plain" usefile="${maven.junit.usefile}"/>
<classpath>
<pathelement location="${maven.build.dir}/classes"/>
<pathelement location="${maven.build.dir}/test-classes"/>
</classpath>
<batchtest todir="${maven.build.dir}/test-reports">
<fileset dir="${maven.src.dir}/test">
<include name="**/*TestCase.java"/>
<exclude name="**/*Abstract*"/>
</fileset>
</batchtest>
</junit>
<echo>
=======================================================================
Generating test reports
=======================================================================
</echo>
<!-- note: this completely deviates from the approach maven
takes to generating the junit reports and stores them
in a different location. -->
<mkdir dir="${maven.build.dir}/docs/junitreports"/>
<junitreport todir="${maven.build.dir}/docs/junitreports">
<fileset dir="${maven.build.dir}/test-reports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${maven.build.dir}/docs/junitreports"/>
</junitreport>
</target>
<target name="avalon:regular-jar"
depends="avalon:init,avalon:java-compile">
<echo>
=======================================================================
Building jar
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}/classes"/>
<jar destfile="${maven.build.dir}/${project.name}-${project.version}.jar"
basedir="${maven.build.dir}/classes"/>
</target>
<target name="avalon:javadocs" depends="avalon:init,avalon:jar">
<mkdir dir="${maven.build.dir}/docs"/>
<mkdir dir="${maven.build.dir}/docs/apidocs"/>
<mkdir dir="${maven.build.dir}/classes"/><!-- to ensure <classpath/> works
-->
<property name="copyright"
value="Copyright &copy; ${project.copyright.year} Apache Software
Foundation. All Rights Reserved." />
<property name="title" value="Avalon ${project.name} API"/>
<javadoc
sourcepath="${maven.build.dir}/src"
packagenames="org.apache.*"
destdir="${maven.build.dir}/docs/apidocs"
windowtitle="${title}"
doctitle="${title}"
bottom="${copyright}">
<link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
<link href="http://avalon.apache.org/framework/api/"/>
<classpath>
<path location="${maven.build.dir}/classes"/>
</classpath>
</javadoc>
</target>
<target name="avalon:distclean">
<delete dir="${maven.build.dir}/${project.name}-${project.version}"/>
<delete dir="${maven.build.dir}/dist"/>
</target>
<target name="avalon:dist"
depends="avalon:init,avalon:distclean,avalon:jar,avalon:javadocs">
<mkdir dir="${maven.build.dir}"/>
<mkdir dir="${maven.build.dir}/${project.name}-${project.version}"/>
<mkdir dir="${maven.build.dir}/dist"/>
<echo>
=======================================================================
Building Binary Distribution
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}/${project.name}-${project.version}/bin"/>
<copy todir="${maven.build.dir}/${project.name}-${project.version}/bin">
<fileset dir="${maven.build.dir}">
<include name="*.jar"/>
<include name="*.txt"/>
<include name="*.zip"/>
<include name="docs"/>
</fileset>
</copy>
<zip
destfile="${maven.build.dir}/dist/${project.name}-${project.version}-bin.zip">
<zipfileset
dir="${maven.build.dir}/${project.name}-${project.version}/bin"
prefix="${project.name}-${project.version}"/>
</zip>
<echo>
=======================================================================
Building Source Distribution
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}/${project.name}-${project.version}/src"/>
<copy todir="${maven.build.dir}/${project.name}-${project.version}/src">
<fileset dir="${maven.src.dir}"/>
<fileset dir="${maven.build.dir}">
<include name="*.txt"/>
</fileset>
<fileset dir="${basedir}">
<include name="README*"/>
<include name="LICENSE*"/>
<include name="maven.*"/>
<include name="project.*"/>
</fileset>
</copy>
<zip
destfile="${maven.build.dir}/dist/${project.name}-${project.version}-src.zip">
<zipfileset
dir="${maven.build.dir}/${project.name}-${project.version}/src"
prefix="${project.name}-${project.version}"/>
</zip>
</target>
</project>
1.1 avalon-sandbox/framework/project.properties
Index: project.properties
===================================================================
maven.repo.remote = http://www.apache.org/dist/avalon/,http://www.ibiblio.org/maven/
maven.junit.fork = yes
#avalon.buildsystem = ${basedir}/../../avalon/buildsystem
avalon.buildsystem = ${basedir}
# gump integration
project.name=avalon-framework
do.not.debug=true
do.not.warn=true
1.1 avalon-sandbox/framework/api/build.xml
Index: build.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project default="warning" name="Gump Build Support" basedir=".">
<property file="${basedir}/project.properties"/>
<target name="need-for-common-build" unless="avalon.buildsystem.available">
<fail>
===================================================================
BUILD SYSTEM FAILURE!
===================================================================
a required file, ${avalon.buildsystem}/maven-common-gump-build.xml,
cannot be found. Try setting the avalon.buildsystem property in
project.properties to the correct location.
</fail>
</target>
<target name="delegate">
<available file="${avalon.buildsystem}/maven-common-gump-build.xml"
property="avalon.buildsystem.available"/>
<antcall target="need-for-common-build"/>
<ant inheritRefs="true" target="avalon:${target}"
antfile="${avalon.buildsystem}/maven-common-gump-build.xml" inheritAll="true"/>
</target>
<target name="warning">
<antcall target="delegate">
<param name="target" value="warning"/>
</antcall>
</target>
<target name="jar">
<antcall target="delegate">
<param name="target" value="jar"/>
</antcall>
</target>
<target name="javadocs">
<antcall target="delegate">
<param name="target" value="javadocs"/>
</antcall>
</target>
<target name="dist">
<antcall target="delegate">
<param name="target" value="dist"/>
</antcall>
</target>
</project>
1.1 avalon-sandbox/framework/api/project.properties
Index: project.properties
===================================================================
project.name=avalon-framework-api
avalon.buildsystem = ${basedir}/..
1.2 +3 -0 avalon-sandbox/framework/impl/project.properties
Index: project.properties
===================================================================
RCS file: /home/cvs/avalon-sandbox/framework/impl/project.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- project.properties 4 Sep 2003 10:15:02 -0000 1.1
+++ project.properties 4 Sep 2003 11:35:41 -0000 1.2
@@ -1 +1,4 @@
maven.junit.fork = yes
+
+project.name=avalon-framework-impl
+avalon.buildsystem = ${basedir}/..
\ No newline at end of file
1.1 avalon-sandbox/framework/impl/build.xml
Index: build.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project default="warning" name="Gump Build Support" basedir=".">
<property file="${basedir}/project.properties"/>
<target name="need-for-common-build" unless="avalon.buildsystem.available">
<fail>
===================================================================
BUILD SYSTEM FAILURE!
===================================================================
a required file, ${avalon.buildsystem}/maven-common-gump-build.xml,
cannot be found. Try setting the avalon.buildsystem property in
project.properties to the correct location.
</fail>
</target>
<target name="delegate">
<available file="${avalon.buildsystem}/maven-common-gump-build.xml"
property="avalon.buildsystem.available"/>
<antcall target="need-for-common-build"/>
<ant inheritRefs="true" target="avalon:${target}"
antfile="${avalon.buildsystem}/maven-common-gump-build.xml" inheritAll="true"/>
</target>
<target name="warning">
<antcall target="delegate">
<param name="target" value="warning"/>
</antcall>
</target>
<target name="jar">
<antcall target="delegate">
<param name="target" value="jar"/>
</antcall>
</target>
<target name="javadocs">
<antcall target="delegate">
<param name="target" value="javadocs"/>
</antcall>
</target>
<target name="dist">
<antcall target="delegate">
<param name="target" value="dist"/>
</antcall>
</target>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]