mcconnell 2004/03/19 02:06:01
Added: cornerstone/connection/api build.xml
cornerstone maven-common-gump-build.xml project.properties
Log:
dedicated to gump
Revision Changes Path
1.1 avalon-components/cornerstone/connection/api/build.xml
Index: build.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed 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 default="warning" name="Gump Build Support - DO NOT HAND-EDIT!!!"
basedir=".">
<property file="${basedir}/project.properties"/>
<property file="${basedir}/../project.properties"/>
<property file="${basedir}/../../project.properties"/>
<target name="need-for-common-build" unless="avalon.buildsystem.available">
<fail>
===================================================================
BUILD SYSTEM FAILURE!
===================================================================
a required file, ../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="../../maven-common-gump-build.xml"
property="avalon.buildsystem.available"/>
<antcall target="need-for-common-build"/>
<ant
inheritRefs="true"
target="avalon:${target}"
antfile="../../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-components/cornerstone/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
src.exclude.pattern = ${src.exclude.pattern}
test.exclude.pattern = ${test.exclude.pattern}
=======================================================================
</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-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-test-src"/>
</target>
<target name="avalon:init">
<antcall target="avalon:warning"/>
<antcall target="avalon:debug"/>
<!-- 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="src.exclude.pattern" value="**/package.html"/>
<property name="test.exclude.pattern" value="**/package.html"/>
<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>
<condition property="run.tests">
<and>
<not><isset property="do.not.test"/></not>
<isset property="test.src.present"/>
</and>
</condition>
<antcall target="avalon:warn-avail"/>
</target>
<target name="avalon:jar"
depends="avalon:init, avalon:api-compile, avalon:impl-compile,
avalon:java-compile, avalon:test, avalon:api-jar, avalon:impl-jar,
avalon:regular-jar"/>
<target name="avalon:java-compile" if="java.src.present"
depends="avalon:init,avalon:api-compile,avalon:impl-compile">
<echo>
=======================================================================
Compiling Sources
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}"/>
<mkdir dir="${maven.build.dir}/classes"/>
<mkdir dir="${maven.build.dir}/api-classes"/><!-- to ensure <classpath/>
works -->
<mkdir dir="${maven.build.dir}/impl-classes"/><!-- to ensure <classpath/>
works -->
<javac
destdir="${maven.build.dir}/classes"
excludes="${src.exclude.pattern}"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}">
<src>
<pathelement path="${maven.src.dir}/java"/>
<pathelement path="${maven.build.dir}/api-classes"/>
<pathelement path="${maven.build.dir}/impl-classes"/>
</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:api-compile" if="api.src.present"
depends="avalon:init">
<echo>
=======================================================================
Compiling API Sources
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}"/>
<mkdir dir="${maven.build.dir}/api-classes"/>
<javac
destdir="${maven.build.dir}/api-classes"
excludes="${src.exclude.pattern}"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}">
<src>
<pathelement path="${maven.src.dir}/api"/>
</src>
</javac>
<mkdir dir="${maven.build.dir}/classes"/>
<copy todir="${maven.build.dir}/classes">
<fileset dir="${maven.build.dir}/api-classes"/>
</copy>
<mkdir dir="${maven.build.dir}/src"/>
<copy todir="${maven.build.dir}/src">
<fileset dir="${maven.src.dir}/api"/>
</copy>
</target>
<target name="avalon:impl-compile" if="impl.src.present"
depends="avalon:init,avalon:api-compile">
<echo>
=======================================================================
Compiling Implementation Sources
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}"/>
<mkdir dir="${maven.build.dir}/impl-classes"/>
<mkdir dir="${maven.build.dir}/api-classes"/><!-- to ensure <classpath/>
works -->
<javac
destdir="${maven.build.dir}/impl-classes"
excludes="${src.exclude.pattern}"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}">
<src>
<pathelement path="${maven.src.dir}/impl"/>
</src>
<classpath>
<pathelement path="${maven.build.dir}/api-classes"/>
</classpath>
</javac>
<mkdir dir="${maven.build.dir}/classes"/>
<copy todir="${maven.build.dir}/classes">
<fileset dir="${maven.build.dir}/impl-classes"/>
</copy>
<mkdir dir="${maven.build.dir}/src"/>
<copy todir="${maven.build.dir}/src">
<fileset dir="${maven.src.dir}/impl"/>
</copy>
</target>
<target name="avalon:test" if="run.tests"
depends="avalon:init,avalon:api-compile,avalon:impl-compile,avalon:java-compile">
<echo>
=======================================================================
Compiling Tests
======================================================================
</echo>
<mkdir dir="${maven.build.dir}/test-classes"/>
<mkdir dir="${maven.build.dir}/classes"/><!-- to ensure <classpath/> works
-->
<mkdir dir="${maven.build.dir}/api-classes"/><!-- to ensure <classpath/>
works -->
<mkdir dir="${maven.build.dir}/impl-classes"/><!-- to ensure <classpath/>
works -->
<javac
destdir="${maven.build.dir}/test-classes"
excludes="${test.exclude.pattern}"
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"/>
<pathelement path="${maven.build.dir}/api-classes"/>
<pathelement path="${maven.build.dir}/impl-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 path="${maven.build.dir}/api-classes"/>
<pathelement path="${maven.build.dir}/impl-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:api-compile,avalon:impl-compile,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:api-jar"
depends="avalon:init,avalon:api-compile">
<echo>
=======================================================================
Building API jar
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}/api-classes"/>
<jar
destfile="${maven.build.dir}/${project.name}-${project.version}-api.jar"
basedir="${maven.build.dir}/api-classes"/>
</target>
<target name="avalon:impl-jar"
depends="avalon:init,avalon:impl-compile">
<echo>
=======================================================================
Building Implementation jar
=======================================================================
</echo>
<mkdir dir="${maven.build.dir}/impl-classes"/>
<jar
destfile="${maven.build.dir}/${project.name}-${project.version}-impl.jar"
basedir="${maven.build.dir}/impl-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
-->
<mkdir dir="${maven.build.dir}/api-classes"/><!-- to ensure <classpath/>
works -->
<mkdir dir="${maven.build.dir}/impl-classes"/><!-- to ensure <classpath/>
works -->
<property name="copyright"
value="Copyright &copy; ${project.copyright.year} The 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"/>
<path location="${maven.build.dir}/api-classes"/>
<path location="${maven.build.dir}/impl-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-components/cornerstone/project.properties
Index: project.properties
===================================================================
#
# Banner background and foreground colors.
#
maven.ui.banner.background = #fff
maven.ui.banner.foreground = #000
maven.xdoc.jsl = file:/${basedir}/../site/etc/site.jsl
maven.javadoc.stylesheet =${basedir}/../site/etc/stylesheet.css
maven.license.licenseFile = ${basedir}/../site/etc/LICENSE.txt
maven.checkstyle.format = avalon
pom.organization.identifier = ASF
pom.specificationVersion = 1.0
#
# Declaration of the remote links to assign on javadoc generation.
# Link declarations can be overriden in the user's build.properties
# file.
#
sun.j2se.link = http://java.sun.com/j2se/1.4/docs/api/
avalon.framework.link = http://avalon.apache.org/framework/api/
avalon.logkit.link = http://avalon.apache.org/logkit/api/
excalibur.thread.link = http://avalon.apache.org/excalibur/thread/api/
excalibur.event.link = http://avalon.apache.org/excalibur/event/api/
maven.javadoc.links =
${sun.j2se.link},${avalon.logkit.link},${avalon.framework.link},${excalibur.thread.link},${excalibur.event.link}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]