Author: mcconnell
Date: Mon Jun 14 20:46:57 2004
New Revision: 21254
Added:
avalon/trunk/central/system/setup/
avalon/trunk/central/system/setup/integrity.xml
avalon/trunk/central/system/setup/setup.xml
Removed:
avalon/trunk/central/system/build/integrity.xml
Modified:
avalon/trunk/build.xml
avalon/trunk/central/system/index.properties
avalon/trunk/central/system/index.xml
avalon/trunk/tools/magic/bootstrap.xml
avalon/trunk/tools/magic/build.properties
avalon/trunk/tools/magic/build.xml
avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/BarTask.java
Log:
Add a name parameter to the bar task to support situations where we want a bar file representing an entire package group. Add a setup target to the top-level build file and put in place bootstrapping support for creation of the initial repository and antlib.
Modified: avalon/trunk/build.xml
==============================================================================
--- avalon/trunk/build.xml (original)
+++ avalon/trunk/build.xml Mon Jun 14 20:46:57 2004
@@ -4,12 +4,12 @@
<property file="build.properties"/>
- <target name="bootstrap">
- <ant dir="${basedir}/tools/project" antfile="bootstrap.xml"/>
+ <target name="setup">
+ <ant dir="${basedir}/central/system" antfile="setup/setup.xml"/>
</target>
<target name="integrity-check">
- <ant inheritall="false" dir="central/system/build" antfile="integrity.xml"/>
+ <ant inheritall="false" dir="central/system/setup" antfile="integrity.xml"/>
</target>
<target name="clean" depends="integrity-check">
Modified: avalon/trunk/central/system/index.properties
==============================================================================
--- avalon/trunk/central/system/index.properties (original)
+++ avalon/trunk/central/system/index.properties Mon Jun 14 20:46:57 2004
@@ -4,7 +4,7 @@
#------------------------------------------------------------------
#
-# Cache directory into which buidl artifacts are registered.
+# Cache directory into which build artifacts are registered.
# Value may be an absolute or relative filename. Relative
# filenames will be resolved relative to ${project.home}.
@@ -14,4 +14,9 @@
# A sequence of remote repositories used to resolve artifacts
# requested as part of the build process.
-avalon.hosts = http://www.dpml.net/;http://www.apache.org/dist/java-repository/;http://www.ibiblio.org/maven/
+dpml.net = http://www.dpml.net
+java.repo = http://www.apache.org/dist/java-repository
+ibiblio.org = http://www.ibiblio.org/maven
+
+avalon.hosts = ${dpml.net}/;${java.repo}/;${ibiblio.org}/maven/
+avalon.tools.bar.url = ${dpml.net}/avalon/tools/bars/avalon-tools.bar
Modified: avalon/trunk/central/system/index.xml
==============================================================================
--- avalon/trunk/central/system/index.xml (original)
+++ avalon/trunk/central/system/index.xml Mon Jun 14 20:46:57 2004
@@ -88,7 +88,6 @@
<info>
<group>avalon/tools</group>
<name>avalon-tools-magic</name>
- <version>1.0.0</version>
</info>
</project>
Added: avalon/trunk/central/system/setup/integrity.xml
==============================================================================
--- (empty file)
+++ avalon/trunk/central/system/setup/integrity.xml Mon Jun 14 20:46:57 2004
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="integrity" default="check-for-project" basedir="." xmlns:x="antlib:org.apache.avalon.tools">
+
+ <available property="project.available" classname="org.apache.avalon.tools.home.Home"/>
+
+ <target name="check-for-project" unless="project.available">
+
+ <echo>
+#--------------------------------------------------------------------------------
+# Please invoke the bootstrap target in order to install prerequisite resources
+# and tools necessary to build avalon.
+#
+# $ ant setup
+#
+# Once the bootstrap resources have been build you can proceed with any of the
+# classic build targets.
+#--------------------------------------------------------------------------------
+ </echo>
+ <fail message="Bootstrap resources not present."/>
+ </target>
+
+</project>
Added: avalon/trunk/central/system/setup/setup.xml
==============================================================================
--- (empty file)
+++ avalon/trunk/central/system/setup/setup.xml Mon Jun 14 20:46:57 2004
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="setup" default="setup" basedir=".">
+
+ <!--
+ TODO
+ Check for jdk 1.4 as the build system prerequisite.
+ Check for ant 1.6.1 minimum version.
+ Check for dependent ant libs (junit, xsl stuff, etc.)
+ and if not available download and add to
+ ${user.home}/.ant/lib.
+ -->
+
+ <property file="index.properties"/>
+ <property name="cache.dir" value="${basedir}/${avalon.cache}"/>
+ <property name="cache.tools.dir" value="${cache.dir}/avalon/tools"/>
+ <property name="cache.tools.bars.dir" value="${cache.tools.dir}/bars"/>
+ <property name="tools.bar" value="${cache.tools.bars.dir}/avalon-tools.bar"/>
+ <property name="ant.lib" value="${user.home}/.ant/lib"/>
+
+ <target name="setup" depends="setup-repository,setup-antlib">
+ <echo message="Setup complete."/>
+ </target>
+
+ <target name="setup-repository">
+ <echo message="Preparing central system repository..."/>
+ <mkdir dir="${cache.tools.bars.dir}"/>
+ <get src="${avalon.tools.bar.url}" usetimestamp="true"
+ dest="${tools.bar}"/>
+ <unzip src="${tools.bar}" dest="${cache.tools.dir}">
+ <patternset>
+ <include name="**/*"/>
+ <exclude name="META-INF/**"/>
+ <exclude name="**/bars/**"/>
+ </patternset>
+ </unzip>
+ </target>
+
+ <target name="setup-antlib" depends="setup-repository">
+ <echo message="Preparing supporting tools..."/>
+ <mkdir dir="${ant.lib}"/>
+ <copy toDir="${ant.lib}">
+ <fileset dir="${cache.tools.dir}/jars">
+ <include name="avalon-tools-*.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+</project>
Modified: avalon/trunk/tools/magic/bootstrap.xml
==============================================================================
--- avalon/trunk/tools/magic/bootstrap.xml (original)
+++ avalon/trunk/tools/magic/bootstrap.xml Mon Jun 14 20:46:57 2004
@@ -19,7 +19,7 @@
<property name="target.deliverables.dir" value="${target}/deliverables"/>
<property name="target.deliverables.jars.dir" value="${target.deliverables.dir}/jars"/>
- <property name="toolkit.jar" value="${project.name}-${bootstrap-version}.jar"/>
+ <property name="toolkit.jar" value="${project.name}.jar"/>
<target name="prepare">
Modified: avalon/trunk/tools/magic/build.properties
==============================================================================
--- avalon/trunk/tools/magic/build.properties (original)
+++ avalon/trunk/tools/magic/build.properties Mon Jun 14 20:46:57 2004
@@ -1,5 +1,3 @@
project.name = avalon-tools-magic
project.home = ../../central/system
-bootstrap-version = 1.0.0
-
Modified: avalon/trunk/tools/magic/build.xml
==============================================================================
--- avalon/trunk/tools/magic/build.xml (original)
+++ avalon/trunk/tools/magic/build.xml Mon Jun 14 20:46:57 2004
@@ -7,7 +7,13 @@
<import file="${project.home}/build/standard.xml"/>
<target name="package" depends="standard.package">
- <x:bar/>
+ <x:bar name="avalon-tools.bar"/>
+ </target>
+
+ <target name="install" depends="standard.install">
+ <mkdir dir="${user.home}/.ant/lib"/>
+ <copy toDir="${user.home}/.ant/lib"
+ file="${project.target}/deliverables/jars/${project.name}.jar"/>
</target>
</project>
Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/BarTask.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/BarTask.java (original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/BarTask.java Mon Jun 14 20:46:57 2004
@@ -51,13 +51,32 @@
public static final String BAR_EXT = "bar";
public static final String ASC_EXT = "asc";
public static final String GPG_EXE_KEY = "project.gpg.exe";
+
+ private String m_name;
+
+ public void setName( String name )
+ {
+ m_name = name;
+ }
+ private String getName( Definition def )
+ {
+ if( null == m_name )
+ {
+ return def.getFilename( BAR_EXT );
+ }
+ else
+ {
+ return m_name;
+ }
+ }
+
public void execute() throws BuildException
{
File deliverables =
getContext().getDeliverablesDirectory();
Definition def = getHome().getDefinition( getKey() );
- String filename = def.getFilename( BAR_EXT );
+ String filename = getName( def );
String type = def.getInfo().getType();
File types = new File( deliverables, BAR_EXT + "s" );
File bar = new File( types, filename );
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.