mcconnell 02/05/10 10:53:49
Added: merlin README.txt default.properties BUILDING.txt
build.xml build.sh build.bat .cvsignore
Log:
merlin repackaging
Revision Changes Path
1.1 jakarta-avalon-excalibur/merlin/README.txt
Index: README.txt
===================================================================
Avalons Excalibur Merlin
-------------------------
1.1 jakarta-avalon-excalibur/merlin/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-merlin
Name=Excalibur Merlin Service Management
dir-name=merlin
version=1.0
package-version=0.2
year=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 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
# ----- Excalibur Context -----
excalibur-context.home=${basedir}/../context
excalibur-context.lib=${excalibur-context.home}/build/lib
excalibur-context.jar=${excalibur-context.lib}/excalibur-context-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
# 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=.
1.1 jakarta-avalon-excalibur/merlin/BUILDING.txt
Index: BUILDING.txt
===================================================================
Building The Component
======================
Building from CVS
-----------------
Assuming:
- You have a JDK installed, $JAVA_HOME set and 'java -version' works
- Your directory structure follows standard CVS layout:
jakarta-avalon/ # jakarta-avalon CVS module, containing Ant
jakarta-avalon-excalibur/ # contains build.sh, build.bat
jakarta-avalon-excalibur/configuration # you are here
Then to build, you need only customize ant.properties (see step 6 below) and
type './build.sh' (Unix) or 'build' (DOS). The '-projecthelp' option will
list the available targets.
Building from source distribution
---------------------------------
In order to build a binary distribution version of the component from a
source distribution, you must have a Java Development Kit (JDK) for
version 1.1 (or later) downloaded and installed (version 1.3.1
recommended), and do the following:
(0) Download and Install a Java Development Kit
* Download a Java Development Kit (JDK) release (version 1.1 or later)
from:
http://java.sun.com/j2se/
* Install the JDK according to the instructions included with the release.
* Set an environment variable JAVA_HOME to the pathname of the directory
into which you installed the JDK release.
(1) Download and Install the Ant Binary Distribution
* Download a binary distribution of Ant 1.4.1 from:
http://jakarta.apache.org/builds/jakarta-ant/release/v1.4.1/bin/
On a Windows platform, you will need:
jakarta-ant-1.4.1-bin.zip
jakarta-ant-1.4.1-optional.jar
On a Unix platform, you will need:
jakarta-ant-1.4.1-bin.tar.gz
jakarta-ant-1.4.1-optional.jar
* Unpack the binary distribution into a convenient location so that the
Ant release resides in its own directory (conventionally named
"jakarta-ant-1.4.1"). For the purposes of the remainder of this document,
the symbolic name "${ant.home}" is used to refer to the full pathname of
the release directory.
* Copy the file "jakarta-ant-1.4.1-optional.jar", downloaded above, into
the directory "${ant.home}/lib". This makes available several Ant
extension commands that are commonly required when building Jakarta
based projects.
* Modify the PATH environment variable to include directory
"${ant.home}/bin" in its list. This makes the "ant" command line script
available, which will be used to actually perform the build.
(2) Download and Install the JUnit Testing Package (OPTIONAL)
NOTE: This is only required if you wish to run the unit tests for
this component
* Download the JUnit unit test package (version 3.7 or later) from:
http://www.junit.org/
* Unpack the package into a convenient location so that it resides in its
own subdirectory.
* Copy the file "junit.jar", downloaded above, into the directory
"${ant.home}/lib". This makes available the unit testing tasks that are
commonly required when building Jakarta based projects.
(3) Download and Install Checkstyle, 2.1 or later (OPTIONAL)
NOTE: This is only required if you wish to generate reports regarding code
style.
* Download the Checkstyle package (version 2.1 or later) from:
http://checkstyle.sourceforge.net/
* Unpack the package into a convenient location so that it resides in its
own subdirectory.
(4) Download and Install the Xalan, XSLT engine (OPTIONAL)
NOTE: This is only required if you wish to generate reports for the
dependency
analysis, checkstyle and unit testing results.
* Download the Xalan package (version 2.3.1 or later) from:
http://xml.apache.org/xalan-j/
* Unpack the package into a convenient location so that it resides in its
own subdirectory.
* Copy the files "xalan.jar", and "xml-apis.jar", downloaded above, into
the directory "${ant.home}/lib". This makes available the XSLT reporting
capabilities.
(5) Customize Build Properties For This Subproject
Most Jakarta subprojects allow you to customize Ant properties (with default
values defined in the "build.xml" file. This is done by creating a text file
named "ant.properties" in the source distribution directory (for property
definitions local to this subproject) and/or your user home directory (for
property definitions shared across subprojects). You can use the included
"ant.properties.sample" file as a starting point for this.
External dependencies are satisfied by configuring appropriate values in your
ant.properties file. The easiest way to satisfy these dependencies is to
copy
the "ant.properties.sample" file (in the top-level directory) to
"ant.properties",
and then edit it to suit your environment. On Unix, this would be done as:
cd @dist.name@
cp ant.properties.sample ant.properties
emacs ant.properties
NOTE: Be *sure* that you do not check "ant.properties" in to the CVS
repository. This file is local to your own development environment, and
each developer will have their own version.
(6) Build A Binary Distribution
Open a command line shell, and issue the following commands:
cd @dist.name@
ant -projecthelp
If everything is installed correctly, you should see a list of the Ant
"targets" that represent different commands you might wish to build. By
convention, the "jar" target creates the jar of the component. To execute
it, type the following commands:
cd @dist.name@
ant jar
This will create a jar in the @dist.name@/build/lib directory that contains
the component.
1.1 jakarta-avalon-excalibur/merlin/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<project name="Excalibur template" 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="${build.classes}"/>
<pathelement location="${avalon-framework.jar}"/>
<pathelement location="${excalibur-configuration.jar}"/>
<pathelement location="${excalibur-context.jar}"/>
<pathelement location="${checkstyle.jar}"/>
<pathelement path="${java.class.path}"/>
</path>
<path id="tools.class.path">
<pathelement location="${junit.jar}"/>
<pathelement location="${tools.jar}"/>
<fileset dir="${tools.dir}/lib"/>
<fileset dir="${tools.dir}/ext"/>
</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"/>
</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 manifest and 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"/>
<fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
<filterset>
<filtersfile file="default.properties"/>
</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="${build.conf}/MANIFEST.MF">
<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}"/>
<copy file="README.txt" todir="${dist.dir}"/>
<mkdir dir="${dist.base}"/>
<zip zipfile="${dist.base}/${dist.name}-bin.zip" compress="true">
<zipfileset dir="${dist.dir}" prefix="${dist.name}"/>
</zip>
<!--
Not supported by released ant but when it is we should enable this
across
all of the products
<tar longfile="gnu" tarfile="${dist.base}/${dist.name}-bin.tar">
<tarfileset dir="${dist.dir}"
prefix="${dist.name}"
username="avalon"
group="avalon"/>
</tar>
<gzip zipfile="${dist.base}/${dist.name}-bin.tar.gz"
src="${dist.name}-bin.tar"/>
<bzip2 zipfile="${dist.base}/${dist.name}-bin.tar.gz"
src="${dist.name}-bin.tar"/>
<delete file="${dist.base}/${dist.name}-bin.tar"/>
<checksum fileext=".md5">
<fileset dir="${dist.base}" />
</checksum>
-->
<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}"/>
<copy file="README.txt" todir="${dist.dir}"/>
</target>
<!-- Setup the filters -->
<target name="setup-filters">
<filter token="Name" value="Avalon ${Name}"/>
<filter token="name" value="${dir-name}"/>
<filter token="version" value="${version}"/>
<filter token="year" value="${year}"/>
<filter token="status" value="${status}"/>
<filter token="release" value="${release}"/>
<filter token="short-version" value="${short.version}"/>
<property name="avalon.base" value="http://jakarta.apache.org/avalon"/>
<property name="framework.base"
value="http://jakarta.apache.org/avalon/framework"/>
<property name="phoenix.base"
value="http://jakarta.apache.org/avalon/phoenix"/>
<property name="cornerstone.base"
value="http://jakarta.apache.org/avalon/cornerstone"/>
<property name="logkit.base"
value="http://jakarta.apache.org/avalon/logkit"/>
<property name="testlet.base"
value="http://jakarta.apache.org/avalon/testlet"/>
<filter token="year" value="${year}"/>
<filter token="AVALON_BASE" value="${avalon.base}"/>
<filter token="FRAMEWORK_BASE" value="${framework.base}"/>
<filter token="PHOENIX_BASE" value="${phoenix.base}"/>
<filter token="CORNERSTONE_BASE" value="${cornerstone.base}"/>
<filter token="LOGKIT_BASE" value="${logkit.base}"/>
<filter token="TESTLET_BASE" value="${testlet.base}"/>
</target>
<!-- Prepares the documentation directory -->
<target name="docs" depends="setup-filters"> <!-- depends="javadocs"
description="Generates the Docs" -->
<mkdir dir="${docs.dir}"/>
<mkdir dir="${build.context}"/>
<mkdir dir="${build.xdocs}"/>
<mkdir dir="${build.docs}"/>
<mkdir dir="${build.dir}/work"/>
<!-- Base pointers for non-xdocs documentation. Override these in
.ant.properties to link to local docs -->
<copy todir="${build.context}" filtering="on">
<fileset dir="${context.dir}">
<exclude name="diagrams/**"/>
<exclude name="resources/**"/>
<exclude name="xdocs"/>
</fileset>
</copy>
<copy todir="${build.context}/xdocs" filtering="on" overwrite="yes">
<fileset dir="${xdocs.dir}"/>
</copy>
<copy todir="${build.context}/resources" filtering="off"
overwrite="yes">
<fileset dir="${context.dir}/resources"/>
<fileset dir="${xdocs.dir}">
<include name="**/images/**"/>
</fileset>
</copy>
<java classname="org.apache.cocoon.Main" fork="true">
<arg value="-c${build.context}/"/>
<arg value="-d${build.docs}"/>
<arg value="-w${build.dir}/work"/>
<arg value="-l${build.dir}/work/cocoon.log"/>
<arg value="-uINFO"/>
<arg value="-f${xdocs.dir}/${dir-name}.uris"/>
<classpath>
<path refid="tools.class.path"/>
<fileset dir="${tools.dir}/ext"/>
</classpath>
</java>
<copy todir="${docs.dir}">
<fileset dir="${build.docs}">
<include name="**"/>
</fileset>
</copy>
<!-- hack for stupid transport on api link -->
<replace file="${docs.dir}/index.html" token="index.html.xml"
value="index.html"/>
</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="**/*~" 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/merlin/build.sh
Index: build.sh
===================================================================
#!/bin/sh
BASE=`dirname $0` # Directory containing this script. Not the same as $PWD.
$BASE/../build.sh -f $BASE/build.xml $@
1.1 jakarta-avalon-excalibur/merlin/build.bat
Index: build.bat
===================================================================
@echo off
set BASE=..
call %BASE%\build.bat %1 %2 %3 %4 %5 %6 %7 %8
1.1 jakarta-avalon-excalibur/merlin/.cvsignore
Index: .cvsignore
===================================================================
ant.properties
build
checkstyle.cache
distributions
dist
excalibur-*
*.el
*.ipr
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>