Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1761 - in development/main: . home home/transit home/transit/handler home/transit/handler/etc/conf home/transit/handler/etc/setup/authority home/transit/handler/src/main/net/dpml/io home/transit/handler/src/main/net/dpml/transit home/transit/handler/src/main/net/dpml/transit/artifact home/transit/handler/src/main/net/dpml/transit/monitors home/transit/plugin home/transit/plugin/etc/bin home/transit/plugin/src/main/net/dpml/transit/control home/transit/tools home/transit/tools/src/main/net/dpml/transit/tools home/util home/util/cli magic magic/core metro metro/composition/impl/src/main/net/dpml/composition/model/impl metro/main metro/main/etc/conf

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1761 - in development/main: . home home/transit home/transit/handler home/transit/handler/etc/conf home/transit/handler/etc/setup/authority home/transit/handler/src/main/net/dpml/io home/transit/handler/src/main/net/dpml/transit home/transit/handler/src/main/net/dpml/transit/artifact home/transit/handler/src/main/net/dpml/transit/monitors home/transit/plugin home/transit/plugin/etc/bin home/transit/plugin/src/main/net/dpml/transit/control home/transit/tools home/transit/tools/src/main/net/dpml/transit/tools home/util home/util/cli magic magic/core metro metro/composition/impl/src/main/net/dpml/composition/model/impl metro/main metro/main/etc/conf
  • Date: Fri, 11 Feb 2005 19:25:56 +0100

Author: mcconnell
Date: Fri Feb 11 19:25:55 2005
New Revision: 1761

Added:
development/main/home/transit/handler/etc/conf/
development/main/home/transit/handler/etc/conf/standard.cfg
development/main/home/transit/handler/etc/conf/transit.ico (contents,
props changed)
development/main/home/transit/handler/src/main/net/dpml/io/

development/main/home/transit/handler/src/main/net/dpml/io/CascadingIOException.java

development/main/home/transit/handler/src/main/net/dpml/io/ResourceHelper.java

development/main/home/transit/handler/src/main/net/dpml/io/ResourceNotFoundException.java
development/main/home/transit/handler/src/main/net/dpml/io/package.html
development/main/metro/main/etc/conf/
Modified:
development/main/build.bat
development/main/build.xml
development/main/home/build.properties
development/main/home/build.xml
development/main/home/common.properties
development/main/home/standard.xml
development/main/home/transit/build.xml
development/main/home/transit/handler/ (props changed)
development/main/home/transit/handler/build.properties
development/main/home/transit/handler/build.xml
development/main/home/transit/handler/etc/setup/authority/cache.properties
development/main/home/transit/handler/etc/setup/authority/hosts.xml

development/main/home/transit/handler/src/main/net/dpml/transit/Installer.java
development/main/home/transit/handler/src/main/net/dpml/transit/Main.java

development/main/home/transit/handler/src/main/net/dpml/transit/Transit.java

development/main/home/transit/handler/src/main/net/dpml/transit/artifact/FileCacheHandler.java

development/main/home/transit/handler/src/main/net/dpml/transit/artifact/ResourceHostFactory.java

development/main/home/transit/handler/src/main/net/dpml/transit/artifact/SecuredTransitContext.java

development/main/home/transit/handler/src/main/net/dpml/transit/artifact/XMLHostsBuilder.java

development/main/home/transit/handler/src/main/net/dpml/transit/monitors/Monitor.java
development/main/home/transit/plugin/build.xml
development/main/home/transit/plugin/etc/bin/transit.bat

development/main/home/transit/plugin/src/main/net/dpml/transit/control/CommandHandler.java
development/main/home/transit/tools/build.xml

development/main/home/transit/tools/src/main/net/dpml/transit/tools/ImportArtifactTask.java

development/main/home/transit/tools/src/main/net/dpml/transit/tools/MainTask.java
development/main/home/util/build.xml
development/main/home/util/cli/build.xml
development/main/magic/build.xml
development/main/magic/core/build.xml
development/main/magic/module.xml

development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultCompositionFactory.java

development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultDeploymentModel.java

development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultModelFactory.java
development/main/metro/main/ (props changed)
development/main/metro/main/build.xml
development/main/metro/module.xml
Log:
Update the codebase and build files to reflect separation of system and user
resources. Added build hooks for the creation of transit.exe and metro.exe.

Modified: development/main/build.bat
==============================================================================
--- development/main/build.bat (original)
+++ development/main/build.bat Fri Feb 11 19:25:55 2005
@@ -1,2 +1,3 @@

-ant transit&ant magic&ant metro&ant central&ant planet
+del %USERPROFILE%\.ant\lib\dpml-*.*
+cd home&ant clean install&cd ..\magic&ant clean install&cd ..\metro&ant
clean install&cd C:\dev\osm\depot\installer&ant clean install

Modified: development/main/build.xml
==============================================================================
--- development/main/build.xml (original)
+++ development/main/build.xml Fri Feb 11 19:25:55 2005
@@ -25,7 +25,7 @@
<property file="${basedir}/build.properties"/>

<target name="home">
- <ant dir="home" target="update"/>
+ <ant dir="home"/>
</target>

<target name="transit" depends="home"
@@ -63,7 +63,6 @@
<ant dir="planet" target="clean"/>
</target>

-
<target name="junit-report">
<mkdir dir="target/reports/junit"/>
<junitreport todir="target/reports/junit">

Modified: development/main/home/build.properties
==============================================================================
--- development/main/home/build.properties (original)
+++ development/main/home/build.properties Fri Feb 11 19:25:55 2005
@@ -3,7 +3,5 @@
project.name = dpml-home
project.group = dpml/home
dpml.repository = http://repository.dpml.net/classic
-junit.filename = junit-3.8.1.jar
-junit.uri = artifact:jar:junit/junit#3.8.1
ant.junit.filename = ant-junit-1.6.2.jar
ant.junit.uri = artifact:jar:ant/ant-junit#1.6.2

Modified: development/main/home/build.xml
==============================================================================
--- development/main/home/build.xml (original)
+++ development/main/home/build.xml Fri Feb 11 19:25:55 2005
@@ -22,19 +22,28 @@
<project name="dpml-home" default="install" basedir=".">

<import file="${basedir}/standard.xml"/>
+
<property name="bundle" value="${basedir}/target/bundle"/>
<property name="dist" location="${basedir}/target/dist"/>

- <condition property="nsi.available" value="false">
- <isset property="makensis.exe"/>
- </condition>
-
<target name="init" depends="standard.init">
<filter token="PROJECT-NAME" value="${project.name}"/>
<filter token="PROJECT-VERSION" value="${project.version}"/>
</target>

- <target name="install" depends="standard.install,bundle">
+ <target name="prepare" depends="standard.prepare">
+ <ant dir="transit/handler" inheritall="false"/>
+ <ant dir="transit/tools" inheritall="false"/>
+ <ant dir="util/exception" inheritall="false"/>
+ <ant dir="util/i18n" inheritall="false"/>
+ <ant dir="util/criteria" inheritall="false"/>
+ <ant dir="util/cli" inheritall="false"/>
+ <ant dir="transit/plugin" inheritall="false"/>
+ <ant dir="util" inheritall="false"/>
+ <ant dir="transit" inheritall="false"/>
+ </target>
+
+ <target name="package"
depends="standard.package,install.junit,install.ant.junit">
<mkdir dir="${dist}"/>
<antcall target="install.zip"/>
<antcall target="install.tar"/>
@@ -43,70 +52,12 @@
<copy todir="${export}">
<fileset dir="${dist}"/>
</copy>
- <antcall target="install-antlib"/>
</target>

- <target name="install.zip">
- <echo message="Generating ZIP dist"/>
- <zip destfile="${dist}/${project.name}-${project.version}.zip"
whenempty="create">
- <zipfileset dir="${bundle}/bin" prefix="bin">
- <include name="*.*"/>
- <include name="security.policy"/>
- </zipfileset>
- <zipfileset dir="${bundle}">
- <include name="**/*"/>
- <exclude name="bin/**"/>
- </zipfileset>
- </zip>
- <checksum fileext=".md5"
file="${dist}/${project.name}-${project.version}.zip"/>
- <antcall target="install.zip.asc"/>
- </target>
-
- <target name="install.zip.asc" if="gpg.declared">
- <delete file="${dist}/${project.name}-${project.version}.zip.asc"/>
- <exec executable="${project.gpg.exe}">
- <arg value="-a"/>
- <arg value="-b"/>
- <arg value="-o"/>
- <arg value="${dist}/${project.name}-${project.version}.zip.asc"/>
- <arg value="${dist}/${project.name}-${project.version}.zip"/>
- </exec>
- </target>
-
- <target name="install.tar">
- <echo message="Generating TAR dist"/>
- <tar destfile="${dist}/${project.name}-${project.version}.tar.gz"
compression="gzip" longfile="gnu">
- <tarfileset dir="${bundle}/bin" prefix="bin">
- <include name="security.policy"/>
- <include name="*.bat"/>
- </tarfileset>
- <tarfileset dir="${bundle}/bin" prefix="bin" mode="755">
- <include name="*.sh"/>
- <include name="transit"/>
- </tarfileset>
- <tarfileset dir="${bundle}">
- <include name="**/*"/>
- <exclude name="bin/**"/>
- </tarfileset>
- </tar>
- <checksum fileext=".md5"
file="${dist}/${project.name}-${project.version}.tar.gz"/>
- <antcall target="install.tar.asc"/>
- </target>
-
- <target name="install.tar.asc" if="gpg.declared">
- <delete file="${dist}/${project.name}-${project.version}.tar.gz.asc"/>
- <exec executable="${project.gpg.exe}">
- <arg value="-a"/>
- <arg value="-b"/>
- <arg value="-o"/>
- <arg value="${dist}/${project.name}-${project.version}.tar.gz.asc"/>
- <arg value="${dist}/${project.name}-${project.version}.tar.gz"/>
- </exec>
- </target>
-
- <target name="bundle"
depends="init,install.children,install.junit,install.ant.junit">
+ <target name="build" depends="standard.build">
<delete dir="${basedir}/target/bundle"/>
<mkdir dir="${bundle}/cache"/>
+
<!-- create the transit configuration directory -->
<property name="root" value="${bundle}/transit"/>
<echo>Adding Transit application properties to ${root}</echo>
@@ -114,8 +65,9 @@
<copy todir="${root}">
<fileset dir="${basedir}/transit/handler/target/setup"/>
</copy>
+
<!-- include the util package -->
- <property name="local" value="${bundle}/local/${project.version}"/>
+ <property name="local" value="${bundle}/local"/>
<echo>Creating local repository ${local}</echo>
<mkdir dir="${local}/dpml/util"/>
<mkdir dir="${local}/${commons-cli.parent}"/>
@@ -123,6 +75,7 @@
<fileset dir="${dpml.cache}/${commons-cli.parent}"/>
</copy>

+ <!-- build the library -->
<mkdir dir="${local}/${transit-ant.parent}"/>
<copy todir="${local}/${transit-ant.parent}">
<fileset dir="${dpml.cache}/${transit-ant.parent}">
@@ -130,14 +83,12 @@
<include name="${ant.junit.filename}"/>
</fileset>
</copy>
-
<mkdir dir="${local}/junit/jars"/>
<copy todir="${local}/junit/jars">
<fileset dir="${dpml.cache}/junit/jars">
<include name="${junit.filename}"/>
</fileset>
</copy>
-
<copy todir="${local}/dpml/util">
<fileset dir="${basedir}/util/target/deliverables"/>
<fileset dir="${basedir}/util/cli/target/deliverables"/>
@@ -153,6 +104,7 @@
<fileset dir="${basedir}/transit/tools/target/deliverables"/>
<fileset dir="${basedir}/transit/plugin/target/deliverables"/>
</copy>
+
<!-- create the bin directory -->
<property name="bin" value="${bundle}/bin"/>
<echo>Adding scripts from ${bin}</echo>
@@ -160,6 +112,11 @@
<copy todir="${bin}">
<fileset dir="${basedir}/transit/plugin/target/bin"/>
</copy>
+ <mkdir dir="${bin}/win32"/>
+ <copy toDir="${bin}/win32/">
+ <fileset dir="${basedir}/transit/handler/target/win32"/>
+ </copy>
+
<!-- create the api doc directory -->
<property name="api" value="${bundle}/docs/api"/>
<echo>Adding api documentation to ${api}</echo>
@@ -171,6 +128,7 @@
<copy todir="${api}/dpml/transit/${project.version}">
<fileset dir="${basedir}/transit/target/api"/>
</copy>
+
<!-- create the README and LICENSE files-->
<copy todir="${bundle}" filtering="true">
<fileset dir="${basedir}">
@@ -179,18 +137,129 @@
<include name="NOTICE.TXT"/>
</fileset>
</copy>
+
<!-- add the standard.xml build procedure as a template -->
<property name="templates" value="${local}/dpml/transit/templates"/>
<echo>Adding build template to ${templates}</echo>
<mkdir dir="${templates}"/>
<copy tofile="${templates}/standard.template"
file="${basedir}/standard.xml"/>
+
+ </target>
+
+ <target name="install" depends="standard.install">
+ <echo>
+#----------------------------------------------------------------------------------
+# Updating DPML SYSTEM installation. ${dpml.system}
+#----------------------------------------------------------------------------------
+ </echo>
+ <copy todir="${dpml.system}" preservelastmodified="true">
+ <fileset dir="${bundle}">
+ <include name="bin/**"/>
+ </fileset>
+ </copy>
+ <echo>
+#----------------------------------------------------------------------------------
+# Updating DPML DATA installation. ${dpml.data}
+#----------------------------------------------------------------------------------
+ </echo>
+ <copy todir="${dpml.data}" preservelastmodified="true">
+ <fileset dir="${bundle}">
+ <include name="docs/**"/>
+ </fileset>
+ </copy>
+ <mkdir dir="${dpml.cache}/dpml/transit/templates"/>
+ <copy toFile="${dpml.cache}/dpml/transit/templates/standard.template"
+ file="${basedir}/standard.xml"/>
+ <echo>
+#----------------------------------------------------------------------------------
+# Updating DPML PREFS installation. ${dpml.prefs}
+#----------------------------------------------------------------------------------
+ </echo>
+ <copy todir="${dpml.prefs}">
+ <fileset dir="${bundle}">
+ <include name="transit/**"/>
+ </fileset>
+ </copy>
+ <echo>
+#----------------------------------------------------------------------------------
+# Updating Ant. ${user.dir}/.ant/lib
+#----------------------------------------------------------------------------------
+ </echo>
+ <delete verbose="true" failonerror="false">
+ <fileset dir="${user.home}/.ant/lib">
+ <include name="dpml-*.*"/>
+ <exclude name="dpml-transit-main.jar"/>
+ <exclude name="dpml-transit-tools.jar"/>
+ </fileset>
+ </delete>
+ <copy tofile="${user.home}/.ant/lib/dpml-transit-main.jar"
+
file="${bundle}/local/dpml/transit/jars/dpml-transit-main-${project.version}.jar"/>
+ <copy tofile="${user.home}/.ant/lib/dpml-transit-tools.jar"
+
file="${bundle}/local/dpml/transit/jars/dpml-transit-tools-${project.version}.jar"/>
+ </target>
+
+ <!-- internal utilities -->
+
+ <target name="install.zip">
+ <echo message="Generating ZIP dist"/>
+ <zip destfile="${dist}/${project.name}-${project.version}.zip"
whenempty="create">
+ <zipfileset dir="${bundle}/bin" prefix="bin"/>
+ <zipfileset dir="${bundle}">
+ <include name="**/*"/>
+ <exclude name="bin/**"/>
+ </zipfileset>
+ </zip>
+ <checksum fileext=".md5"
file="${dist}/${project.name}-${project.version}.zip"/>
+ <antcall target="install.zip.asc"/>
+ </target>
+
+ <target name="install.zip.asc" if="gpg.declared">
+ <delete file="${dist}/${project.name}-${project.version}.zip.asc"/>
+ <exec executable="${project.gpg.exe}">
+ <arg value="-a"/>
+ <arg value="-b"/>
+ <arg value="-o"/>
+ <arg value="${dist}/${project.name}-${project.version}.zip.asc"/>
+ <arg value="${dist}/${project.name}-${project.version}.zip"/>
+ </exec>
+ </target>
+
+ <target name="install.tar">
+ <echo message="Generating TAR dist"/>
+ <tar destfile="${dist}/${project.name}-${project.version}.tar.gz"
compression="gzip" longfile="gnu">
+ <tarfileset dir="${bundle}/bin" prefix="bin">
+ <include name="security.policy"/>
+ <include name="*.bat"/>
+ </tarfileset>
+ <tarfileset dir="${bundle}/bin" prefix="bin" mode="755">
+ <include name="*.sh"/>
+ <include name="transit"/>
+ </tarfileset>
+ <tarfileset dir="${bundle}">
+ <include name="**/*"/>
+ <exclude name="bin/**"/>
+ </tarfileset>
+ </tar>
+ <checksum fileext=".md5"
file="${dist}/${project.name}-${project.version}.tar.gz"/>
+ <antcall target="install.tar.asc"/>
+ </target>
+
+ <target name="install.tar.asc" if="gpg.declared">
+ <delete file="${dist}/${project.name}-${project.version}.tar.gz.asc"/>
+ <exec executable="${project.gpg.exe}">
+ <arg value="-a"/>
+ <arg value="-b"/>
+ <arg value="-o"/>
+ <arg value="${dist}/${project.name}-${project.version}.tar.gz.asc"/>
+ <arg value="${dist}/${project.name}-${project.version}.tar.gz"/>
+ </exec>
</target>

<target name="transit.setup" depends="init">
<taskdef uri="antlib:net.dpml.transit"
resource="net/dpml/transit/antlib.xml">
<classpath>
- <pathelement
location="${dpml.home}/cache/dpml/transit/jars/dpml-transit-main-${project.version}.jar"/>
- <pathelement
location="${dpml.home}/cache/dpml/transit/jars/dpml-transit-tools-${project.version}.jar"/>
+ <pathelement
location="${dpml.cache}/dpml/transit/jars/dpml-transit-main-${project.version}.jar"/>
+ <pathelement
location="${dpml.cache}/dpml/transit/jars/dpml-transit-tools-${project.version}.jar"/>
</classpath>
</taskdef>
</target>
@@ -213,47 +282,7 @@
uri="${ant.junit.uri}"/>
</target>

- <target name="install.children">
- <ant dir="transit/handler" inheritall="false"/>
- <ant dir="transit/tools" inheritall="false"/>
- <ant dir="util/exception" inheritall="false"/>
- <ant dir="util/i18n" inheritall="false"/>
- <ant dir="util/criteria" inheritall="false"/>
- <ant dir="util/cli" inheritall="false"/>
- <ant dir="transit/plugin" inheritall="false"/>
- <ant dir="util" inheritall="false"/>
- <ant dir="transit" inheritall="false"/>
- </target>
-
- <target name="update" depends="install">
- <echo>
-#----------------------------------------------------------------------------------
-# Updating DPML installation. ${dpml.home}
-#----------------------------------------------------------------------------------
- </echo>
- <copy todir="${dpml.home}">
- <fileset dir="${bundle}"/>
- </copy>
- </target>
-
- <target name="install-antlib" depends="init">
- <echo>
-#----------------------------------------------------------------------------------
-# Updating Ant. ${user.dir}/.ant/lib
-#----------------------------------------------------------------------------------
- </echo>
- <delete verbose="true" failonerror="false">
- <fileset dir="${user.home}/.ant/lib">
- <include name="dpml-*.*"/>
- <exclude name="dpml-transit-main.jar"/>
- <exclude name="dpml-transit-tools.jar"/>
- </fileset>
- </delete>
- <copy tofile="${user.home}/.ant/lib/dpml-transit-main.jar"
-
file="${bundle}/local/${project.version}/dpml/transit/jars/dpml-transit-main-${project.version}.jar"/>
- <copy tofile="${user.home}/.ant/lib/dpml-transit-tools.jar"
-
file="${bundle}/local/${project.version}/dpml/transit/jars/dpml-transit-tools-${project.version}.jar"/>
- </target>
+ <target name="update" depends="install"/>

<target name="clean">
<delete includeemptydirs="true">

Modified: development/main/home/common.properties
==============================================================================
--- development/main/home/common.properties (original)
+++ development/main/home/common.properties Fri Feb 11 19:25:55 2005
@@ -2,6 +2,7 @@
dpml.repository = http://repository.dpml.net/classic

junit.filename = junit-3.8.1.jar
+junit.uri = artifact:jar:junit/junit#3.8.1

commons-cli.version = 1.0
commons-cli.filename = commons-cli-${commons-cli.version}.jar

Modified: development/main/home/standard.xml
==============================================================================
--- development/main/home/standard.xml (original)
+++ development/main/home/standard.xml Fri Feb 11 19:25:55 2005
@@ -27,43 +27,106 @@
-->

<property environment="ENV"/>
+
<property file="${basedir}/user.properties"/>
<property file="${home}/user.properties"/>
<property file="${basedir}/build.properties"/>
<property file="${home}/common.properties"/>

- <condition property="dpml.env.declared" value="false">
+ <condition property="dpml.appdata.declared" value="false">
+ <isset property="ENV.APPDATA"/>
+ </condition>
+
+ <condition property="dpml.programfiles.declared" value="false">
+ <isset property="ENV.ProgramFiles"/>
+ </condition>
+
+ <condition property="dpml.home.declared" value="false">
<isset property="ENV.DPML_HOME"/>
</condition>

+ <condition property="dpml.system.declared" value="false">
+ <isset property="ENV.DPML_SYSTEM"/>
+ </condition>
+
<condition property="gpg.declared" value="false">
<isset property="project.gpg.exe"/>
</condition>

- <target name="setup" depends="dpml-home-setup,junit-setup"/>
+ <condition property="isWindows" value="true">
+ <os family="windows"/>
+ </condition>

- <target name="dpml-home-setup"
depends="dpml-home-environment,dpml-home-default,dpml-home-create"/>
+ <target name="setup" depends="dpml-setup,junit-setup"/>

- <target name="dpml-home-environment" if="dpml.env.declared">
- <property name="dpml.home" value="${ENV.DPML_HOME}"/>
+ <target name="dpml-setup"
depends="dpml-home,dpml-data,dpml-prefs,dpml-system"/>
+
+ <target name="dpml-home-environment" if="dpml.home.declared">
+ <property name="dpml.home" location="${ENV.DPML_HOME}"/>
</target>

- <target name="dpml-home-default" unless="dpml.env.declared">
- <property name="dpml.home" value="${user.home}/.dpml"/>
+ <target name="dpml-appdata-environment" depends="dpml-home-environment"
unless="dpml.home.declared" if="dpml.appdata.declared">
+ <property name="dpml.home" location="${ENV.APPDATA}/DPML"/>
</target>

- <target name="dpml-home-create">
+ <target name="dpml-home-default" depends="dpml-appdata-environment"
unless="dpml.home.declared">
+ <property name="dpml.home" location="${user.home}/.dpml"/>
+ </target>
+
+ <target name="dpml-home" depends="dpml-home-default">
<mkdir dir="${dpml.home}"/>
- <property name="dpml.cache" location="${dpml.home}/cache"/>
- <property name="dpml.docs" location="${dpml.home}/docs"/>
- <property name="dpml.dist" location="${dpml.home}/dist"/>
+ </target>
+
+ <target name="dpml-data-unix" depends="dpml-home" unless="isWindows">
+ <property name="dpml.data" location="${dpml.home}/data"/>
+ </target>
+
+ <target name="dpml-data-windows" depends="dpml-home" if="isWindows">
+ <property name="dpml.data" location="${dpml.home}/Data"/>
+ </target>
+
+ <target name="dpml-data" depends="dpml-data-unix,dpml-data-windows">
+ <mkdir dir="${dpml.data}"/>
+ <property name="dpml.cache" location="${dpml.data}/cache"/>
+ <property name="dpml.docs" location="${dpml.data}/docs"/>
+ <property name="dpml.dist" location="${dpml.data}/dist"/>
<mkdir dir="${dpml.cache}"/>
<mkdir dir="${dpml.docs}"/>
<mkdir dir="${dpml.dist}"/>
</target>

- <target name="junit-test">
- <available property="junit.available"
file="${user.home}/.ant/lib/${junit.filename}"/>
+ <target name="dpml-prefs-unix" depends="dpml-home" unless="isWindows">
+ <property name="dpml.prefs" location="${dpml.prefs}/prefs"/>
+ </target>
+
+ <target name="dpml-prefs-windows" depends="dpml-home" if="isWindows">
+ <property name="dpml.prefs" location="${dpml.home}/Preferences"/>
+ </target>
+
+ <target name="dpml-prefs" depends="dpml-prefs-unix,dpml-prefs-windows">
+ <mkdir dir="${dpml.prefs}"/>
+ </target>
+
+ <target name="dpml-system"
depends="dpml-system-environment,dpml-system-default">
+ <mkdir dir="${dpml.system}"/>
+ </target>
+
+ <target name="dpml-system-environment" if="dpml.system.declared">
+ <property name="dpml.system" location="${ENV.DPML_SYSTEM}"/>
+ </target>
+
+ <target name="dpml-system-programfiles" depends="dpml-system-environment"
+ if="dpml.programfiles.declared" unless="dpml.system.declared">
+ <property name="programfiles" location="${ENV.ProgramFiles}"/>
+ <property name="dpml.system" location="${programfiles}/DPML"/>
+ </target>
+
+ <target name="dpml-system-default"
depends="dpml-system-programfiles,dpml-home">
+ <property name="dpml.system" location="${dpml.home}"/>
+ </target>
+
+ <target name="junit-test" depends="dpml-data">
+ <available property="junit.available"
file="${user.home}/.ant/lib/junit.jar"/>
</target>

<target name="junit-setup" depends="junit-test" unless="junit.available">
@@ -73,15 +136,10 @@
# Installing JUnit

#----------------------------------------------------------------------------------
</echo>
- <mkdir dir="${dpml.home}/cache/junit/jars"/>
- <get src="${junit.url}" usetimestamp="true"
- dest="${dpml.home}/cache/junit/jars/${junit.filename}"/>
+ <mkdir dir="${dpml.cache}/junit/jars"/>
+ <get src="${junit.url}" usetimestamp="true"
dest="${dpml.cache}/junit/jars/${junit.filename}"/>
<mkdir dir="${user.home}/.ant/lib"/>
- <copy toDir="${user.home}/.ant/lib">
- <fileset dir="${dpml.home}/cache/junit/jars">
- <include name="${junit.filename}"/>
- </fileset>
- </copy>
+ <copy tofile="${user.home}/.ant/lib/junit.jar"
file="${dpml.cache}/junit/jars/${junit.filename}"/>
<echo>

#----------------------------------------------------------------------------------
# The build procedure has updated the contents of the .ant/lib directory.
In order
@@ -149,12 +207,12 @@
</path>
<path id="project.test.path">
<path refid="project.main.path"/>
- <pathelement
location="${dpml.home}/cache/junit/jars/${junit.filename}"/>
+ <pathelement location="${dpml.cache}/junit/jars/${junit.filename}"/>
</path>
</target>

<available file="${etc.deliverables}"
property="etc.deliverables.available"/>
- <target name="prepare-etc-deliverable" depends="init"
if="etc.deliverables.available">
+ <target name="prepare-etc-deliverable" if="etc.deliverables.available">
<mkdir dir="${target.deliverables.dir}"/>
<copy toDir="${target.deliverables.dir}" filtering="on"
failonerror="false">
<fileset dir="${etc.deliverables}">
@@ -164,7 +222,7 @@
</target>

<available file="${etc.main}" property="etc.main.available"/>
- <target name="prepare-etc-main" depends="init" if="etc.main.available">
+ <target name="prepare-etc-main" if="etc.main.available">
<mkdir dir="${target.build.main.dir}"/>
<copy toDir="${target.build.main.dir}" filtering="on"
failonerror="false">
<fileset dir="${etc.main}">
@@ -174,7 +232,7 @@
</target>

<available file="${etc.test}" property="etc.test.available"/>
- <target name="prepare-etc-test" depends="init" if="etc.test.available">
+ <target name="prepare-etc-test" if="etc.test.available">
<!--
Any files in etc/test get copied over to target/test with filtering
applied.
@@ -209,7 +267,7 @@
</target>

<available file="${src.main.dir}" property="src.main.available"/>
- <target name="prepare-src-main" depends="init" if="src.main.available">
+ <target name="prepare-src-main" depends="setup" if="src.main.available">
<!--
Any files in src/main get copied over to target/build/main with filtering
applied.
@@ -223,7 +281,7 @@
</target>

<available file="${src.test.dir}" property="src.test.available"/>
- <target name="prepare-src-test" depends="init" if="src.test.available">
+ <target name="prepare-src-test" if="src.test.available">
<!--
Any files in src/test get copied over to target/build/test with filtering
applied.
@@ -236,7 +294,7 @@
</copy>
</target>

- <target name="prepare-build-main" depends="init" if="src.main.available">
+ <target name="prepare-build-main" if="src.main.available">
<!--
Create the target/classes directory and copy into it anything from
target/build/main
that isn't a java source file.
@@ -249,7 +307,7 @@
</copy>
</target>

- <target name="prepare-build-test" depends="init" if="src.test.available">
+ <target name="prepare-build-test" if="src.test.available">
<!--
Create the target/test-classes directory and copy into it anything from
target/build/test
that isn't a java source file.
@@ -285,11 +343,9 @@
<available file="${target.classes.dir}"
property="target.classes.available"/>
</target>

- <target name="package" depends="package.setup"
if="target.classes.available">
- <antcall target="jar"/>
- </target>
+ <target name="package" depends="jar.asc"/>

- <target name="jar" depends="build">
+ <target name="jar" depends="package.setup" if="target.classes.available">
<mkdir dir="${target.deliverables.jars.dir}"/>
<jar destfile="${target.deliverables.jars.dir}/${project.filename}"
basedir="${target.classes.dir}"
@@ -306,10 +362,13 @@
</manifest>
</jar>
<checksum fileext=".md5"
file="${target.deliverables.jars.dir}/${project.filename}"/>
- <antcall target="jar.asc"/>
</target>

- <target name="jar.asc" if="gpg.declared">
+ <target name="jar.check" depends="jar">
+ <available file="${target.deliverables.jars.dir}/${project.filename}"
property="jar.available"/>
+ </target>
+
+ <target name="jar.asc" depends="jar.check" if="gpg.declared,jar.available">
<echo message="Generating ASC"/>
<delete file="${target.deliverables.jars.dir}/${project.filename}.asc"/>
<exec executable="${project.gpg.exe}">
@@ -369,9 +428,9 @@
<!--
Install any deliverables under the project cache relative to the project
group path.
-->
- <echo>Installing to: ${dpml.home}/cache/${project.group}</echo>
- <mkdir dir="${dpml.home}/cache/${project.group}"/>
- <copy toDir="${dpml.home}/cache/${project.group}" overwrite="true">
+ <echo>Installing to: ${dpml.cache}/${project.group}</echo>
+ <mkdir dir="${dpml.cache}/${project.group}"/>
+ <copy toDir="${dpml.cache}/${project.group}" overwrite="true">
<fileset dir="${target.deliverables.dir}"/>
</copy>
</target>
@@ -380,7 +439,6 @@
<delete dir="${target.dir}"/>
</target>

-
</project>



Modified: development/main/home/transit/build.xml
==============================================================================
--- development/main/home/transit/build.xml (original)
+++ development/main/home/transit/build.xml Fri Feb 11 19:25:55 2005
@@ -56,11 +56,12 @@

<taskdef uri="antlib:net.dpml.transit"
resource="net/dpml/transit/antlib.xml">
<classpath>
- <pathelement
location="${dpml.home}/cache/dpml/transit/jars/dpml-transit-main-${project.version}.jar"/>
- <pathelement
location="${dpml.home}/cache/dpml/transit/jars/dpml-transit-tools-${project.version}.jar"/>
+ <pathelement
location="${dpml.cache}/dpml/transit/jars/dpml-transit-main-${project.version}.jar"/>
+ <pathelement
location="${dpml.cache}/dpml/transit/jars/dpml-transit-tools-${project.version}.jar"/>
</classpath>
</taskdef>

+ <get xmlns="antlib:net.dpml.transit" property="junit.path"
uri="${junit.uri}"/>
<get xmlns="antlib:net.dpml.transit" property="ant.path"
uri="${ant.uri}"/>
<get xmlns="antlib:net.dpml.transit" property="commons-cli.cache.path"
uri="${commons-cli.uri}"/>
<get xmlns="antlib:net.dpml.transit" property="i18n.path"
@@ -83,13 +84,13 @@
<fileset dir="tools/target/build/main"/>
<bottom><![CDATA[<i>Collective Work Copyright &#169; 2004-2005 The <a
href="http://www.dpml.net";>Digial Product Meta Library.</a> All Rights
Reserved.</i>]]></bottom>
<link offline="true" href="http://java.sun.com/j2se/1.4/docs/api";
- packagelistloc="${transit.home}/etc/packagelists/jdk"/>
+ packagelistloc="${home}/etc/packagelists/jdk"/>
<link offline="true" href="http://www.dpml.net/api/commons-cli/1.0";
- packagelistloc="${transit.home}/etc/packagelists/commons-cli"/>
+ packagelistloc="${home}/etc/packagelists/commons-cli"/>
<link offline="true" href="http://www.dpml.net/api/ant/1.6.2";
- packagelistloc="${transit.home}/etc/packagelists/ant"/>
+ packagelistloc="${home}/etc/packagelists/ant"/>
<link offline="true"
href="http://www.dpml.net/api/dpml/util/${project.version}";
- packagelistloc="${transit.home}/util/target/api"/>
+ packagelistloc="${home}/util/target/api"/>
<classpath>
<pathelement location="${i18n.path}"/>
<pathelement location="${cli.path}"/>

Modified: development/main/home/transit/handler/build.properties
==============================================================================
--- development/main/home/transit/handler/build.properties (original)
+++ development/main/home/transit/handler/build.properties Fri Feb 11
19:25:55 2005
@@ -1,7 +1,7 @@

home = ../..
project.test.fork = true
-project.jar.main.class=net.dpml.transit.Installer
+project.jar.main.class=net.dpml.transit.Main
project.group = dpml/transit
project.name = dpml-transit-main
project.specification.version = 1.0
\ No newline at end of file

Modified: development/main/home/transit/handler/build.xml
==============================================================================
--- development/main/home/transit/handler/build.xml (original)
+++ development/main/home/transit/handler/build.xml Fri Feb 11 19:25:55
2005
@@ -21,14 +21,22 @@
<project name="dpml-transit-main" default="install" basedir=".">

<property file="${basedir}/build.properties"/>
+
<import file="${home}/standard.xml"/>

+ <condition property="project.l4j.declared" value="false">
+ <isset property="project.l4j.exe"/>
+ </condition>
+
<target name="init" depends="standard.init">
<filter token="PROJECT-VERSION" value="${project.version}"/>
<filter token="TRANSIT-CONTROLLER-PLUGIN"

value="artifact:plugin:dpml/transit/dpml-transit-plugin#${project.version}"/>
<filter token="TRANSIT-INSTALLER-PLUGIN"
- value="artifact:plugin:osm/util/osm-util-installer#SNAPSHOT"/>
+ value="artifact:plugin:osm/depot/osm-depot-setup#SNAPSHOT"/>
+ <filter token="PROJECT-JAR-PATH"
value="target\deliverables\jars\${project.filename}"/>
+ <filter token="PROJECT-EXE-FILENAME" value="transit.exe"/>
+ <filter token="PROJECT-NAME" value="${project.name}"/>
</target>

<target name="prepare" depends="standard.prepare">
@@ -48,6 +56,16 @@
</manifest>
</jar>
<checksum fileext=".md5"
file="${target.deliverables.jars.dir}/${project.filename}"/>
+ <mkdir dir="target/dist"/>
+ </target>
+
+ <target name="install" depends="standard.install,exe"/>
+
+ <target name="exe" if="project.l4j.declared">
+ <mkdir dir="target/win32"/>
+ <exec executable="${project.l4j.exe}" failonerror="true">
+ <arg line="target\conf\standard.cfg"/>
+ </exec>
</target>

</project>

Added: development/main/home/transit/handler/etc/conf/standard.cfg
==============================================================================
--- (empty file)
+++ development/main/home/transit/handler/etc/conf/standard.cfg Fri Feb 11
19:25:55 2005
@@ -0,0 +1,9 @@
+header consolehead.bin
+jar @PROJECT-JAR-PATH@
+outfile target\win32\@PROJECT-EXE-FILENAME@
+javamin 1.4.0
+icon etc\conf\transit.ico
+chdir true
+setProcName true
+errTitle @PROJECT-NAME@
+jvmArgs -Djava.security.policy="%DPML_SYSTEM%\bin\security.policy"
\ No newline at end of file

Added: development/main/home/transit/handler/etc/conf/transit.ico
==============================================================================
Binary file. No diff available.

Modified:
development/main/home/transit/handler/etc/setup/authority/cache.properties
==============================================================================
---
development/main/home/transit/handler/etc/setup/authority/cache.properties
(original)
+++
development/main/home/transit/handler/etc/setup/authority/cache.properties
Fri Feb 11 19:25:55 2005
@@ -1,5 +1,5 @@
# The location of the cache system
-dpml.transit.cache.location=${dpml.home}/cache
+dpml.transit.cache.location=${dpml.data}/cache

# The class that implements the cache handler
dpml.transit.cache.class=net.dpml.transit.artifact.FileCacheHandler

Modified: development/main/home/transit/handler/etc/setup/authority/hosts.xml
==============================================================================
--- development/main/home/transit/handler/etc/setup/authority/hosts.xml
(original)
+++ development/main/home/transit/handler/etc/setup/authority/hosts.xml Fri
Feb 11 19:25:55 2005
@@ -2,23 +2,31 @@

<hosts>

- <host dir="local/@PROJECT-VERSION@">
+ <!--
+ <host dir="${dpml.data}/local/@PROJECT-VERSION@">
<priority>10</priority>
<trusted>true</trusted>
<policy>timestamp</policy>
</host>
+ -->

- <host href="http://repository.dpml.net/classic";>
+ <host dir="${dpml.system}/local">
<priority>20</priority>
+ <trusted>true</trusted>
+ <policy>timestamp</policy>
</host>

- <host href="http://www.ibiblio.org/maven";>
+ <host href="http://repository.dpml.net/classic";>
<priority>50</priority>
</host>

- <host href="http://www.apache.org/dist/java-repository";>
+ <host href="http://www.ibiblio.org/maven";>
<priority>70</priority>
</host>

+ <host href="http://www.apache.org/dist/java-repository";>
+ <priority>100</priority>
+ </host>
+
</hosts>


Added:
development/main/home/transit/handler/src/main/net/dpml/io/CascadingIOException.java
==============================================================================
--- (empty file)
+++
development/main/home/transit/handler/src/main/net/dpml/io/CascadingIOException.java
Fri Feb 11 19:25:55 2005
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2004 Apache Software Foundation
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.io;
+
+import java.io.IOException;
+
+/**
+ * Exception to indicate that there was a IO exception.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Id: CascadingIOException.java 259 2004-10-30 07:24:40Z
mcconnell $
+ */
+public class CascadingIOException extends IOException
+{
+ private Throwable m_cause;
+
+ /**
+ * Construct a new <code>ApplianceException</code> instance.
+ *
+ * @param message The detail message for this exception.
+ */
+ public CascadingIOException( final String message )
+ {
+ this( message, null );
+ }
+
+ /**
+ * Construct a new <code>ApplianceException</code> instance.
+ *
+ * @param message The detail message for this exception.
+ * @param throwable the root cause of the exception
+ */
+ public CascadingIOException( final String message, final Throwable
throwable )
+ {
+ super( message );
+ m_cause = throwable;
+ }
+
+ /**
+ * Return the cause of the exception.
+ * @return the causal exception
+ */
+ public Throwable getCause()
+ {
+ return m_cause;
+ }
+}
+

Added:
development/main/home/transit/handler/src/main/net/dpml/io/ResourceHelper.java
==============================================================================
--- (empty file)
+++
development/main/home/transit/handler/src/main/net/dpml/io/ResourceHelper.java
Fri Feb 11 19:25:55 2005
@@ -0,0 +1,134 @@
+/*
+Copyright 2005 Stephen J. McConnell
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied.
+
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package net.dpml.io;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * Utility class that provides support for the copying of bundled resources.
+ */
+public class ResourceHelper
+{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
+ /** Copy buffer size. */
+ private static final int BUFFER_SIZE = 10000;
+
+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
+ /**
+ * Unpack a resource into a destination file.
+ * @param resoruce the resource to unpack
+ * @param destination the destination file
+ * @exception IOException if something goes wrong
+ */
+ public static void unpack( ClassLoader classloader, String resource,
File destination ) throws IOException
+ {
+ InputStream dll = null;
+ FileOutputStream fos = null;
+ try
+ {
+ dll = classloader.getResourceAsStream( resource );
+ if( dll == null )
+ {
+ throw new ResourceNotFoundException( resource );
+ }
+
+ fos = new FileOutputStream( destination );
+ copy( dll, fos );
+ }
+ catch( Throwable e )
+ {
+ final String error =
+ "Unexpected error while attempting to unpack the resource ["
+ + resource
+ + "]";
+ throw new CascadingIOException( error, e );
+ }
+ finally
+ {
+ if( null != fos )
+ {
+ try
+ {
+ fos.close();
+ }
+ catch( IOException e )
+ {
+ boolean ignoreIt = true;
+ }
+ }
+ if( null != dll )
+ {
+ try
+ {
+ dll.close();
+ }
+ catch( IOException e )
+ {
+ boolean ignoreIt = true;
+ }
+ }
+ }
+ }
+
+ /**
+ * Copy from one stream to another.
+ * @param from the source input stream.
+ * @param to the destination output stream.
+ * @throws IOException if either the file can't be read or the result
can't be
+ * written.
+ */
+ private static void copy( InputStream from, OutputStream to )
+ throws IOException
+ {
+ BufferedOutputStream out = new BufferedOutputStream( to );
+ BufferedInputStream in = new BufferedInputStream( from, BUFFER_SIZE
);
+ int bytesRead = 0;
+ int counter = 0;
+ do
+ {
+ byte[] data = new byte[ BUFFER_SIZE ];
+ bytesRead = in.read( data, 0, BUFFER_SIZE );
+ counter = counter + bytesRead;
+ if( bytesRead != -1 )
+ {
+ out.write( data, 0, bytesRead );
+ }
+ } while( bytesRead != -1 );
+ out.flush();
+ }
+
+ /**
+ * Static utility class.
+ */
+ private ResourceHelper()
+ {
+ }
+}
\ No newline at end of file

Added:
development/main/home/transit/handler/src/main/net/dpml/io/ResourceNotFoundException.java
==============================================================================
--- (empty file)
+++
development/main/home/transit/handler/src/main/net/dpml/io/ResourceNotFoundException.java
Fri Feb 11 19:25:55 2005
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2004 Apache Software Foundation
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.io;
+
+import java.io.IOException;
+
+/**
+ * Exception to indicate that a request resource was not found.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Id: CascadingIOException.java 259 2004-10-30 07:24:40Z
mcconnell $
+ */
+public class ResourceNotFoundException extends IOException
+{
+ /**
+ * Construct a new <code>ResourceNotFoundException</code> instance.
+ *
+ * @param resource the resource name
+ */
+ public ResourceNotFoundException( final String resource )
+ {
+ super( resource );
+ }
+}
+

Added: development/main/home/transit/handler/src/main/net/dpml/io/package.html
==============================================================================
--- (empty file)
+++ development/main/home/transit/handler/src/main/net/dpml/io/package.html
Fri Feb 11 19:25:55 2005
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+The io package contains IO level additions used within Transit and other
higher level systems.
+</p>
+</body>
+

Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/Installer.java
==============================================================================
---
development/main/home/transit/handler/src/main/net/dpml/transit/Installer.java
(original)
+++
development/main/home/transit/handler/src/main/net/dpml/transit/Installer.java
Fri Feb 11 19:25:55 2005
@@ -57,16 +57,16 @@
public static void main( final String[] args )
throws Exception
{
- String tempPath = System.getProperty( "java.io.tmpdir" );
- File temp = new File( tempPath );
- File dpmlTemp = new File( temp, "dpml/install" );
- File transitTemp = new File( dpmlTemp, "transit" );
+ //String tempPath = System.getProperty( "java.io.tmpdir" );
+ //File temp = new File( tempPath );
+ //File dpmlTemp = new File( temp, "dpml/install" );
+ //File transitTemp = new File( dpmlTemp, "transit" );
String boot = "-Xbootstrap=@TRANSIT-CONTROLLER-PLUGIN@";
- File cache = getCacheLocation( dpmlTemp );
- transitTemp.mkdirs();
+ //File cache = getCacheLocation( dpmlTemp );
+ //transitTemp.mkdirs();

- System.setProperty( "dpml.home", dpmlTemp.getAbsolutePath() );
- System.setProperty( CacheHandler.CACHE_KEY, cache.getAbsolutePath()
);
+ //System.setProperty( "dpml.home", dpmlTemp.getAbsolutePath() );
+ //System.setProperty( CacheHandler.CACHE_KEY,
cache.getAbsolutePath() );

if( args.length == 0 )
{

Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/Main.java
==============================================================================
--- development/main/home/transit/handler/src/main/net/dpml/transit/Main.java
(original)
+++ development/main/home/transit/handler/src/main/net/dpml/transit/Main.java
Fri Feb 11 19:25:55 2005
@@ -53,6 +53,12 @@
public static final String BOOTSTRAP_URI_KEY =
"dpml.transit.bootstrap.uri";

/**
+ * Immutable key used to lookup the a system property containing the value
+ * of a plugin to be loaded by transit on startup.
+ */
+ public static final String BOOTSTRAP_URI = "@TRANSIT-CONTROLLER-PLUGIN@";
+
+ /**
* The main method is the static commandline entry point for transit
enabled
* applications. The implementation requires a cli argument
"-Xbootstrap=[artifact]"
* referencing an artifact uri of a transit plugin to be deployed as the
target
@@ -73,7 +79,7 @@
// Setup transit protocol handler
//

- File propsFile = new File( Transit.DPML_HOME,
"transit/system.properties" );
+ File propsFile = new File( Transit.DPML_PREFS,
"transit/system.properties" );
if( propsFile.exists() )
{
FileInputStream fis = null;
@@ -81,7 +87,7 @@
{
fis = new FileInputStream( propsFile );
System.getProperties().load( fis );
- }
+ }
catch( Exception e )
{
System.out.println( "Can't read: " + propsFile );
@@ -98,7 +104,7 @@
// Setup debug policy
//

- boolean debug = false;
+ boolean debug = ( "true".equals( System.getProperty(
Monitor.BOOTSTRAP_DEBUG_KEY ) ) );
for( int i=0; i < args.length; i++ )
{
if( "-Xdebug".equals( args[i] ) )
@@ -166,13 +172,7 @@

if( null == path )
{
- final String error =
- "The system property '"
- + BOOTSTRAP_URI_KEY
- + "' is undefined.";
- System.err.println( error );
- System.getProperties().list( System.err );
- throw new IllegalStateException( error );
+ path = BOOTSTRAP_URI;
}

String[] arguments = collapseArgs( args );

Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/Transit.java
==============================================================================
---
development/main/home/transit/handler/src/main/net/dpml/transit/Transit.java
(original)
+++
development/main/home/transit/handler/src/main/net/dpml/transit/Transit.java
Fri Feb 11 19:25:55 2005
@@ -54,24 +54,29 @@
public static final String HOME_KEY = "dpml.home";

/**
- * DPML environment variable string.
+ * DPML home key.
*/
- public static final String HOME_SYMBOL = "DPML_HOME";
+ public static final String DATA_KEY = "dpml.data";
+
+ /**
+ * DPML home key.
+ */
+ public static final String PREFS_KEY = "dpml.prefs";

/**
* Transit system key.
*/
- public static final String SYSTEM_KEY = "dpml.system.home";
+ public static final String SYSTEM_KEY = "dpml.system";

/**
* DPML environment variable string.
*/
- public static final String SYSTEM_SYMBOL = "DPML_SYSTEM_HOME";
+ public static final String HOME_SYMBOL = "DPML_HOME";

/**
- * Transit trace policy system property key.
+ * DPML environment variable string.
*/
- public static final String TRACE_KEY =
"dpml.transit.trace.policy";
+ public static final String SYSTEM_SYMBOL = "DPML_SYSTEM";

/**
* Singleton transit instance.
@@ -116,13 +121,38 @@
* is defined, then the assigned value will be returned, otherwise the
* DPML_HOME home directory is returned.
*/
- public static final File DPML_SYSTEM_HOME;
+ public static final File DPML_SYSTEM;
+
+ /**
+ * The Transit personal data directory. The location of this diectory is
system
+ * dependent.
+ */
+ public static final File DPML_DATA;

+ /**
+ * The Transit personal preferences directory. The location of this
diectory is system
+ * dependent.
+ */
+ public static final File DPML_PREFS;

static
{
DPML_HOME = resolveHomeDirectory();
- DPML_SYSTEM_HOME = resolveSystemDirectory( DPML_HOME );
+ DPML_DATA = resolveDataDirectory( DPML_HOME );
+ DPML_PREFS = resolvePreferencesDirectory( DPML_HOME );
+ DPML_SYSTEM = resolveSystemDirectory( DPML_HOME );
+
+ try
+ {
+ System.setProperty( SYSTEM_KEY, DPML_SYSTEM.getAbsolutePath() );
+ System.setProperty( HOME_KEY, DPML_HOME.getAbsolutePath() );
+ System.setProperty( DATA_KEY, DPML_DATA.getAbsolutePath() );
+ System.setProperty( PREFS_KEY, DPML_PREFS.getAbsolutePath() );
+ }
+ catch( Throwable e )
+ {
+ boolean ignore = true; // for checkstyle
+ }
}

/**
@@ -182,7 +212,8 @@

// Setting up a permanent output troubleshooting resource
// for Transit.
- File logDir = new File( DPML_HOME, "transit/logs" );
+ File logs = new File( DPML_DATA, "logs" );
+ File logDir = new File( logs, "transit" );
logDir.mkdirs();
File logFile = new File( logDir, "transit.log" );
FileOutputStream fos = new FileOutputStream( logFile );
@@ -319,8 +350,11 @@

/**
* Resolve the DPML home directory using assesment of the the ${dpml.home}
- * system property, the DPML_HOME environment variable and fallback to
- * ${user.home}/.dpml.
+ * system property, the DPML_HOME environment variable. If DPML_HOME is
+ * not declared, the behaviour is platform specific. If the os is
Windows,
+ * the value returned is equivalent to $APPDATA\DPML whereas Unix
environment
+ * will return ${user.home}/.dpml.
+ *
* @return the DPML home directory
*/
private static File resolveHomeDirectory()
@@ -335,12 +369,32 @@
{
return new File( home );
}
+ String os = System.getProperty( "os.name" ).toLowerCase();
+ if( os.indexOf( "win" ) >= 0 )
+ {
+ home = Environment.getEnvVariable( "APPDATA" );
+ if( null != home )
+ {
+ File data = new File( home );
+ return new File( data, "DPML" );
+ }
+ }
+
File user = new File( System.getProperty( "user.home" ) );
return new File( user, ".dpml" );
}

/**
- * Resolve the Transit directory.
+ * Resolve the DPML system home directory. If a system property
+ * named "dpml.system" is defined then the value as a file is
+ * returned otherwise the implementation will look for an environment
+ * variable named "DPML_SYSTEM" which if defined will be
+ * returned as a file. If neither case holds, the value assigned
+ * if platform dependent. If the os is Windows, the equivalent of
+ * $PROGRAMFILES\DPML is returned otherwise the default value
+ * is ${dpml.home}.
+ *
+ * @param dir the default DPML_HOME value
* @return the transit system directory
*/
private static File resolveSystemDirectory( File dir )
@@ -355,6 +409,54 @@
{
return new File( home );
}
+ String os = System.getProperty( "os.name" ).toLowerCase();
+ if( os.indexOf( "win" ) >= 0 )
+ {
+ home = Environment.getEnvVariable( "PROGRAMFILES" );
+ return new File( home, "DPML" );
+ }
return dir;
}
+
+ /**
+ * Resolve the DPML data directory. If the platform is Windows
+ * the returned value is equivalent to ${dpml.home}/Data
+ * whereas the Unix variant returns ${dpml.home}/data.
+ *
+ * @param dir the default DPML_HOME value
+ * @return the transit personal data directory
+ */
+ private static File resolveDataDirectory( File dir )
+ {
+ String os = System.getProperty( "os.name" ).toLowerCase();
+ if( os.indexOf( "win" ) >= 0 )
+ {
+ return new File( dir, "Data" );
+ }
+ else
+ {
+ return new File( dir, "data" );
+ }
+ }
+
+ /**
+ * Resolve the DPML prefs directory. If the platform is Windows
+ * the returned value is equivalent to ${dpml.home}/Preferences
+ * whereas the Unix variant returns ${dpml.home}/prefs.
+ *
+ * @param dir the default DPML_HOME value
+ * @return the transit personal data directory
+ */
+ private static File resolvePreferencesDirectory( File dir )
+ {
+ String os = System.getProperty( "os.name" ).toLowerCase();
+ if( os.indexOf( "win" ) >= 0 )
+ {
+ return new File( dir, "Preferences" );
+ }
+ else
+ {
+ return new File( dir, "prefs" );
+ }
+ }
}

Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/FileCacheHandler.java
==============================================================================
---
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/FileCacheHandler.java
(original)
+++
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/FileCacheHandler.java
Fri Feb 11 19:25:55 2005
@@ -265,12 +265,13 @@
*/
private File createCacheDirectory( Properties props )
{
- String fallback = Util.getProperty( props, CACHE_KEY,
"${user.dir}/.dpml/main");
- String cache = System.getProperty( CACHE_KEY, fallback );
+ String defaultCache = "cache";
+ String fallback = Util.getProperty( props, CACHE_KEY, defaultCache );
+ String cache = System.getProperty( CACHE_KEY, fallback );
File cachedir = new File( cache );
if( !cachedir.isAbsolute() )
{
- cachedir = new File( Transit.DPML_HOME, cache );
+ cachedir = new File( Transit.DPML_DATA, cache );
}
cachedir.mkdirs();
return cachedir;

Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/ResourceHostFactory.java
==============================================================================
---
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/ResourceHostFactory.java
(original)
+++
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/ResourceHostFactory.java
Fri Feb 11 19:25:55 2005
@@ -113,7 +113,7 @@
* authorative anchor. The implementation will attempt to locate a
hosts.xml
* at the authorative location and if available will resolve host
defintions
* and return. Otherwise the behaviour is dependent on the type of
authority - if
- * the authority url protocol is "file:" then property based host
descripts will
+ * the authority url protocol is "file:" then property based host
descriptors will
* be read from the [authorative]/hosts direrectory. All files in the
directory
* will be considered. If the a property based host file does not contain
the property
* declaration "dpml.transit.resourcehost.base" the file not be
processed. If the
@@ -363,7 +363,7 @@
File f = new File( base );
if( !f.isAbsolute() )
{
- f = new File( Transit.DPML_SYSTEM_HOME, base );
+ f = new File( Transit.DPML_SYSTEM, base );
}
base = f.toURL().toExternalForm();
}

Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/SecuredTransitContext.java
==============================================================================
---
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/SecuredTransitContext.java
(original)
+++
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/SecuredTransitContext.java
Fri Feb 11 19:25:55 2005
@@ -36,6 +36,7 @@
import net.dpml.transit.TransitException;
import net.dpml.transit.monitors.Monitor;
import net.dpml.transit.monitors.NullMonitor;
+import net.dpml.io.ResourceHelper;

/**
* The initial context of the transit system.
@@ -203,8 +204,7 @@
}
}

- /** This constructor should only be used for the testcases. It will be
- * made into private without notice at any time.
+ /** This constructor should only be used for the testcases.
* @param authorative the authorative url
* @param hosts the set of hosts
* @param handler the cache handler
@@ -277,10 +277,10 @@
* refers to a file then the file will be used to resolve the authority
* url by reading the property "dpml.transit.authority". If no system
* property is defined then a attempt will be made to locate the file
- * ${dpml.home}/dpml.transit.authority. If this file does not exist the
+ * ${dpml.prefs}/transit/dpml.transit.authority. If this file does not
exist the
* implementation will attempt to locate an authority file in the
directory
- * referenced by the system property "java.ext.dirs". If not file is
found
- * the implementation will assume http://repository.dpml.net.
+ * referenced by the system property "java.ext.dirs". If no file is found
+ * the implementation will be establised using a bundled default.
*
* @param monitor the bootstrap monitor
* @return the authorative url
@@ -322,13 +322,12 @@
}

//
- // Otherwise check for a authoritive file in the
${dpml.home}/transit/authority
+ // Otherwise check for a authoritive file in the
${dpml.prefs}/transit
// directory.
//

- File artifactAuthFile;
- File transitDir = new File( Transit.DPML_HOME, "transit" );
- artifactAuthFile = new File( transitDir, AUTHORITY_FILENAME );
+ File transitDir = new File( Transit.DPML_PREFS, "transit" );
+ File artifactAuthFile = new File( transitDir, AUTHORITY_FILENAME
);
if( artifactAuthFile.exists() )
{
if( monitor.isTraceEnabled() )
@@ -348,36 +347,52 @@
//

File extlib = new File( System.getProperty( "java.ext.dirs" ) );
- artifactAuthFile = new File( extlib, AUTHORITY_FILENAME );
- if( artifactAuthFile.exists() )
+ File javaAuthFile = new File( extlib, AUTHORITY_FILENAME );
+ if( javaAuthFile .exists() )
{
if( monitor.isTraceEnabled() )
{
final String message =
"using extension authority file ["
- + artifactAuthFile
+ + javaAuthFile
+ "]";
monitor.trace( message );
}
- return useForAuthority( artifactAuthFile );
+ return useForAuthority( javaAuthFile );
}

//
- // Otherwise there is no authority file and we fallback to
- // assuming that the transit directory is the
- // authority directory.
+ // create it based on packaged defaults
//

+ File authority = new File( transitDir, "authority" );
+ authority.mkdirs();
+ ClassLoader classloader = Transit.class.getClassLoader();
+ ResourceHelper.unpack( classloader, "transit/" +
AUTHORITY_FILENAME, artifactAuthFile );
+ ResourceHelper.unpack( classloader,
"transit/authority/cache.properties", new File( authority, "cache.properties"
) );
+ ResourceHelper.unpack( classloader,
"transit/authority/hosts.xml", new File( authority, "hosts.xml" ) );
+ ResourceHelper.unpack( classloader,
"transit/authority/transit.properties", new File( authority,
"transit.properties" ) );
+
if( monitor.isTraceEnabled() )
{
final String message =
- "using transit home as default authorative source ["
- + artifactAuthFile
- + "]";
- monitor.trace( message );
+ "using bundled defaults ["
+ + artifactAuthFile
+ + "]";
+ monitor.trace( message );
}

- return new URL( "http://repository.dpml.net"; );
+ return useForAuthority( artifactAuthFile );
+
+ //
+ //if( monitor.isTraceEnabled() )
+ //{
+ // final String message =
+ // "using http://repository.dpml.net/ as authorative
source";
+ // monitor.trace( message );
+ //}
+
+ //return new URL( "http://repository.dpml.net"; );

}
catch( Exception e )
@@ -426,7 +441,11 @@
{
Properties p = new Properties();
p.setProperty( Transit.HOME_KEY, Transit.DPML_HOME.toString() );
+ p.setProperty( Transit.PREFS_KEY, Transit.DPML_PREFS.toString()
);
+ p.setProperty( Transit.DATA_KEY, Transit.DPML_DATA.toString() );
+ p.setProperty( Transit.SYSTEM_KEY,
Transit.DPML_SYSTEM.toString() );
p.load( stream );
+
String authority = Util.getProperty( p, AUTHORITY_KEY, null );
if( authority == null )
{
@@ -440,7 +459,7 @@
File f = new File( authority );
if( !f.isAbsolute() )
{
- f = new File( Transit.DPML_HOME, "transit/" + authority );
+ f = new File( Transit.DPML_PREFS, "transit/" + authority );
}
if( f.exists() )
{

Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/XMLHostsBuilder.java
==============================================================================
---
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/XMLHostsBuilder.java
(original)
+++
development/main/home/transit/handler/src/main/net/dpml/transit/artifact/XMLHostsBuilder.java
Fri Feb 11 19:25:55 2005
@@ -143,7 +143,8 @@
if( null == dir )
{
final String error =
- "The base element does not contain the an 'href' or 'dir'
attribute.";
+ "The host element does not contain the an 'href' or 'dir'
attribute:\n"
+ + root.toString();
throw new IllegalArgumentException( error );
}
else
@@ -179,7 +180,7 @@
}
else
{
- File dir = new File( Transit.DPML_SYSTEM_HOME, path );
+ File dir = new File( Transit.DPML_SYSTEM, path );
dir.mkdirs();
return dir.toURL();
}

Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/monitors/Monitor.java
==============================================================================
---
development/main/home/transit/handler/src/main/net/dpml/transit/monitors/Monitor.java
(original)
+++
development/main/home/transit/handler/src/main/net/dpml/transit/monitors/Monitor.java
Fri Feb 11 19:25:55 2005
@@ -23,6 +23,12 @@
*/
public interface Monitor
{
+ /**
+ * Immutable key used to lookup the a system property containing the value
+ * of a debug trace policy.
+ */
+ final String BOOTSTRAP_DEBUG_KEY = "dpml.transit.debug";
+
/**
* Null monitor.
*/

Modified: development/main/home/transit/plugin/build.xml
==============================================================================
--- development/main/home/transit/plugin/build.xml (original)
+++ development/main/home/transit/plugin/build.xml Fri Feb 11 19:25:55
2005
@@ -24,26 +24,20 @@
<import file="${home}/standard.xml"/>

<target name="init" depends="standard.init">
-
- <echo>VERSION: ${project.version}</echo>
- <echo>HOME: ${dpml.home}</echo>
-
<filter token="TRANSIT-PLUGIN-URI"

value="artifact:plugin:dpml/transit/dpml-transit-plugin#${project.version}" />
<filter token="WINDOWS-CLI-MAIN-PATH"
-
value="%DPML_HOME%\local\${project.version}\dpml\transit\jars\dpml-transit-main-${project.version}.jar"
/>
+
value="%DPML_HOME%\local\dpml\transit\jars\dpml-transit-main-${project.version}.jar"
/>
<filter token="UNIX-CLI-MAIN-PATH"
-
value="$DPML_HOME/local/${project.version}/dpml/transit/jars/dpml-transit-main-${project.version}.jar"
/>
+
value="$DPML_HOME/local/dpml/transit/jars/dpml-transit-main-${project.version}.jar"
/>
<filter token="TRANSIT_VERSION" value="${project.version}"/>
<filter token="WINDOWS-CLI-CLASSPATH"
-
value="%DPML_SYSTEM_HOME%\local\${project.version}\dpml\transit\jars\dpml-transit-main-${project.version}.jar"
/>
+
value="%DPML_SYSTEM_HOME%\local\dpml\transit\jars\dpml-transit-main-${project.version}.jar"
/>
<filter token="UNIX-CLI-CLASSPATH"
-
value="$DPML_HOME/local/${project.version}/dpml/transit/jars/dpml-transit-main-${project.version}.jar"
/>
+
value="$DPML_HOME/local/dpml/transit/jars/dpml-transit-main-${project.version}.jar"
/>
</target>

<target name="setup-path" depends="init">
- <property name="dpml.cache" value="${dpml.home}/cache"/>
- <echo>CACHE: ${dpml.cache}</echo>
<path id="project.main.path">
<pathelement
location="${dpml.cache}/dpml/transit/jars/dpml-transit-main-${project.version}.jar"/>
<pathelement
location="${dpml.cache}/dpml/util/jars/dpml-util-criteria-${project.version}.jar"/>
@@ -64,10 +58,6 @@
</target>

<target name="build" depends="standard.build">
-
- <pathconvert pathsep=", " property="thepath" refid="project.main.path"/>
- <echo>PATH: ${thepath}</echo>
-
<property name="plugins"
location="${basedir}/target/deliverables/plugins"/>
<property name="plugin.file"
location="${plugins}/dpml-transit-plugin-${project.version}.plugin"/>
<mkdir dir="${plugins}"/>

Modified: development/main/home/transit/plugin/etc/bin/transit.bat
==============================================================================
--- development/main/home/transit/plugin/etc/bin/transit.bat (original)
+++ development/main/home/transit/plugin/etc/bin/transit.bat Fri Feb 11
19:25:55 2005
@@ -16,16 +16,16 @@

:SET_METRO
if "%DPML_HOME%" == "" set DPML_HOME=%USERPROFILE%\.dpml
-if "%DPML_SYSTEM_HOME%" == "" set DPML_SYSTEM_HOME=%DPML_HOME%
+if "%DPML_SYSTEM%" == "" set DPML_SYSTEM=%DPML_HOME%
if "%DPML_TRANSIT_CLASSPATH%" == "" set
DPML_TRANSIT_CLASSPATH=@WINDOWS-CLI-CLASSPATH@
if "%TRANSIT_PLUGIN%" == "" set TRANSIT_PLUGIN=@TRANSIT-PLUGIN-URI@

set CMD_LINE_ARGS=%*
-set SECURITY_POLICY=-Djava.security.policy="%DPML_HOME%\bin\security.policy"
+set
SECURITY_POLICY=-Djava.security.policy="%DPML_SYSTEM%\bin\security.policy"
set TRANSIT_CLASSPATH="%DPML_HOME%\transit\lib";"%DPML_TRANSIT_CLASSPATH%"

:RUN_METRO
-%JAVA% %SECURITY_POLICY% %TRANSIT_JVM_OPTS%
-Ddpml.transit.bootstrap.uri=%TRANSIT_PLUGIN% -classpath %TRANSIT_CLASSPATH%
net.dpml.transit.Main -Xbootstrap=%TRANSIT_PLUGIN% %CMD_LINE_ARGS%
+%JAVA% %SECURITY_POLICY% %TRANSIT_JVM_OPTS% -classpath %TRANSIT_CLASSPATH%
net.dpml.transit.Main -Xbootstrap=%TRANSIT_PLUGIN% %CMD_LINE_ARGS%
goto EndOfScript
:EndOfScript


Modified:
development/main/home/transit/plugin/src/main/net/dpml/transit/control/CommandHandler.java
==============================================================================
---
development/main/home/transit/plugin/src/main/net/dpml/transit/control/CommandHandler.java
(original)
+++
development/main/home/transit/plugin/src/main/net/dpml/transit/control/CommandHandler.java
Fri Feb 11 19:25:55 2005
@@ -58,7 +58,7 @@
* established as the root management plugin by transit using the system
property
* "dpml.transit.bootstrap.uri" or -Xbootstrap cli option.
*
- * @author <a href="mailto:dev@dpmlnet";>Stephen J. McConnell</a>
+ * @author <a href="mailto:dev AT dpml.net";>Stephen J. McConnell</a>
*/
public final class CommandHandler
implements Runnable
@@ -147,11 +147,6 @@

m_debug = line.hasOption( "debug" );

- if( line.hasOption( "Xhelp" ) )
- {
- handleHelpMessage();
- }
-
if( line.hasOption( "Xversion" ) )
{
handleVersionMessage( descriptor );
@@ -205,6 +200,10 @@
handleLoadCommand( target );
}
}
+ else if( "unknown".equals( m_command ) )
+ {
+ handleHelpMessage();
+ }
}

/**

Modified: development/main/home/transit/tools/build.xml
==============================================================================
--- development/main/home/transit/tools/build.xml (original)
+++ development/main/home/transit/tools/build.xml Fri Feb 11 19:25:55
2005
@@ -25,7 +25,7 @@

<target name="setup-path" depends="init">
<path id="project.main.path">
- <pathelement
location="${dpml.home}/cache/dpml/transit/jars/${dpml-transit-handler.filename}"/>
+ <pathelement
location="${dpml.cache}/dpml/transit/jars/${dpml-transit-handler.filename}"/>
<pathelement location="${target.classes.dir}"/>
</path>
</target>

Modified:
development/main/home/transit/tools/src/main/net/dpml/transit/tools/ImportArtifactTask.java
==============================================================================
---
development/main/home/transit/tools/src/main/net/dpml/transit/tools/ImportArtifactTask.java
(original)
+++
development/main/home/transit/tools/src/main/net/dpml/transit/tools/ImportArtifactTask.java
Fri Feb 11 19:25:55 2005
@@ -45,7 +45,9 @@
public void setProject( Project project )
{
super.setProject( project );
- m_trace = ( null != project.getProperty( "dpml.transit.debug" ) );
+
+ m_trace = ( "true".equals( project.getProperty(
Monitor.BOOTSTRAP_DEBUG_KEY ) ) );
+
try
{
Transit.getInstance( this );

Modified:
development/main/home/transit/tools/src/main/net/dpml/transit/tools/MainTask.java
==============================================================================
---
development/main/home/transit/tools/src/main/net/dpml/transit/tools/MainTask.java
(original)
+++
development/main/home/transit/tools/src/main/net/dpml/transit/tools/MainTask.java
Fri Feb 11 19:25:55 2005
@@ -121,7 +121,6 @@
if( !m_INIT )
{
setupMonitors( );
- File home = Transit.DPML_HOME;
log( "initialization in " + project.getName() );
m_INIT = true;
}
@@ -140,13 +139,23 @@
private void checkProperties( Project project ) throws BuildException
{
File home = Transit.DPML_HOME;
- File docs = new File( home, "docs" );
- File cache = new File( home, "cache" );
- File dist = new File( home, "dist" );
+ File system = Transit.DPML_SYSTEM;
+ File data = Transit.DPML_DATA;
+ File prefs = Transit.DPML_PREFS;
+
+ File docs = new File( data, "docs" );
+ File cache = new File( data, "cache" ); // <--- FIX ME !!
+ File dist = new File( data, "dist" );
+ File logs = new File( data, "logs" );
+
updateProperty( project, "dpml.home", home.getAbsolutePath() );
+ updateProperty( project, "dpml.system", system.getAbsolutePath() );
+ updateProperty( project, "dpml.data", data.getAbsolutePath() );
updateProperty( project, "dpml.docs", docs.getAbsolutePath() );
updateProperty( project, "dpml.cache", cache.getAbsolutePath() );
updateProperty( project, "dpml.dist", dist.getAbsolutePath() );
+ updateProperty( project, "dpml.logs", dist.getAbsolutePath() );
+ updateProperty( project, "dpml.prefs", prefs.getAbsolutePath() );
}

/**

Modified: development/main/home/util/build.xml
==============================================================================
--- development/main/home/util/build.xml (original)
+++ development/main/home/util/build.xml Fri Feb 11 19:25:55 2005
@@ -32,8 +32,7 @@
<mkdir dir="${basedir}/target/deliverables/modules"/>
<property name="module.file"

location="${basedir}/target/deliverables/modules/dpml-util-${project.version}.module"/>
- <move file="${basedir}/target/project.module"
- tofile="${module.file}"/>
+ <move file="${basedir}/target/project.module" tofile="${module.file}"/>
<checksum fileext=".md5" file="${module.file}"/>
<antcall target="module.asc"/>
</target>
@@ -71,9 +70,9 @@
<link offline="true" href="http://www.dpml.net/api/commons-cli/1.0";
packagelistloc="${home}/etc/commons-cli"/>
<classpath>
- <pathelement location="${dpml.home}/cache/${commons-cli.path}"/>
+ <pathelement location="${dpml.cache}/${commons-cli.path}"/>
</classpath>
- </javadoc>
+ </javadoc>
</target>

</project>

Modified: development/main/home/util/cli/build.xml
==============================================================================
--- development/main/home/util/cli/build.xml (original)
+++ development/main/home/util/cli/build.xml Fri Feb 11 19:25:55 2005
@@ -26,7 +26,7 @@
<target name="init" depends="standard.init,commons-cli-install"/>

<target name="commons-cli-check" depends="standard.init">
- <property name="commons-cli.cache"
value="${dpml.home}/cache/${commons-cli.path}"/>
+ <property name="commons-cli.cache"
value="${dpml.cache}/${commons-cli.path}"/>
<available property="commons.cli.available" file="${commons-cli.cache}"/>
</target>

@@ -37,14 +37,14 @@
# Installing Commons CLI

#----------------------------------------------------------------------------------
</echo>
- <mkdir dir="${dpml.home}/cache/${commons-cli.parent}"/>
+ <mkdir dir="${dpml.cache}/${commons-cli.parent}"/>
<get src="${commons-cli.url}" usetimestamp="true"
dest="${commons-cli.cache}"/>
</target>

<target name="setup-path" depends="init">
<path id="project.main.path">
<pathelement location="${commons-cli.cache}"/>
- <pathelement
location="${dpml.home}/cache/dpml/transit/jars/${dpml-transit-handler.filename}"/>
+ <pathelement
location="${dpml.cache}/dpml/transit/jars/${dpml-transit-handler.filename}"/>
<pathelement location="${target.classes.dir}"/>
</path>
</target>

Modified: development/main/magic/build.xml
==============================================================================
--- development/main/magic/build.xml (original)
+++ development/main/magic/build.xml Fri Feb 11 19:25:55 2005
@@ -35,6 +35,7 @@
</target>

<target name="clean">
+ <delete quiet="true" dir="target"/>
<delete quiet="true" dir="core/target"/>
<delete quiet="true" dir="spells/bar/target"/>
<delete quiet="true" dir="spells/doc/task/target"/>

Modified: development/main/magic/core/build.xml
==============================================================================
--- development/main/magic/core/build.xml (original)
+++ development/main/magic/core/build.xml Fri Feb 11 19:25:55 2005
@@ -30,12 +30,12 @@
<filter token="PROJECT-PLUGIN-URI" value="${dpml-magic-core.uri}"/>
</target>

- <target name="setup-path" depends="init">
- <property name="dpml.local"
value="${dpml.home}/local/${dpml.home.version}"/>
+ <target name="setup-path" depends="standard.setup-path">
<transit:get property="checkstyle.path" uri="${checkstyle.uri}"/>
+ <echo>CACHE: ${dpml.cache}</echo>
<path id="project.main.path">
- <pathelement
location="${dpml.local}/dpml/transit/jars/dpml-transit-main-${dpml.home.version}.jar"/>
- <pathelement
location="${dpml.local}/dpml/transit/jars/dpml-transit-tools-${dpml.home.version}.jar"/>
+ <pathelement
location="${dpml.cache}/dpml/transit/jars/dpml-transit-main-${dpml.home.version}.jar"/>
+ <pathelement
location="${dpml.cache}/dpml/transit/jars/dpml-transit-tools-${dpml.home.version}.jar"/>
<pathelement location="${checkstyle.path}"/>
<pathelement location="${basedir}/target/classes"/>
</path>

Modified: development/main/magic/module.xml
==============================================================================
--- development/main/magic/module.xml (original)
+++ development/main/magic/module.xml Fri Feb 11 19:25:55 2005
@@ -24,6 +24,10 @@

<transit:import uri="artifact:template:dpml/magic/standard"/>

+ <target name="init" depends="standard.init">
+ <property name="bundle" value="${basedir}/target/bundle"/>
+ </target>
+
<target name="build" depends="module.build,standard.build"/>

<target name="module.build" depends="standard.build">
@@ -41,11 +45,21 @@

<target name="install"
depends="standard.install,junit-report,checkstyle,javadoc">
<antcall target="dist"/>
+ <echo>
+#----------------------------------------------------------------------------------
+# Updating DPML DATA installation. ${dpml.data}/docs
+#----------------------------------------------------------------------------------
+ </echo>
+ <mkdir dir="${dpml.data}"/>
+ <copy todir="${dpml.data}" preservelastmodified="true">
+ <fileset dir="${bundle}">
+ <include name="docs/**"/>
+ </fileset>
+ </copy>
</target>

<target name="dist" depends="init">
- <property name="bundle" value="${basedir}/target/bundle"/>
- <property name="anchor" value="${bundle}/local/${project.version}"/>
+ <property name="anchor" value="${bundle}/local"/>
<x:path id="module.path" type="*" mode="RUNTIME" module="true"/>
<x:replicate refid="module.path" toDir="${anchor}" />
<copy todir="${anchor}/${project.group}">

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultCompositionFactory.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultCompositionFactory.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultCompositionFactory.java
Fri Feb 11 19:25:55 2005
@@ -372,7 +372,7 @@
Long value = criteria.getDefaultDeploymentTimeout();
if( null == value )
{
- return 1000;
+ return 6000; // SJM changed from 1000 to 6000
}
else
{

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultDeploymentModel.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultDeploymentModel.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultDeploymentModel.java
Fri Feb 11 19:25:55 2005
@@ -292,8 +292,7 @@
/**
* Return the default deployment timeout value declared in the
* kernel configuration. The implementation looks for a value
- * assigned under the property key "urn:composition:deployment.timeout"
- * and defaults to 1000 msec if undefined.
+ * assigned under the property key "urn:composition:deployment.timeout".
*
* @return the default deployment timeout value
*/

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultModelFactory.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultModelFactory.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultModelFactory.java
Fri Feb 11 19:25:55 2005
@@ -403,7 +403,6 @@
}
}

-
/**
* Creation of a new root containment model using
* a supplied profile.

Modified: development/main/metro/main/build.xml
==============================================================================
--- development/main/metro/main/build.xml (original)
+++ development/main/metro/main/build.xml Fri Feb 11 19:25:55 2005
@@ -5,21 +5,33 @@

<transit:import uri="artifact:template:dpml/magic/standard"/>

+ <condition property="project.l4j.declared" value="false">
+ <isset property="project.l4j.exe"/>
+ </condition>
+
<target name="init" depends="standard.init">
<x:filter feature="plugin" token="METRO-PLUGIN-URI"/>
<x:filter feature="plugin" key="dpml-system-impl"
token="SYSTEM-PLUGIN-URI"/>
<x:filter feature="plugin" key="dpml-composition-impl"
token="COMPOSITION-IMPL-ARTIFACT-URI"/>
<x:filter feature="plugin" key="dpml-activation-impl"
token="RUNTIME-IMPL-ARTIFACT-URI"/>
<x:filter feature="version" key="dpml-transit-main"
token="TRANSIT_VERSION"/>
+
+ <x:property key="dpml-transit-main" feature="uri" name="transit.uri"/>
+ <transit:get uri="${transit.uri}" property="transit.filename"/>
+ <filter token="PROJECT-JAR-PATH" value="${transit.filename}"/>
+ <filter token="PROJECT-EXE-FILENAME" value="metro.exe"/>
+ <filter token="PROJECT-NAME" value="${project.name}"/>
+
</target>

<target name="package" depends="standard.package">
<x:export class="net.dpml.metro.Metro"/>
</target>

- <target name="install" depends="bin,update,standard.install"/>
+ <target name="install" depends="update,standard.install"/>

<target name="update" depends="package">
+ <antcall target="bin"/>
<x:replicate/>
<copy todir="target/replicate/${project.group}/jars">
<fileset dir="target/deliverables/jars">
@@ -28,14 +40,26 @@
</copy>
</target>

- <target name="bin" depends="prepare">
- <mkdir dir="${dpml.home}/bin"/>
- <copy todir="${dpml.home}/bin" overwrite="true">
+ <target name="exe" if="project.l4j.declared">
+ <mkdir dir="target/bin/win32"/>
+ <exec executable="${project.l4j.exe}" failonerror="true">
+ <arg line="target\conf\standard.cfg"/>
+ </exec>
+ </target>
+
+ <target name="bin" depends="exe">
+ <echo>
+#----------------------------------------------------------------------------------
+# Updating DPML SYSTEM installation. ${dpml.system}/bin
+#----------------------------------------------------------------------------------
+ </echo>
+ <mkdir dir="${dpml.system}/bin"/>
+ <copy todir="${dpml.system}/bin" overwrite="true">
<fileset dir="target/bin"/>
</copy>
- <chmod file="${dpml.home}/bin/metro" perm="755"/>
- <chmod file="${dpml.home}/bin/transit" perm="755"/>
- <chmod dir="${dpml.home}/bin" includes="*.sh" perm="755"/>
+ <chmod file="${dpml.system}/bin/metro" perm="755"/>
+ <chmod file="${dpml.system}/bin/transit" perm="755"/>
+ <chmod dir="${dpml.system}/bin" includes="*.sh" perm="755"/>
</target>

<!--

Modified: development/main/metro/module.xml
==============================================================================
--- development/main/metro/module.xml (original)
+++ development/main/metro/module.xml Fri Feb 11 19:25:55 2005
@@ -23,6 +23,10 @@

<transit:import uri="artifact:template:dpml/magic/standard"/>

+ <target name="init" depends="standard.init">
+ <property name="bundle" value="${basedir}/target/bundle"/>
+ </target>
+
<target name="build" depends="standard.build">
<x:module index="index.xml">
<header>
@@ -33,16 +37,40 @@
</target>

<target name="install" depends="docs,standard.install">
- <!--<x:replicate toDir="${dpml.home}/local/${project.version}" />-->
<antcall target="dist"/>
+ <echo>
+#----------------------------------------------------------------------------------
+# Updating DPML SYSTEM installation. ${dpml.system}/bin
+#----------------------------------------------------------------------------------
+ </echo>
+ <copy todir="${dpml.system}" preservelastmodified="true">
+ <fileset dir="${bundle}">
+ <include name="bin/**"/>
+ </fileset>
+ </copy>
+ <echo>
+#----------------------------------------------------------------------------------
+# Updating DPML DATA installation. ${dpml.data}
+#----------------------------------------------------------------------------------
+ </echo>
+ <mkdir dir="${dpml.data}"/>
+ <copy todir="${dpml.data}" preservelastmodified="true">
+ <fileset dir="${bundle}">
+ <include name="docs/**"/>
+ </fileset>
+ </copy>
+ <property name="export"
location="${dpml.dist}/${project.group}/${project.version}"/>
+ <mkdir dir="${export}"/>
+ <copy todir="${export}">
+ <fileset dir="target/dist"/>
+ </copy>
</target>

<target name="dist" depends="init">
- <property name="bundle" value="${basedir}/target/bundle"/>
- <property name="anchor" value="${bundle}/local/${project.version}"/>
+ <property name="local" value="${bundle}/local"/>
<x:path id="module.path" type="*" mode="RUNTIME" module="true"/>
- <x:replicate refid="module.path" toDir="${anchor}" />
- <copy todir="${anchor}/${project.group}">
+ <x:replicate refid="module.path" toDir="${local}" />
+ <copy todir="${local}/${project.group}">
<fileset dir="target/deliverables"/>
</copy>

@@ -65,17 +93,11 @@
</copy>

<!--
- Package the bundle into a compressed archive is place under ${dpml.dist}.
+ Package the bundle into a compressed archive.
-->
<x:dist compression="gzip">
<fileset dir="${bundle}"/>
</x:dist>
-
- <property name="export"
location="${dpml.dist}/${project.group}/${project.version}"/>
- <mkdir dir="${export}"/>
- <copy todir="${export}">
- <fileset dir="target/dist"/>
- </copy>
</target>

<target name="docs" depends="javadocs,junit-report"/>



  • svn commit: r1761 - in development/main: . home home/transit home/transit/handler home/transit/handler/etc/conf home/transit/handler/etc/setup/authority home/transit/handler/src/main/net/dpml/io home/transit/handler/src/main/net/dpml/transit home/transit/handler/src/main/net/dpml/transit/artifact home/transit/handler/src/main/net/dpml/transit/monitors home/transit/plugin home/transit/plugin/etc/bin home/transit/plugin/src/main/net/dpml/transit/control home/transit/tools home/transit/tools/src/main/net/dpml/transit/tools home/util home/util/cli magic magic/core metro metro/composition/impl/src/main/net/dpml/composition/model/impl metro/main metro/main/etc/conf, mcconnell, 02/11/2005

Archive powered by MHonArc 2.6.24.

Top of Page