You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by ae...@apache.org on 2006/09/17 00:23:16 UTC
svn commit: r446963 - /webservices/muse/trunk/build.xml
Author: aeberbac
Date: Sat Sep 16 15:23:11 2006
New Revision: 446963
URL: http://svn.apache.org/viewvc?view=rev&rev=446963
Log:
new build.xml, cleaned up for release build. This pulls everything down from svn
Modified:
webservices/muse/trunk/build.xml
Modified: webservices/muse/trunk/build.xml
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/build.xml?view=diff&rev=446963&r1=446962&r2=446963
==============================================================================
--- webservices/muse/trunk/build.xml (original)
+++ webservices/muse/trunk/build.xml Sat Sep 16 15:23:11 2006
@@ -1,59 +1,110 @@
<?xml version="1.0"?>
<project name="muse_build" default="build">
- <target name="init">
+
+ <!-- set the property to indicate that JAVA_HOME is set -->
+ <target name="cond_check">
+ <property environment="env"/>
+ <condition property="JAVA_HOME_SET">
+ <isset property="env.JAVA_HOME"/>
+ </condition>
+ </target>
+
+ <!-- fail if JAVA_HOME isn't set, otherwise we don't execute the body -->
+ <target name="check_environment" unless="JAVA_HOME_SET" depends="cond_check">
+ <fail message="The environment variable JAVA_HOME is not set. Set this variable to the directory where the JDK is installed."/>
+ </target>
+
+ <!-- check out all of the sources we need -->
+ <target name="checkout" depends="check_environment">
+ <!-- start logging things to a log file -->
+ <property name="LOG_FILE" value="log.txt"/>
+ <delete file="${LOG_FILE}"/>
+ <record name="${LOG_FILE}" append="false" action="start"/>
+ <echo message="A copy of this output is in ${LOG_FILE}"/>
+
+ <!-- the URL of the modules repository -->
+ <property name="MUSE_SVN_MODULES_REPOSITORY" value="http://svn.apache.org/repos/asf/webservices/muse/trunk/modules"/>
+
+ <!-- the name of the directory to which we will checkout the modules -->
+ <property name="MUSE_SVN_MODULES" value="modules"/>
+
+ <!-- the URL of the modules repository -->
+ <property name="MUSE_SVN_SAMPLES_REPOSITORY" value="http://svn.apache.org/repos/asf/webservices/muse/trunk/samples"/>
+
+ <!-- the name of the directory to which we will checkout the samples -->
+ <property name="MUSE_SVN_SAMPLES" value="samples"/>
+
+ <!-- the URL of the site (ie docs) repository -->
+ <property name="MUSE_SVN_SITE_REPOSITORY" value="http://svn.apache.org/repos/asf/webservices/muse/site"/>
+
+ <!-- the name of the directory to which we will checkout the site -->
+ <property name="MUSE_SVN_SITE" value="docs"/>
+
+ <!-- the svn ant task didn't work so call it directly
+ an executable svn must be on the system PATH -->
+ <exec executable="svn" searchpath="true" dir="." failonerror="true">
+ <arg line="co ${MUSE_SVN_MODULES_REPOSITORY} ${MUSE_SVN_MODULES} --non-interactive"/>
+ </exec>
+
+ <exec executable="svn" searchpath="true" dir="." failonerror="true">
+ <arg line="co ${MUSE_SVN_SAMPLES_REPOSITORY} ${MUSE_SVN_SAMPLES} --non-interactive"/>
+ </exec>
+
+ <exec executable="svn" searchpath="true" dir="." failonerror="true">
+ <arg line="co ${MUSE_SVN_SITE_REPOSITORY} ${MUSE_SVN_SITE} --non-interactive"/>
+ </exec>
+
+ <!-- get the license -->
+ <get src="http://svn.apache.org/viewvc/webservices/muse/trunk/license.txt?view=co" dest="license.txt"/>
+ </target>
+
+ <!-- initialize properties -->
+ <target name="init" depends="checkout">
+ <!-- the executable for maven, mvn.bat on windows, mvn otherwise -->
+ <condition property="MAVEN_EXECUTABLE" value="mvn.bat" else="mvn">
+ <os family="windows"/>
+ </condition>
+
<!-- the name of the directory where the release zip files will be put -->
<property name="MUSE_DIST" value="dist"/>
<!-- pull out the version we're building from the pom.xml -->
- <xmlproperty file="${basedir}/modules/pom.xml"/>
+ <xmlproperty file="${MUSE_SVN_MODULES}/pom.xml"/>
<property name="VERSION" value="${project.version}"/>
+ <!-- temporary directory -->
+ <property name="TEMP_DIR" value="temp"/>
+ <property name="TEMP_BIN_DIST_DIR" value="${TEMP_DIR}/muse-${VERSION}-bin"/>
+ <property name="TEMP_SRC_DIST_DIR" value="${TEMP_DIR}/muse-${VERSION}-src"/>
+
<!-- set up properties for all of the directories we're creating -->
- <property name="MUSE_TOOLS_BIN" value="${VERSION}/muse-${VERSION}-bin/bin"/>
+ <property name="MUSE_TOOLS_BIN" value="${TEMP_DIR}/muse-${VERSION}-bin/bin"/>
- <property name="MUSE_CORE_DIR" value="${VERSION}/muse-${VERSION}-bin/modules/core"/>
- <property name="MUSE_TOOLS_DIR" value="${VERSION}/muse-${VERSION}-bin/modules/tools"/>
- <property name="MUSE_AXIS2_DIR" value="${VERSION}/muse-${VERSION}-bin/modules/axis2"/>
- <property name="MUSE_WS_API_DIR" value="${VERSION}/muse-${VERSION}-bin/modules/ws-fx-api"/>
- <property name="MUSE_WS_IMPL_DIR" value="${VERSION}/muse-${VERSION}-bin/modules/ws-fx-impl"/>
-
- <property name="MUSE_OSGI_CORE_DIR" value="${VERSION}/muse-${VERSION}-bin/modules/osgi/core"/>
- <property name="MUSE_OSGI_WS_API_DIR" value="${VERSION}/muse-${VERSION}-bin/modules/osgi/ws-fx-api"/>
- <property name="MUSE_OSGI_WS_IMPL_DIR" value="${VERSION}/muse-${VERSION}-bin/modules/osgi/ws-fx-impl"/>
-
- <property name="MUSE_SAMPLE_DIR" value="${VERSION}/muse-${VERSION}-bin/samples"/>
-
- <property name="MUSE_JAVADOC_DIR" value="${VERSION}/muse-${VERSION}-bin/docs/javadoc"/>
- <property name="MUSE_DOC_DIR" value="${VERSION}/muse-${VERSION}-bin/docs/overview"/>
- <property name="MUSE_LIB_DIR" value="${VERSION}/muse-${VERSION}-bin/lib"/>
+ <property name="MUSE_CORE_DIR" value="${TEMP_BIN_DIST_DIR}/modules/core"/>
+ <property name="MUSE_TOOLS_DIR" value="${TEMP_BIN_DIST_DIR}/modules/tools"/>
+ <property name="MUSE_AXIS2_DIR" value="${TEMP_BIN_DIST_DIR}/modules/axis2"/>
+ <property name="MUSE_WS_API_DIR" value="${TEMP_BIN_DIST_DIR}/modules/ws-fx-api"/>
+ <property name="MUSE_WS_IMPL_DIR" value="${TEMP_BIN_DIST_DIR}/modules/ws-fx-impl"/>
+
+ <property name="MUSE_OSGI_CORE_DIR" value="${TEMP_BIN_DIST_DIR}/modules/osgi/core"/>
+ <property name="MUSE_OSGI_WS_API_DIR" value="${TEMP_BIN_DIST_DIR}/modules/osgi/ws-fx-api"/>
+ <property name="MUSE_OSGI_WS_IMPL_DIR" value="${TEMP_BIN_DIST_DIR}/modules/osgi/ws-fx-impl"/>
+
+ <property name="MUSE_SAMPLE_DIR" value="${TEMP_BIN_DIST_DIR}/samples"/>
+
+ <property name="MUSE_JAVADOC_DIR" value="${TEMP_BIN_DIST_DIR}/docs/docs/${VERSION}/javadoc"/>
+ <property name="MUSE_LIB_DIR" value="${TEMP_BIN_DIST_DIR}/lib"/>
</target>
<target name="directory_structure" depends="init">
<!-- make sure the directories are wiped before we continue -->
+ <delete dir="${TEMP_DIR}"/>
<delete dir="${MUSE_DIST}"/>
- <delete dir="${MUSE_JAVADOC_DIR}"/>
- <delete dir="${MUSE_DOC_DIR}"/>
-
- <delete dir="${MUSE_CORE_DIR}"/>
- <delete dir="${MUSE_AXIS2_DIR}"/>
- <delete dir="${MUSE_TOOLS_DIR}"/>
- <delete dir="${MUSE_WS_API_DIR}"/>
- <delete dir="${MUSE_WS_IMPL_DIR}"/>
-
- <delete dir="${MUSE_OSGI_CORE_DIR}"/>
- <delete dir="${MUSE_OSGI_WS_API_DIR}"/>
- <delete dir="${MUSE_OSGI_WS_IMPL_DIR}"/>
-
- <delete dir="${MUSE_SAMPLE_DIR}"/>
-
- <delete dir="${VERSION}/muse-${VERSION}-src/"/>
-
<!-- remake the directories -->
<mkdir dir="${MUSE_DIST}"/>
<mkdir dir="${MUSE_JAVADOC_DIR}"/>
- <mkdir dir="${MUSE_DOC_DIR}"/>
<mkdir dir="${MUSE_CORE_DIR}"/>
<mkdir dir="${MUSE_AXIS2_DIR}"/>
@@ -67,90 +118,110 @@
<mkdir dir="${MUSE_SAMPLE_DIR}"/>
- <mkdir dir="${VERSION}/muse-${VERSION}-src/"/>
+ <mkdir dir="${TEMP_SRC_DIST_DIR}"/>
</target>
<target name="src_dist" depends="directory_structure">
<!-- copy the source from the svn checkout folder to our temporary
source distribution folder -->
- <copy todir="${VERSION}/muse-${VERSION}-src">
- <fileset dir="${basedir}/modules">
+ <copy todir="${TEMP_SRC_DIST_DIR}">
+ <fileset dir="${MUSE_SVN_MODULES}">
<exclude name="**/build/**"/>
<exclude name="**/.svn/**"/>
+ <exclude name="muse-platform-jaxws/**"/>
+ <exclude name="preview/**"/>
<exclude name="*.bat"/>
</fileset>
</copy>
<!-- copy in the license -->
- <copy todir="${VERSION}/muse-${VERSION}-src" file="${basedir}/license.txt"/>
+ <copy todir="${TEMP_SRC_DIST_DIR}" file="license.txt"/>
<!-- zip up and put into the distribution folder -->
<zip destfile="${MUSE_DIST}/muse-${VERSION}-src.zip">
- <fileset dir="${VERSION}">
+ <fileset dir="${TEMP_DIR}">
<include name="muse-${VERSION}-src/**"/>
</fileset>
</zip>
</target>
<target name="bin_dist" depends="directory_structure">
- <!-- call maven directly. This is windows-centric (it's a .bat file) and the batch
- file doesn't seem to die with an error code if something goes wrong -->
- <exec executable="mvn.bat" searchpath="true" dir="${basedir}/modules" failonerror="true">
- <arg line="-ff -e"/>
+ <!-- call maven directly -->
+ <exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${MUSE_SVN_MODULES}" failonerror="true">
+ <arg line="-ff -e"/>
+ <env key="MAVEN_TERMINATE_CMD" value="on" />
</exec>
<!-- copy in the license -->
- <copy todir="${VERSION}/muse-${VERSION}-bin" file="${basedir}/license.txt"/>
+ <copy todir="${TEMP_BIN_DIST_DIR}" file="license.txt"/>
<!-- create the javadoc -->
<javadoc destdir="${MUSE_JAVADOC_DIR}" useexternalfile="yes" failonerror="true">
- <fileset dir="${VERSION}/muse-${VERSION}-src">
- <include name="muse-util*/**/*.java"/>
+ <fileset dir="${TEMP_SRC_DIST_DIR}">
+ <include name="muse-util-xstream/**/*.java"/>
+ <include name="muse-util-xml/**/*.java"/>
+ <include name="muse-util-qname/**/*.java"/>
+ <include name="muse-util/src/org/apache/muse/util/uuid/**/*.java"/>
+ <include name="muse-util/src/org/apache/muse/util/messages/**/*.java"/>
+ <include name="muse-util/src/org/apache/muse/util/LoggingUtils.java"/>
<include name="muse-ws*/**/*.java"/>
<include name="muse-core/src/org/apache/muse/ws/**/*.java"/>
<include name="muse-core/src/org/apache/muse/core/**/*.java"/>
+ <exclude name="muse-core/src/org/apache/muse/core/serializer/*.java"/>
<exclude name="muse-core/src/org/apache/muse/core/platform/**/*.java"/>
<exclude name="muse-core/src/org/apache/muse/core/descriptor/**/*.java"/>
</fileset>
+ <fileset dir="${TEMP_SRC_DIST_DIR}">
+ <include name="muse-core/src/org/apache/muse/core/serializer/Serializer.java"/>
+ <include name="muse-core/src/org/apache/muse/core/serializer/SerializerRegistry.java"/>
+ </fileset>
</javadoc>
- <!-- TODO: bundle in docs -->
+ <!-- copy in docs -->
+ <copy todir="${TEMP_BIN_DIST_DIR}">
+ <fileset dir="${basedir}">
+ <include name="docs/*"/>
+ <include name="docs/images/**/*"/>
+ <include name="docs/skin/**/*"/>
+ <include name="docs/docs/${VERSION}/**/*"/>
+ <exclude name="**/.svn/**"/>
+ </fileset>
+ </copy>
<!-- copy in core modules -->
<copy todir="${MUSE_CORE_DIR}" flatten="true">
- <fileset dir="${basedir}/modules">
+ <fileset dir="${MUSE_SVN_MODULES}">
<include name="muse*/**/muse-core-${VERSION}.jar"/>
<include name="muse*/**/muse-wsa-soap-${VERSION}.jar"/>
<include name="muse*/**/muse-util*-${VERSION}.jar"/>
</fileset>
</copy>
-
<!-- copy in AXIS2 modules -->
<copy todir="${MUSE_AXIS2_DIR}" flatten="true">
- <fileset dir="${basedir}/modules">
+ <fileset dir="${MUSE_SVN_MODULES}">
<include name="muse*/**/muse-platform-axis2-${VERSION}.jar"/>
</fileset>
</copy>
<!-- copy in tools modules -->
<copy todir="${MUSE_TOOLS_DIR}" flatten="true">
- <fileset dir="${basedir}/modules">
+ <fileset dir="${MUSE_SVN_MODULES}">
<include name="muse*/**/muse-tools-${VERSION}.jar"/>
</fileset>
</copy>
<!-- copy in WS-* api modules -->
<copy todir="${MUSE_WS_API_DIR}" flatten="true">
- <fileset dir="${basedir}/modules">
+ <fileset dir="${MUSE_SVN_MODULES}">
<include name="muse*/**/muse-*api-${VERSION}.jar"/>
</fileset>
</copy>
<!-- copy in WS-* implementation modules -->
<copy todir="${MUSE_WS_IMPL_DIR}" flatten="true">
- <fileset dir="${basedir}/modules">
+ <fileset dir="${MUSE_SVN_MODULES}">
<include name="muse*/**/muse-*impl-${VERSION}.jar"/>
<include name="muse*/**/muse-wsrf-rmd-${VERSION}.jar"/>
</fileset>
@@ -158,7 +229,7 @@
<!-- copy in osgi core modules -->
<copy todir="${MUSE_OSGI_CORE_DIR}" flatten="true">
- <fileset dir="${basedir}/modules">
+ <fileset dir="${MUSE_SVN_MODULES}">
<include name="muse-osgi*/**/muse-osgi*-${VERSION}.jar"/>
</fileset>
<fileset dir="${basedir}/modules/osgi-bundles">
@@ -170,14 +241,14 @@
<!-- copy in osgi WS-* api modules -->
<copy todir="${MUSE_OSGI_WS_API_DIR}" flatten="true">
- <fileset dir="${basedir}/modules/osgi-bundles">
+ <fileset dir="${MUSE_SVN_MODULES}/osgi-bundles">
<include name="*/target/muse-*api-${VERSION}.jar"/>
</fileset>
</copy>
<!-- copy in osgi WS-* implementation modules -->
<copy todir="${MUSE_OSGI_WS_IMPL_DIR}" flatten="true">
- <fileset dir="${basedir}/modules/osgi-bundles">
+ <fileset dir="${MUSE_SVN_MODULES}/osgi-bundles">
<include name="*/target/muse-*impl-${VERSION}.jar"/>
<include name="*/target/muse-wsrf-rmd-${VERSION}.jar"/>
</fileset>
@@ -186,37 +257,49 @@
<!-- copy in samples -->
<copy todir="${MUSE_SAMPLE_DIR}">
- <fileset dir="${basedir}/samples">
+ <fileset dir="${MUSE_SVN_SAMPLES}">
<exclude name="**/.svn/**"/>
</fileset>
</copy>
<!-- copy in scripts -->
<copy todir="${MUSE_TOOLS_BIN}">
- <fileset dir="${basedir}/modules/muse-tools/scripts">
+ <fileset dir="${MUSE_SVN_MODULES}/muse-tools/scripts">
<include name="*.sh"/>
<include name="*.bat"/>
- <include name="readme.txt"/>
</fileset>
</copy>
<!-- get the extra jars and artifacts for the lib folder -->
- <get src="http://ws.apache.org/muse/build/lib/axis2.zip" dest="axis2.zip"/>
- <get src="http://ws.apache.org/muse/build/lib/eclipse-osgi.zip" dest="eclipse-osgi.zip"/>
- <get src="http://ws.apache.org/muse/build/lib/common.zip" dest="common.zip"/>
+ <get src="http://ws.apache.org/muse/build/lib/axis2.zip" dest="${TEMP_DIR}/axis2.zip"/>
+ <get src="http://ws.apache.org/muse/build/lib/eclipse-osgi.zip" dest="${TEMP_DIR}/eclipse-osgi.zip"/>
+ <get src="http://ws.apache.org/muse/build/lib/common.zip" dest="${TEMP_DIR}/common.zip"/>
<!-- unzip them into the lib folder -->
- <unzip src="axis2.zip" dest="${MUSE_LIB_DIR}"/>
- <unzip src="eclipse-osgi.zip" dest="${MUSE_LIB_DIR}"/>
- <unzip src="common.zip" dest="${MUSE_LIB_DIR}"/>
+ <unzip src="${TEMP_DIR}/axis2.zip" dest="${MUSE_LIB_DIR}"/>
+ <unzip src="${TEMP_DIR}/eclipse-osgi.zip" dest="${MUSE_LIB_DIR}"/>
+ <unzip src="${TEMP_DIR}/common.zip" dest="${MUSE_LIB_DIR}"/>
<!-- zip up everything and put it into the distribution -->
- <zip destfile="dist/muse-${VERSION}-bin.zip">
- <fileset dir="${VERSION}">
+ <zip destfile="${MUSE_DIST}/muse-${VERSION}-bin.zip">
+ <fileset dir="${TEMP_DIR}">
<include name="muse-${VERSION}-bin/**"/>
</fileset>
</zip>
+
+ <!-- get maven to clean up the generated files -->
+ <exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${MUSE_SVN_MODULES}" failonerror="true">
+ <arg line="clean"/>
+ <env key="MAVEN_TERMINATE_CMD" value="on" />
+ </exec>
+ </target>
+
+ <target name="cleanup">
+ <delete dir="${TEMP_DIR}"/>
+ <delete file="license.txt"/>
</target>
- <target name="build" depends="src_dist,bin_dist"/>
+ <target name="build" depends="src_dist,bin_dist,cleanup">
+ <record name="${LOG_FILE}" append="yes" action="stop"/>
+ </target>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org