mcconnell 2003/12/10 23:00:19
Modified: util maven.xml project.xml
util/xdocs/criteria index.xml
Log:
Add avalon:dist goal to generate the full distribution.
Revision Changes Path
1.4 +162 -1 avalon/util/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/avalon/util/maven.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- maven.xml 8 Dec 2003 09:31:54 -0000 1.3
+++ maven.xml 11 Dec 2003 07:00:19 -0000 1.4
@@ -3,13 +3,36 @@
<ant:property name="pom.organization.identifier" value="ASF"/>
<ant:property name="pom.specificationVersion" value="1.0"/>
+ <ant:property name="maven.dist.assembly.dir"
+ value="${maven.build.dir}/temp"/>
+ <ant:property name="maven.dist.bin.archive.dir"
+ value="${maven.dist.assembly.dir}/bin"/>
+ <ant:property name="maven.dist.src.archive.dir"
+ value="${maven.dist.assembly.dir}/src"/>
+ <ant:property name="maven.dist.bin.assembly.dir"
+ value="${maven.dist.assembly.dir}/bin/${pom.artifactId}"/>
+ <ant:property name="maven.dist.src.assembly.dir"
+ value="${maven.dist.assembly.dir}/src/${pom.artifactId}"/>
+ <ant:property name="maven.dist.dir"
+ value="${maven.build.dir}/distributions"/>
+
+
<goal name="avalon:build" description="Build the Repository.">
+
<maven:reactor basedir="${basedir}"
includes="**/project.xml"
excludes="**/target/**,project.xml"
goals=""
banner="Building:"
- ignoreFailures="false" />
+ ignoreFailures="false"
+ postProcessing="true" />
+ <ant:copy todir="${maven.build.dir}">
+ <j:forEach var="child" items="${reactorProjects}">
+ <ant:fileset dir="${child.file.parentFile}/target">
+ <ant:include name="${child.artifactId}-${child.currentVersion}.jar"/>
+ </ant:fileset>
+ </j:forEach>
+ </ant:copy>
</goal>
<goal name="avalon:clean" prereqs="clean">
@@ -29,6 +52,144 @@
banner="Building site:"
ignoreFailures="false"/>
</goal>
+
+ <goal name="avalon:dist" prereqs="avalon:build,avalon:site,xdist">
+ </goal>
+
+ <goal name="xdist"
+ prereqs="xdist:build"
+ description="Build a complete distribution.">
+ </goal>
+
+ <goal
+ name="xdist:build"
+ prereqs="xdist:build-bin,xdist:build-src"
+ description="Build a complete distribution.">
+ </goal>
+
+ <goal
+ name="xdist:build-setup"
+ description="Set up directories for a distribution build">
+ <ant:delete dir="${maven.dist.dir}"/>
+ <ant:mkdir dir="${maven.dist.dir}"/>
+ </goal>
+
+
+ <goal
+ name="xdist:build-bin"
+ prereqs="xdist:build-setup,xdist:prepare-bin-filesystem"
+ description="Build the binary distribution.">
+
+ <!-- Create a tar.gz file -->
+ <ant:tar longfile="gnu" tarfile="${maven.dist.dir}/${maven.final.name}.tar">
+ <ant:tarfileset dir="${maven.dist.bin.archive.dir}"/>
+ </ant:tar>
+
+ <ant:gzip
+ zipfile="${maven.dist.dir}/${maven.final.name}.tar.gz"
+ src="${maven.dist.dir}/${maven.final.name}.tar"
+ />
+
+ <ant:delete file="${maven.dist.dir}/${maven.final.name}.tar"/>
+
+ <!-- Create a zip file -->
+ <ant:zip zipfile="${maven.dist.dir}/${maven.final.name}.zip">
+ <ant:zipfileset dir="${maven.dist.bin.archive.dir}"/>
+ </ant:zip>
+ </goal>
+
+ <goal
+ name="xdist:build-src"
+ prereqs="xdist:build-setup,xdist:prepare-src-filesystem"
+ description="Build the source distribution.">
+
+ <!-- Create a tar.gz file -->
+ <ant:tar longfile="gnu" tarfile="${maven.dist.dir}/${maven.final.name}-src.tar">
+ <ant:tarfileset dir="${maven.dist.src.archive.dir}"/>
+ </ant:tar>
+
+ <ant:gzip
+ zipfile="${maven.dist.dir}/${maven.final.name}-src.tar.gz"
+ src="${maven.dist.dir}/${maven.final.name}-src.tar"
+ />
+
+ <ant:delete file="${maven.dist.dir}/${maven.final.name}-src.tar"/>
+
+ <!-- Create a zip file -->
+ <ant:zip zipfile="${maven.dist.dir}/${maven.final.name}-src.zip">
+ <ant:zipfileset dir="${maven.dist.src.archive.dir}"/>
+ </ant:zip>
+
+ </goal>
+
+ <goal
+ name="xdist:prepare-bin-filesystem"
+ description="Builds the binary files.">
+
+ <ant:delete dir="${maven.dist.bin.assembly.dir}"/>
+ <ant:mkdir dir="${maven.dist.bin.assembly.dir}"/>
+ <ant:echo>
+ +-------------------------------------------------------+
+ | C R E A T I N G B I N A R Y D I S T R I B U T I O N |
+ +-------------------------------------------------------+
+ </ant:echo>
+ <ant:copy todir="${maven.dist.bin.assembly.dir}">
+ <ant:fileset dir=".">
+ <ant:include name="LICENSE*"/>
+ </ant:fileset>
+ </ant:copy>
+
+ <!-- Copy Jars -->
+ <ant:copy todir="${maven.dist.bin.assembly.dir}">
+ <ant:fileset dir="${maven.build.dir}">
+ <ant:include name="*.jar"/>
+ <ant:include name="docs/**"/>
+ </ant:fileset>
+ </ant:copy>
+ </goal>
+
+ <goal
+ name="xdist:prepare-src-filesystem"
+ description="Builds the source distribution file system.">
+ <ant:delete dir="${maven.dist.src.assembly.dir}" />
+ <ant:mkdir dir="${maven.dist.src.assembly.dir}" />
+
+ <ant:echo>
+ +-------------------------------------------------------+
+ | C R E A T I N G S O U R C E D I S T R I B U T I O N |
+ +-------------------------------------------------------+
+ </ant:echo>
+
+ <ant:copy todir="${maven.dist.src.assembly.dir}">
+ <ant:fileset dir=".">
+ <ant:include name="LICENSE*"/>
+ <ant:include name="project.properties"/>
+ <ant:include name="maven.xml"/>
+ <ant:include name="project.xml"/>
+ </ant:fileset>
+ </ant:copy>
+
+ <maven:reactor basedir="${basedir}"
+ includes="**/project.xml"
+ excludes="**/target/**,project.xml"
+ banner="Building:"
+ ignoreFailures="false"
+ postProcessing="true" />
+ <ant:copy todir="${maven.dist.src.assembly.dir}">
+ <j:forEach var="child" items="${reactorProjects}">
+ <ant:fileset dir="${child.file.parentFile}">
+ <ant:exclude name="**/target/**"/>
+ <ant:exclude name="**/*.log"/>
+ </ant:fileset>
+ </j:forEach>
+ </ant:copy>
+
+ <ant:copy todir="${maven.dist.src.assembly.dir}/xdocs">
+ <ant:fileset dir="xdocs"/>
+ </ant:copy>
+
+ </goal>
+
<goal name="xjavadoc">
<ant:mkdir dir="${maven.build.dir}/docs/api" />
1.3 +1 -0 avalon/util/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/avalon/util/project.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- project.xml 10 Dec 2003 10:09:14 -0000 1.2
+++ project.xml 11 Dec 2003 07:00:19 -0000 1.3
@@ -7,6 +7,7 @@
<name>Avalon Utilities</name>
<package>org.apache.avalon.util</package>
<shortDescription>Avaon Utilities</shortDescription>
+ <currentVersion>1.0-RC1</currentVersion>
<organization>
<name>Apache Software Foundation</name>
1.2 +49 -1 avalon/util/xdocs/criteria/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/avalon/util/xdocs/criteria/index.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.xml 6 Dec 2003 22:14:20 -0000 1.1
+++ index.xml 11 Dec 2003 07:00:19 -0000 1.2
@@ -56,7 +56,55 @@
<body>
<section name="Criteria">
<subsection name="Overview">
- <p>IN PREPARATION</p>
+ <p>
+ The criteria package contains a parameterize Map implementation.
+ A set of parameters are supplied on creation that are used by the
+ implementation to (a) qualify values supplied, and (b) resolve values
+ that are requested.
+ </p>
+ </subsection>
+ <subsection name="Example">
+
+ <p>
+ The criteria object created below is now restricted to
+ the two keys "name" and "home". The user of the class can
+ assign String values which will be resolved to the type of
+ object declared by the corresponding parameter object.
+ </p>
+ <source>
+Parameter[] params = new Parameter[]{
+ new Parameter( "name", String.class, null ),
+ new Parameter( "home",
+ File.class, new File( System.getProperty( "user.dir" ) ) ) };
+Map criteria = new Criteria( params );
+ </source>
+ <p>
+ For example:
+ </p>
+ <source>
+public void setParameters( Map map )
+{
+ map.put( "home", "my-directory" );
+
+ //
+ // now just for fun - lets get the value using the "home"
+ // key as a File
+ //
+
+ File home = (File) map.get( "home" );
+
+ //
+ // and just to prove the point - we can also put values
+ // directory into the map the correspond to the parameterized
+ // type .. e.g.:
+ //
+
+ map.put( "home", home );
+
+}</source>
+ <p>
+ What all this means is that a we have a type safe Map implementation.
+ </p>
</subsection>
</section>
</body>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]