You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2002/08/20 18:52:14 UTC
cvs commit: jakarta-avalon-excalibur/meta .cvsignore ant.properties.sample build.xml default.properties
mcconnell 2002/08/20 09:52:14
Added: meta .cvsignore ant.properties.sample build.xml
default.properties
Log:
Added build environment.
Revision Changes Path
1.1 jakarta-avalon-excalibur/meta/.cvsignore
Index: .cvsignore
===================================================================
ant.properties
build
checkstyle.cache
distributions
dist
excalibur-*
*.el
*.ipr
1.1 jakarta-avalon-excalibur/meta/ant.properties.sample
Index: ant.properties.sample
===================================================================
# -----------------------------------------------------------------------------
# Component ant.properties.sample
#
# This is an example "ant.properties" file, used to customize the building of
# the component for your local environment. It defines the location of all
# external modules that this component depend on. Copy this file to
# "ant.properties" in the source directory, and customize it as needed.
#
# The ant.properties values in this directory apply only to this component.
# It is overridden by ../ant.properties and ~/build.properties
# It overrides all default.properties files and ~/.ant.properties
#
# $Id: ant.properties.sample,v 1.1 2002/08/20 16:52:14 mcconnell Exp $
# -----------------------------------------------------------------------------
# ----- Compile Control Flags -----
build.debug=on
build.optimize=off
build.deprecation=off
#build.compiler=jikes
# ----- Base Directory in which all the packages are stored -----
base.path=${basedir}/../..
# --------------------------------------------------
# REQUIRED LIBRARIES
# --------------------------------------------------
# --------------------------------------------------
# OPTIONAL LIBRARIES
# --------------------------------------------------
# ----- JUnit Unit Test Suite, version 3.7 or later. -----
# Not needed if junit.jar is in $ANT_HOME/lib
junit.home=${base.path}/junit3.7
junit.lib=${junit.home}
junit.jar=${junit.lib}/junit.jar
# ----- Checkstyle, version 2.1 or later -----
# Uncomment the 'do.checkstyle' flag property to enable checkstyle
# do.checkstyle=
checkstyle.home=${base.path}/checkstyle-2.1
checkstyle.lib=${checkstyle.home}
checkstyle.jar=${checkstyle.lib}/checkstyle-all-2.1.jar
1.1 jakarta-avalon-excalibur/meta/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<project name="Excalibur Container" default="main" basedir=".">
<property file="${user.home}/build.properties"/>
<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="${excalibur-i18n.jar}"/>
<pathelement location="${excalibur-configuration.jar}"/>
<pathelement location="${build.classes}"/>
<pathelement location="${checkstyle.jar}"/>
<pathelement location="${xml-apis.jar}"/>
<pathelement path="${java.class.path}"/>
</path>
<path id="tools.class.path">
<pathelement location="${junit.jar}"/>
<fileset dir="${jakarta-site.dir}/lib"/>
</path>
<path id="test.class.path">
<pathelement location="${build.testclasses}"/>
<pathelement location="${junit.jar}"/>
<path refid="project.class.path"/>
</path>
<property name="cp" refid="test.class.path"/>
<target name="main" depends="jar" description="Build the project"/>
<target name="rebuild" depends="clean,main" description="Rebuild the project"/>
<target name="dependencies" description="Check dependencies" unless="skip.dependencies">
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkCommon"/>
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkFramework"/>
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkI18N"/>
</target>
<target name="dependencies-test" depends="dist-jar, dependencies"
description="Check unit test dependencies" unless="skip.dependencies">
<!-- Need the jar to prevent recursive deps. -->
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkJUnit"/>
</target>
<!-- Compiles the source code -->
<target name="compile" depends="dependencies" description="Compiles the source code">
<mkdir dir="${build.classes}"/>
<!-- Compile all classes excluding the tests. -->
<javac srcdir="${java.dir}"
destdir="${build.classes}"
debug="${build.debug}"
optimize="${build.optimize}"
deprecation="${build.deprecation}"
target="1.2">
<classpath refid="project.class.path" />
<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"/>
</fileset>
</copy>
</target>
<!-- Compiles the unit test source code -->
<target name="compile-test" depends="compile, dependencies-test" description="Compiles the source code">
<mkdir dir="${build.testsrc}"/>
<!-- Copy over all of the tests applying test filters -->
<copy todir="${build.testsrc}">
<fileset dir="${test.dir}"/>
</copy>
<mkdir dir="${build.testclasses}"/>
<!-- Compile all test classes. -->
<javac srcdir="${build.testsrc}"
destdir="${build.testclasses}"
debug="${build.debug}"
optimize="${build.optimize}"
deprecation="${build.deprecation}"
target="1.2">
<classpath refid="test.class.path" />
<include name="**/*.java"/>
</javac>
<copy todir="${build.testclasses}">
<fileset dir="${test.dir}">
<exclude name="**/*.java"/>
<exclude name="**/package.html"/>
</fileset>
</copy>
</target>
<!-- Copies and filters the license. Used by jar and dist -->
<target name="prepare-conf">
<mkdir dir="${build.conf}"/>
<copy todir="${build.conf}" flatten="true">
<fileset dir="../" includes="LICENSE.txt"/>
<filterset>
<filter token="year" value="${year}"/>
</filterset>
</copy>
</target>
<!-- Creates all the .jar file -->
<target name="jar" depends="compile, prepare-conf" description="Generates the jar files">
<mkdir dir="${build.lib}"/>
<jar jarfile="${build.lib}/${jar.name}"
basedir="${build.classes}"
compress="${build.compress}">
<manifest>
<attribute name="Extension-Name" value="${name}"/>
<attribute name="Specification-Vendor" value="Apache Software Foundation"/>
<attribute name="Specification-Version" value="1.0"/>
<attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
<attribute name="Implementation-Version" value="${package-version}"/>
</manifest>
<exclude name="**/test/**"/>
<zipfileset dir="${build.conf}" prefix="META-INF/">
<include name="LICENSE.txt"/>
</zipfileset>
</jar>
</target>
<!-- Creates all the Javadocs -->
<target name="javadocs" depends="compile" description="Generates the javadocs" unless="skip.javadocs">
<mkdir dir="${dist.javadocs}"/>
<javadoc packagenames="org.apache.*"
sourcepath="${java.dir}"
destdir="${dist.javadocs}">
<classpath refid="project.class.path" />
<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="http://java.sun.com/j2se/1.4/docs/api/"/>
<param name="-link" value="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
<param name="-link" value="http://jakarta.apache.org/avalon/api/"/>
<param name="-bottom"
value=""Copyright © ${year} Apache Jakarta Project. All Rights Reserved.""/>
</doclet>
</javadoc>
</target>
<target name="test" depends="compile-test" description="Perform the unit tests" unless="skip.tests">
<echo message="Performing Unit Tests" />
<mkdir dir="${build.tests}"/>
<junit fork="true"
haltonfailure="${junit.failonerror}"
printsummary="yes"
dir="${build.tests}">
<classpath refid="test.class.path"/>
<formatter type="xml"/> <!-- xml reports for junitreport -->
<formatter type="plain" usefile="false"/> <!-- text reports for humans -->
<batchtest todir="${build.tests}">
<fileset dir="${build.testclasses}">
<include name="**/test/*TestCase.class"/>
<exclude name="**/Abstract*"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="test-reports" depends="test" description="Generate Reports for the unit tests">
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkBSF"/>
<mkdir dir="${build.reports}/junit"/>
<junitreport todir="${build.reports}/junit">
<fileset dir="${build.tests}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${build.reports}/junit"/>
</junitreport>
<!-- Clean up the xml reports used by the junitreport task -->
<!--
<delete>
<fileset dir="${build.tests}" includes="TEST-*.xml"/>
<fileset dir="${build.tests}" includes="TESTS-*.xml"/>
</delete>
-->
</target>
<target name="checkstyle" if="do.checkstyle" description="Checkstyle">
<!-- this invocation of checkstyle requires that checkstyle be downloaded and setup -->
<!-- thats why you are required to define do.checkstyle property to generate the report -->
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
<classpath refid="project.class.path"/>
</taskdef>
<checkstyle
lcurlyType="nl"
lcurlyMethod="nl"
lcurlyOther="nl"
rcurly="ignore"
allowProtected="false"
allowPackage="false"
allowNoAuthor="false"
maxLineLen="100"
maxMethodLen="100"
maxConstructorLen="100"
memberPattern="^m_[a-z][a-zA-Z0-9]*$"
staticPattern="^c_[a-z][a-zA-Z0-9]*$"
constPattern="(^c_[a-z][a-zA-Z0-9]*$)|([A-Z_]*$)"
ignoreImportLen="true"
allowTabs="false"
javadocScope="protected"
ignoreWhitespace="true"
cacheFile="checkstyle.cache"
failOnViolation="false"
ignoreCastWhitespace="true">
<fileset dir="${java.dir}">
<include name="**/*.java"/>
</fileset>
<formatter type="plain"/>
<formatter type="xml" toFile="${build.dir}/checkstyle-results.xml"/>
</checkstyle>
</target>
<target name="checkstyle-report"
depends="checkstyle"
if="do.checkstyle"
description="Generate Checkstyle Report">
<mkdir dir="${build.reports}/checkstyle"/>
<property name="checkstyle.pathhack" location="."/>
<style style="${tools.dir}/etc/checkstyle-frames.xsl" in="${build.dir}/checkstyle-results.xml"
out="${build.reports}/checkstyle/delete-me.html">
<param name="pathhack" expression="${checkstyle.pathhack}"/>
</style>
</target>
<!-- Creates the distribution -->
<target name="dist"
depends="dist-jar, test-reports, checkstyle-report, javadocs"
description="Generates a distribution (jar + javadocs + unit tests + checkstyle reports)">
<copy file="${build.conf}/LICENSE.txt" todir="${dist.dir}"/>
<copy file="../KEYS" todir="${dist.dir}"/>
<zip zipfile="${dist.dir}/src.zip" compress="false">
<zipfileset dir="src/java"/>
</zip>
<mkdir dir="${dist.base}"/>
<zip zipfile="${dist.base}/${dist.name}.zip" compress="true">
<zipfileset dir="${dist.dir}" prefix="${dist.name}"/>
</zip>
<delete dir="${dist.dir}" />
</target>
<!-- Creates a mini jar-only distribution -->
<target name="dist-jar" depends="jar">
<mkdir dir="${dist.dir}"/>
<copy todir="${dist.dir}">
<fileset dir="${build.lib}">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<!-- Creates a minimal distribution -->
<target name="dist.lite"
depends="dist-jar, test, javadocs"
description="Generates a minimal distribution (jar + javadocs)">
<copy file="../LICENSE.txt" todir="${dist.dir}"/>
<copy file="../KEYS" todir="${dist.dir}"/>
</target>
<target name="anakia-avail">
<available classname="org.apache.velocity.anakia.AnakiaTask"
property="AnakiaTask.present">
<classpath refid="tools.class.path"/>
</available>
</target>
<target name="anakia-check" depends="anakia-avail" unless="AnakiaTask.present">
<echo>
AnakiaTask is not present! Please check to make sure that
velocity.jar is in your classpath. The easiest way to build
the documentation is to checkout jakarta-site CVS and specify
jakarta-site.dir property.
</echo>
</target>
<target name="docs" depends="anakia-check" description="Generate documentation and website">
<taskdef name="anakia"
classname="org.apache.velocity.anakia.AnakiaTask">
<classpath refid="tools.class.path"/>
</taskdef>
<anakia basedir="${xdocs.dir}"
destdir="${docs.dir}"
style="docs.vsl"
projectfile="stylesheets/project.xml"
includes="**/*.xml"
excludes="stylesheets/**"
velocitypropertiesfile="../site/src/stylesheets/velocity.properties"
/>
<copy todir="${docs.dir}" filtering="off">
<fileset dir="../site/src" includes="css/*.css" />
<fileset dir="${xdocs.dir}">
<include name="**/images/**"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
<include name="**/*.png"/>
<include name="**/*.css"/>
<include name="**/*.js"/>
</fileset>
</copy>
</target>
<target name="site" depends="javadocs, docs" description=" Places Docs ready for hosting on website">
<mkdir dir="../site/dist/docs/${dir-name}"/>
<copy todir="../site/dist/docs/${dir-name}">
<fileset dir="${docs.dir}">
<include name="**"/>
</fileset>
</copy>
</target>
<!-- Cleans up build and distribution directories -->
<target name="clean" description="Cleans up the project">
<delete file="checkstyle.cache"/>
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="test" /> <!-- unit testing output directory -->
<delete>
<fileset dir="." includes="velocity.*"/>
<fileset dir="." includes="**/*~" defaultexcludes="no"/>
</delete>
</target>
<target name="real-clean" depends="clean" description="Cleans up the project, including distributions">
<delete dir="${dist.base}" />
</target>
</project>
1.1 jakarta-avalon-excalibur/meta/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=excalibur-meta
Name=Avalon Meta Management Resource
dir-name=meta
version=1.0
package-version=0.99
year=2000-2002
# --------------------------------------------------
# REQUIRED LIBRARIES
# --------------------------------------------------
# ----- Avalon Framework, version 4.1 or later -----
avalon-framework.home=${basedir}/../../jakarta-avalon
avalon-framework.lib=${avalon-framework.home}/build/lib
avalon-framework.jar=${avalon-framework.lib}/avalon-framework.jar
# ----- Excalibur i18n, version 1.0 or later -----
excalibur-i18n.home=${basedir}/../i18n/dist
excalibur-i18n.lib=${excalibur-i18n.home}
excalibur-i18n.jar=${excalibur-i18n.lib}/excalibur-i18n-1.0.jar
# ----- Excalibur Configuration -----
excalibur-configuration.home=${basedir}/../configuration
excalibur-configuration.lib=${excalibur-configuration.home}/build/lib
excalibur-configuration.jar=${excalibur-configuration.lib}/excalibur-configuration-1.0.jar
# --------------------------------------------------
# Settings used to configure compile environment
build.debug = on
build.optimize = off
build.deprecation = off
build.compress = false
junit.failonerror = false
# location of intermediate products
build.dir = build
build.testsrc = ${build.dir}/testsrc
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
# Set the properties for source directories
src.dir = src
java.dir = ${src.dir}/java
conf.dir = ${src.dir}/conf
test.dir = ${src.dir}/test
# Set the properties for distribution directories
dist.dir = dist
dist.javadocs = ${dist.dir}/docs/api
xdocs.dir = ${src.dir}/xdocs
docs.dir = ${dist.dir}/docs
jakarta-site.dir = ../../jakarta-site
# name of .zip/.tar.gz/.bz2 files and their top-level directory
dist.name = ${name}-${version}
# name of jar file
jar.name = ${name}-${version}.jar
# property indicating directory where all distribution archives are placed
dist.base = distributions
depchecker.prefix=.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>