[Yanel-commits] rev 39988 - public/yanel/trunk/src/build/targets
michi at wyona.com
michi at wyona.com
Mon Nov 17 14:06:20 CET 2008
Author: michi
Date: 2008-11-17 14:06:20 +0100 (Mon, 17 Nov 2008)
New Revision: 39988
Modified:
public/yanel/trunk/src/build/targets/build-binary-snapshot.xml
Log:
temporary directory introduced
Modified: public/yanel/trunk/src/build/targets/build-binary-snapshot.xml
===================================================================
--- public/yanel/trunk/src/build/targets/build-binary-snapshot.xml 2008-11-17 11:10:36 UTC (rev 39987)
+++ public/yanel/trunk/src/build/targets/build-binary-snapshot.xml 2008-11-17 13:06:20 UTC (rev 39988)
@@ -2,7 +2,10 @@
<project name="build-binary-snapshot" default="bin-snapshot" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
+ <target name="bin-snapshot" description="Create a binary snapshot" depends="init">
+<!--
<target name="bin-snapshot" description="Create a binary snapshot" depends="init, webapp">
+-->
<fail message="No revision specified! Please configure property 'yanel.revision' within 'src/build/local.build.properties'.">
<condition>
<equals arg1="${yanel.revision}" arg2="REVISION"/>
@@ -25,16 +28,24 @@
</fail>
<mkdir dir="${snapshot.dir.win}"/>
- <property name="target.servlet.context.prefix" value="ROOT"/>
+ <property name="tmp.dir" value="${snapshot.dir}/tmp"/>
+
<antcall target="prepare-tomcat"/>
+
<antcall target="copy-realms-resources"/>
<!-- Windows specific snapshot -->
+<!--
<antcall target="bin-snapshot-win"/>
+-->
<!-- UNIX specific snapshot -->
+<!--
<antcall target="bin-snapshot-unix"/>
+-->
<!--<delete dir="${snapshot.dir}"/>-->
+
+ <delete dir="${tmp.dir}"/>
</target>
<target name="prepare-tomcat">
@@ -51,100 +62,111 @@
</unzip>
<delete dir="${snapshot.dir}/META-INF"/>
<chmod dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/bin" perm="755" includes="*"/>
+
<!-- TODO: Differentiate between Java 1.4 and higher (jmx.jar)! -->
+<!--
<copy file="${yanel.source.home}/tools/apache-tomcat/java-1.4/apache-tomcat-5.5.20/bin/jmx.jar" todir="${snapshot.dir}/apache-tomcat-${tomcat.version}/bin"/>
+-->
+
+ <!-- Endorsed libs -->
+<!--
<copy file="${yanel.source.home}/build/webapps/${servlet.context.prefix}/WEB-INF/lib/${xerces.impl.artifactId}-${xerces.impl.version}.jar" todir="${snapshot.dir}/apache-tomcat-${tomcat.version}/common/endorsed"/>
<copy file="${yanel.source.home}/build/webapps/${servlet.context.prefix}/WEB-INF/lib/${xml.apis.artifactId}-${xml.apis.version}.jar" todir="${snapshot.dir}/apache-tomcat-${tomcat.version}/common/endorsed"/>
+-->
+
<!-- delete unused tomcat files -->
- <delete dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/${target.servlet.context.prefix}"/>
+ <delete dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/ROOT"/>
<delete dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/jsp-examples"/>
<delete dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/servlets-examples"/>
<delete dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/tomcat-docs"/>
<delete dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/balancer"/>
<delete dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/webdav"/>
+ <!-- Create base dir of yanel webapps -->
<mkdir dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/yanel-webapps"/>
+
<!-- Add context file -->
<copy file="${yanel.source.home}/src/binary-dist/tomcat-context.xml" tofile="${snapshot.dir}/apache-tomcat-${tomcat.version}/conf/Catalina/localhost/wyona-yanel-webapp-v-${yanel.version}-r-${yanel.revision}.xml"/>
<replace file="${snapshot.dir}/apache-tomcat-${tomcat.version}/conf/Catalina/localhost/wyona-yanel-webapp-v-${yanel.version}-r-${yanel.revision}.xml" value="wyona-yanel-webapp-v-${yanel.version}-r-${yanel.revision}">
<replacetoken>@YANEL_VERSION@</replacetoken>
</replace>
- <copy file="${yanel.source.home}/src/binary-dist/tomcat-context.xml" tofile="${snapshot.dir}/apache-tomcat-${tomcat.version}/conf/Catalina/localhost/${target.servlet.context.prefix}.xml"/>
- <replace file="${snapshot.dir}/apache-tomcat-${tomcat.version}/conf/Catalina/localhost/${target.servlet.context.prefix}.xml" value="wyona-yanel-webapp-v-${yanel.version}-r-${yanel.revision}">
+ <copy file="${yanel.source.home}/src/binary-dist/tomcat-context.xml" tofile="${snapshot.dir}/apache-tomcat-${tomcat.version}/conf/Catalina/localhost/ROOT.xml"/>
+ <replace file="${snapshot.dir}/apache-tomcat-${tomcat.version}/conf/Catalina/localhost/ROOT.xml" value="wyona-yanel-webapp-v-${yanel.version}-r-${yanel.revision}">
<replacetoken>@YANEL_VERSION@</replacetoken>
</replace>
</target>
+ <!-- Copy realms and resources -->
<target name="copy-realms-resources">
- <copy todir="${snapshot.dir}/${target.servlet.context.prefix}">
+ <copy todir="${tmp.dir}">
<fileset dir="${yanel.source.home}/build/webapps/${servlet.context.prefix}"/>
</copy>
- <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/realms">
+ <copy todir="${tmp.dir}/realms">
<fileset dir="${yanel.source.home}/src/realms"/>
</copy>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/realms/javadoc/repository.xml" value="content">
+ <replace file="${tmp.dir}/realms/javadoc/repository.xml" value="content">
<replacetoken>../../../build/javadoc</replacetoken>
</replace>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/realms/test/yanel/config/data-repository.xml" value="../data">
+ <replace file="${tmp.dir}/realms/test/yanel/config/data-repository.xml" value="../data">
<replacetoken>../../../../../local/test/data</replacetoken>
</replace>
- <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/realms/javadoc/content">
+ <copy todir="${tmp.dir}/realms/javadoc/content">
<fileset dir="${yanel.source.home}/build/javadoc"/>
</copy>
- <copy file="${yanel.source.home}/conf/realms.xml" todir="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/realms.xml" value="../../realms">
+ <copy file="${yanel.source.home}/conf/realms.xml" todir="${tmp.dir}/WEB-INF/classes" overwrite="true"/>
+ <replace file="${tmp.dir}/WEB-INF/classes/realms.xml" value="../../realms">
<replacetoken>@REALMS_DIR@</replacetoken>
</replace>
- <copy file="${yanel.source.home}/conf/resource-types.xml" tofile="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/resource-types.xml" overwrite="true"/>
+ <copy file="${yanel.source.home}/conf/resource-types.xml" tofile="${tmp.dir}/WEB-INF/classes/resource-types.xml" overwrite="true"/>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/resource-types.xml" value="../../resources">
+ <replace file="${tmp.dir}/WEB-INF/classes/resource-types.xml" value="../../resources">
<replacetoken>../src/resources</replacetoken>
</replace>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/resource-types.xml" value="../../resources">
+ <replace file="${tmp.dir}/WEB-INF/classes/resource-types.xml" value="../../resources">
<replacetoken>../src/contributions/resources</replacetoken>
</replace>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/resource-types.xml" value="../../resources">
+ <replace file="${tmp.dir}/WEB-INF/classes/resource-types.xml" value="../../resources">
<replacetoken>../src/realms/welcome-admin/yanel/resources</replacetoken>
</replace>
- <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/resources">
+ <copy todir="${tmp.dir}/resources">
<fileset dir="${yanel.source.home}/src/resources"/>
</copy>
- <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/resources">
+ <copy todir="${tmp.dir}/resources">
<fileset dir="${yanel.source.home}/src/contributions/resources"/>
</copy>
- <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/resources">
+ <copy todir="${tmp.dir}/resources">
<fileset dir="${yanel.source.home}/src/realms/welcome-admin/yanel/resources"/>
</copy>
- <xslt in="${yanel.source.home}/conf/yanel.xml" out="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/yanel.properties" style="yanel2properties.xsl" force="true">
+ <xslt in="${yanel.source.home}/conf/yanel.xml" out="${tmp.dir}/WEB-INF/classes/yanel.properties" style="yanel2properties.xsl" force="true">
<!--<param name="servlet.context.prefix" expression="${servlet.context.prefix}"/>-->
</xslt>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
+ <replace file="${tmp.dir}/WEB-INF/classes/yanel.properties" value="../../resources">
<replacetoken>../src/resources</replacetoken>
</replace>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
+ <replace file="${tmp.dir}/WEB-INF/classes/yanel.properties" value="../../resources">
<replacetoken>../src/contributions/resources</replacetoken>
</replace>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
+ <replace file="${tmp.dir}/WEB-INF/classes/yanel.properties" value="../../resources">
<replacetoken>../src/realms/welcome-admin/yanel/resources</replacetoken>
</replace>
- <copy file="${yanel.source.home}/src/binary-dist/log4j.properties" todir="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/log4j.properties" value="wyona-yanel-webapp-v-${yanel.version}-r-${yanel.revision}">
+ <copy file="${yanel.source.home}/src/binary-dist/log4j.properties" todir="${tmp.dir}/WEB-INF/classes" overwrite="true"/>
+ <replace file="${tmp.dir}/WEB-INF/classes/log4j.properties" value="wyona-yanel-webapp-v-${yanel.version}-r-${yanel.revision}">
<replacetoken>@SERVLET_CONTEXT@</replacetoken>
</replace>
- <mkdir dir="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/logs"/>
+ <mkdir dir="${tmp.dir}/WEB-INF/logs"/>
- <copy file="${yanel.source.home}/src/build/install.rdf" todir="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/install.rdf" value="${yanel.version}">
+ <copy file="${yanel.source.home}/src/build/install.rdf" todir="${tmp.dir}/WEB-INF/classes" overwrite="true"/>
+ <replace file="${tmp.dir}/WEB-INF/classes/install.rdf" value="${yanel.version}">
<replacetoken>@VERSION@</replacetoken>
</replace>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/install.rdf" value="${yanel.revision}">
+ <replace file="${tmp.dir}/WEB-INF/classes/install.rdf" value="${yanel.revision}">
<replacetoken>@REVISION@</replacetoken>
</replace>
- <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/install.rdf" value="bin-snapshot">
+ <replace file="${tmp.dir}/WEB-INF/classes/install.rdf" value="bin-snapshot">
<replacetoken>@INSTALLTYPE@</replacetoken>
</replace>
</target>
@@ -156,7 +178,7 @@
<fileset dir="${snapshot.dir}/apache-tomcat-${tomcat.version}" />
</copy>
<copy todir="${snapshot.dir.win}/apache-tomcat-${tomcat.version}/yanel-webapps/wyona-yanel-webapp-v-${yanel.version}-r-${yanel.revision}">
- <fileset dir="${snapshot.dir}/${target.servlet.context.prefix}"/>
+ <fileset dir="${tmp.dir}"/>
</copy>
<!-- <move file="${snapshot.dir}/${servlet.context.prefix}.war" todir="${snapshot.dir.win}/apache-tomcat-${tomcat.version}/webapps"/> -->
@@ -184,9 +206,8 @@
<target name="bin-snapshot-unix">
<copy todir="${snapshot.dir}/apache-tomcat-${tomcat.version}/yanel-webapps/wyona-yanel-webapp-v-${yanel.version}-r-${yanel.revision}">
- <fileset dir="${snapshot.dir}/${target.servlet.context.prefix}"/>
+ <fileset dir="${tmp.dir}"/>
</copy>
- <delete dir="${snapshot.dir}/${target.servlet.context.prefix}"/>
<!-- Copy UNIX and Windows specific files -->
<copy file="${yanel.source.home}/src/binary-dist/README-UNIX.txt" tofile="${snapshot.dir}/README.txt" overwrite="true"/>
<copy file="${yanel.source.home}/src/binary-dist/start.sh" todir="${snapshot.dir}"/>
More information about the Yanel-commits
mailing list