diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-29 01:36:47 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-29 01:36:47 +0000 |
commit | ef58ca099bcd509b326fc592d5221b99e1faf89a (patch) | |
tree | a51dfcd52c314469406c8d1c69468a6218fe2190 /java/sca | |
parent | 32c426553b86ba7c9ba4a17a8f4530c23cd88979 (diff) |
Align the build-common.xml to use the build-path.xml from the distro
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@738703 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r-- | java/sca/samples/build-common.xml | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/java/sca/samples/build-common.xml b/java/sca/samples/build-common.xml index 69a467d215..9c81fc929d 100644 --- a/java/sca/samples/build-common.xml +++ b/java/sca/samples/build-common.xml @@ -18,17 +18,19 @@ --> <project name="common"> - <available file="../../distribution/pom.xml" property="running.in.development"/> - - <target name="common-set-development" if="running.in.development"> - <property name="distro.root" value="../../distribution/all/target"/> - </target> - - <target name="common-set-distribution" unless="running.in.development"> - <property name="distro.root" value="../.."/> - </target> + <!-- Set the distro path based on the existence of the pom.xml --> + <condition property="distro.path" value="../../distribution/all/target" else="../.."> + <available file="../../distribution/pom.xml"/> + </condition> + + <!-- Convert the path to an absolute location --> + <property name="distro.root" location="${distro.path}"/> + <echo>Distribution: ${distro.root}</echo> + + <!-- @file is relative to the enclosing file --> + <import file="${distro.root}/features/build-path.xml"/> - <target name="common-init" depends="common-set-development, common-set-distribution" > + <target name="common-init"> <mkdir dir="${sample.root}/target/classes"/> </target> @@ -38,13 +40,7 @@ debug="on" source="1.5" target="1.5"> - <classpath> - <!--pathelement location="${distro.root}/tuscany-distribution-core/manifest.jar"/--> - <fileset dir="${distro.root}/modules"> - <include name="*.jar" /> - <include name="*/*.jar" /> - </fileset> - </classpath> + <classpath refid="tuscany.path"/> </javac> <copy todir="${sample.root}/target/classes"> <fileset dir="${sample.root}/src/main/resources"/> @@ -59,24 +55,14 @@ debug="on" source="1.5" target="1.5"> - <classpath> - <!--pathelement location="${distro.root}/tuscany-distribution-all/manifest.jar"/--> - <fileset dir="${distro.root}/modules"> - <include name="*.jar" /> - <include name="*/*.jar" /> - </fileset> - </classpath> + <classpath refid="tuscany.path"/> </javac> <copy todir="${sample.root}/target/classes"> <fileset dir="${sample.root}/src/main/resources"/> </copy> - <fileset id="tuscany.jars" dir="${distro.root}/modules"> - <include name="*.jar" /> - <include name="*/*.jar" /> - </fileset> <war destfile="${sample.war}" webxml="${sample.root}/src/main/webapp/WEB-INF/web.xml"> <fileset dir="${sample.root}/src/main/webapp"/> - <lib refid="tuscany.jars"/> + <lib refid="tuscany.path"/> <classes dir="${sample.root}/target/classes"/> </war> </target> |