mcconnell 2003/03/06 23:40:37
Added: assembly-spi build.xml default.properties
Log:
Addition of Ant build procedures.
Revision Changes Path
1.1 avalon-sandbox/assembly-spi/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<!--
Copyright (C) The Apache Software Foundation. All rights reserved.
This software is published under the terms of the Apache Software License
version 1.1, a copy of which has been included with this distribution in
the LICENSE.txt file.
@author Avalon Development Team
@version 1.0 12/03/2001
-->
<project name="assembly-spi" default="install" basedir=".">
<property file="${basedir}/../ant.properties"/>
<property file="${basedir}/ant.properties"/>
<property file="${user.home}/.ant.properties"/>
<property file="${basedir}/../default.properties"/>
<property file="${basedir}/default.properties"/>
<!-- Classpath for product -->
<path id="project.class.path">
<pathelement location="${avalon-framework.jar}"/>
<pathelement location="${avalon-meta.jar}"/>
<pathelement location="${build.classes}"/>
<pathelement path="${java.class.path}"/>
</path>
<target name="meta-context">
<uptodate property="meta-uptodate" targetfile="${avalon-meta.jar}">
<srcfiles dir="${avalon-meta.home}/src">
<include name="**/*.*"/>
</srcfiles>
</uptodate>
</target>
<target name="meta" depends="meta-context" description="Meta dependency"
unless="meta-uptodate">
<ant dir="../meta" inheritAll="false"/>
</target>
<target name="flags">
<available property="framework.present"
classname="org.apache.avalon.framework.Version"
classpathref="project.class.path" />
<available property="meta.present"
classname="org.apache.avalon.meta.info.Type"
classpathref="project.class.path" />
</target>
<target name="dependencies" depends="check-framework,check-meta"
description="Check dependencies"/>
<target name="check-framework" depends="flags" unless="framework.present">
<mkdir dir="${local.repository}"/>
<get
src="${remote.repository}/${avalon-framework.id}/jars/${avalon-framework.name}"
dest="${local.repository}/${avalon-framework.name}"
verbose="true"
usetimestamp="true"/>
</target>
<target name="check-meta" depends="flags" unless="meta.present">
<mkdir dir="${local.repository}"/>
<get
src="${remote.repository}/${avalon-meta.id}/jars/${avalon-meta.name}"
dest="${local.repository}/${avalon-meta.name}"
verbose="true"
usetimestamp="true"/>
</target>
<target name="context" depends="dependencies">
<uptodate property="uptodate" targetfile="${build.lib}/${jar.name}">
<srcfiles dir="${src.dir}">
<include name="**/*.*"/>
</srcfiles>
</uptodate>
</target>
<!-- Compiles the source code -->
<target name="compile" depends="context"
description="Compiles the source code" unless="uptodate">
<echo message="compiling ${ant.project.name}"/>
<mkdir dir="${build.classes}"/>
<!-- Compile all classes -->
<javac srcdir="${java.dir}"
destdir="${build.classes}"
debug="${build.debug}"
optimize="${build.optimize}"
deprecation="${build.deprecation}"
target="1.2">
<src path="${java.dir}" />
<classpath refid="project.class.path" />
<exclude name="**/playground/**/*.java"/>
<include name="**/*.java"/>
</javac>
<!-- copy resources to same location as .class files -->
<copy todir="${build.classes}">
<fileset dir="${java.dir}">
<exclude name="**/*.java"/>
<exclude name="**/package.html"/>
<exclude name="**/playground/**/*.*"/>
</fileset>
</copy>
</target>
<!-- Creates all the .jar file -->
<target name="jar" depends="compile"
description="Generates the jar files" unless="uptodate">
<mkdir dir="${build.conf}"/>
<copy todir="${build.conf}" flatten="true">
<fileset dir="../" includes="LICENSE.txt"/>
<filterset>
<filter token="year" value="${year}"/>
</filterset>
</copy>
<mkdir dir="${build.lib}"/>
<jar jarfile="${build.lib}/${jar.name}"
basedir="${build.classes}"
compress="${build.compress}"
manifest="${src.dir}/etc/project.mf">
<exclude name="**/test/**"/>
<zipfileset dir="${build.conf}" prefix="META-INF/">
<include name="LICENSE.txt"/>
</zipfileset>
</jar>
</target>
<target name="install" depends="jar">
<mkdir dir="${local.repository}"/>
<copy toDir="${local.repository}" file="${build.dir}/lib/${jar.name}"/>
</target>
<!-- Creates all the Javadocs -->
<target name="javadocs" depends="compile"
description="Generates the javadocs" unless="skip.javadocs">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="*,*.*"
use="true"
sourcepath="${java.dir}"
destdir="${build.javadocs}">
<classpath refid="project.class.path" />
<group title="Appliance">
<package name="org.apache.avalon.assembly.appliance"/>
<package name="org.apache.avalon.assembly.lifestyle"/>
</group>
<group title="Engine">
<package name="org.apache.avalon.assembly.engine"/>
<package name="org.apache.avalon.assembly.engine.*"/>
</group>
<group title="Utilities">
<package name="org.apache.avalon.assembly.locator"/>
<package name="org.apache.avalon.assembly.logging"/>
<package name="org.apache.avalon.assembly.util"/>
</group>
<doclet name="com.sun.tools.doclets.standard.Standard">
<param name="-author"/>
<param name="-version"/>
<param name="-doctitle" value="${Name}"/>
<param name="-windowtitle" value="${Name} API"/>
<param name="-link" value="${j2se.api.link}"/>
<param name="-link" value="${j2ee.api.link}"/>
<param name="-link" value="${avalon.api.link}"/>
<param name="-link" value="${meta.api.link}"/>
<param name="-bottom"
value=""Copyright © ${year} Apache Avalon Project. All Rights
Reserved.""/>
</doclet>
</javadoc>
</target>
<!-- Cleans up build and distribution directories -->
<target name="clean" description="Cleans up the project">
<delete dir="${build.dir}" />
</target>
</project>
1.1 avalon-sandbox/assembly-spi/default.properties
Index: default.properties
===================================================================
# -------------------------------------------------------------------
# B U I L D P R O P E R T I E S
# -------------------------------------------------------------------
# Specifies default property values
# Overridden by ../default.properties and all ant.properties
# Not user-editable; use ant.properties files instead
name=avalon-assembly-spi
Name=Avalon Assembly SPI
dir-name=assembly-spi
version=1.0
package-version=1.0
year=2002
remote.repository = http://www.osm.net/repository
local.repository = ../lib
# --------------------------------------------------
# REQUIRED LIBRARIES
# --------------------------------------------------
# ----- Avalon Framework, version 4.1 or later -----
avalon-framework.id = avalon-framework
avalon-framework.version = 4.1.4
avalon-framework.name = ${avalon-framework.id}-${avalon-framework.version}.jar
avalon-framework.jar=${local.repository}/${avalon-framework.name}
# --------------------------------------------------
# SANDBOX LIBRARIES
# --------------------------------------------------
# ----- Avalon Sandbox -----
avalon-sandbox.home=${basedir}/..
# ----- Avalon Meta -----
avalon-meta.home=${avalon-sandbox.home}/meta
avalon-meta.lib=${avalon-meta.home}/build/lib
avalon-meta.jar=${avalon-meta.lib}/avalon-meta-1.0.jar
# --------------------------------------------------
# Settings used to configure compile environment
build.debug = on
build.optimize = off
build.deprecation = true
build.compress = false
junit.failonerror = false
# location of intermediate products
build.dir = build
build.testsrc = ${build.dir}/testsrc
build.playground = ${build.dir}/playground
build.testclasses = ${build.dir}/testclasses
build.lib = ${build.dir}/lib
build.conf = ${build.dir}/conf
build.classes = ${build.dir}/classes
build.tests = ${build.dir}/tests
build.reports = ${build.dir}/reports
build.docs = ${build.dir}/docs
build.javadocs = ${build.docs}/api
# Set the properties for source directories
src.dir = src
java.dir = ${src.dir}/java
conf.dir = ${src.dir}/conf
etc.dir = ${src.dir}/etc
test.dir = ${src.dir}/test
docs.dir = ${src.dir}/docs
tools.dir=${basedir}/../../jakarta-avalon/tools
lib.dir = ${build.tests}/lib
common.dir = ${build.tests}/common
# Set the properties for distribution directories
dist.dir = dist
dist.javadocs = ${dist.dir}/docs/api
# name of .zip/.tar.gz/.bz2 files and their top-level directory
dist.name = ${name}-${version}
# name of jar file
jar.name = ${name}-${package-version}.jar
avalon-assembly.jar = ${build.lib}/${jar.name}
# property indicating directory where all distribution archives are placed
dist.base = distributions
# project specific properties
demo.name = playground
demo.jar = ${demo.name}-${version}.jar
# misc.
checkstyle-cache = ${build.dir}/checkstyle.cache
# javadoc links
doc.root = ../../../..
j2se.api.link = http://java.sun.com/j2se/1.4/docs/api/
j2ee.api.link = http://java.sun.com/j2ee/sdk_1.3/techdocs/api/
avalon.api.link = ${doc.root}/../avalon/docs/api
lifecycle.api.link =${doc.root}/lifecycle/build/docs/api
meta.api.link =${doc.root}/meta/build/docs/api
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]