[Yanel-commits] rev 23091 - in public/yanel/trunk/src: binary-dist/windows build build/targets

andi at wyona.com andi at wyona.com
Fri Mar 2 15:04:25 CET 2007


Author: andi
Date: 2007-03-02 15:04:23 +0100 (Fri, 02 Mar 2007)
New Revision: 23091

Added:
   public/yanel/trunk/src/build/targets/build-update-war.xml
Modified:
   public/yanel/trunk/src/binary-dist/windows/install-yanel.nsi
   public/yanel/trunk/src/build/build.xml
   public/yanel/trunk/src/build/targets/build-binary-snapshot.xml
Log:
Improved bin-snapshot. Fixes bug #5211, thanks to Simon!


Modified: public/yanel/trunk/src/binary-dist/windows/install-yanel.nsi
===================================================================
--- public/yanel/trunk/src/binary-dist/windows/install-yanel.nsi	2007-03-02 13:26:40 UTC (rev 23090)
+++ public/yanel/trunk/src/binary-dist/windows/install-yanel.nsi	2007-03-02 14:04:23 UTC (rev 23091)
@@ -79,12 +79,12 @@
 SectionEnd
 
 Section -post SEC0001
-ExecShell "open" '"$INSTDIR\start.bat"' 0 SW_SHOWMINIMIZED
+    ExecShell "open" '"$INSTDIR\start.bat"' 0 SW_SHOWMINIMIZED
     WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
     SetOutPath $INSTDIR
     WriteUninstaller $INSTDIR\uninstall.exe
-Sleep 12000
-ExecShell "open" '"http://localhost:8080/yanel/"' 0 SW_SHOWNORMAL    
+    Sleep 12000
+    ExecShell "open" '"http://localhost:8080/"' 0 SW_SHOWNORMAL    
     !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
     SetOutPath $SMPROGRAMS\$StartMenuGroup
     CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe

Modified: public/yanel/trunk/src/build/build.xml
===================================================================
--- public/yanel/trunk/src/build/build.xml	2007-03-02 13:26:40 UTC (rev 23090)
+++ public/yanel/trunk/src/build/build.xml	2007-03-02 14:04:23 UTC (rev 23091)
@@ -20,6 +20,7 @@
   <import file="targets/add-third-party-realm.xml"/>
   <import file="targets/create-new-resource-type.xml"/>
   <import file="targets/build-binary-snapshot.xml"/>
+  <import file="targets/build-update-war.xml"/>
   <import file="targets/execute-jmeter.xml"/>
   
   <target name="ask-to-reconfigure-tomcat-cluster-node1" description="reconfigure Tomcat cluster node 1" if="isTomcat1PortsSet">
@@ -413,9 +414,6 @@
     <replace file="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="source">
       <replacetoken>@INSTALLTYPE@</replacetoken>
     </replace>
-    <replace file="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="unknown">
-      <replacetoken>@PLATFORM@</replacetoken>
-    </replace>
 
     <replace file="${build.dir}/webapps/${servlet.context.prefix}/WEB-INF/classes/log4j.properties" value="${log4j.file.forward.slashes}">
       <replacetoken>@LOG4J_FILE@</replacetoken>

Modified: public/yanel/trunk/src/build/targets/build-binary-snapshot.xml
===================================================================
--- public/yanel/trunk/src/build/targets/build-binary-snapshot.xml	2007-03-02 13:26:40 UTC (rev 23090)
+++ public/yanel/trunk/src/build/targets/build-binary-snapshot.xml	2007-03-02 14:04:23 UTC (rev 23091)
@@ -4,6 +4,7 @@
   
   <target name="bin-snapshot" description="Create a binary snapshot" depends="init, webapp">
     <delete dir="${build.dir}/bin-snapshots"/>
+    <property name="target.servlet.context.prefix" value="ROOT"/>
     <property name="snapshot.dir" value="${build.dir}/bin-snapshots/wyona-yanel-SNAPSHOT-${yanel.version}-r${yanel.revision}-bin"/>
     <mkdir dir="${snapshot.dir}"/>
     <antcall target="prepare-tomcat"/>
@@ -39,6 +40,7 @@
     <copy file="${yanel.home.dir}/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.home.dir}/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/jsp-examples"/>
     <delete dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/servlets-examples"/>
     <delete dir="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/tomcat-docs"/>
@@ -47,63 +49,69 @@
   </target>
   
   <target name="copy-realms-resources">
-    <copy todir="${snapshot.dir}/${servlet.context.prefix}">
+    <copy todir="${snapshot.dir}/${target.servlet.context.prefix}">
       <fileset dir="${yanel.home.dir}/build/webapps/${servlet.context.prefix}"/>
     </copy>
-    <copy todir="${snapshot.dir}/${servlet.context.prefix}/realms">
+    <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/realms">
       <fileset dir="${yanel.home.dir}/src/realms"/>
     </copy>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/realms/javadoc/repository.xml" value="content">
+    <replace file="${snapshot.dir}/${target.servlet.context.prefix}/realms/javadoc/repository.xml" value="content">
       <replacetoken>../../../build/javadoc</replacetoken>
     </replace>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/realms/test/yanel/config/data-repository.xml" value="../data">
+    <replace file="${snapshot.dir}/${target.servlet.context.prefix}/realms/test/yanel/config/data-repository.xml" value="../data">
       <replacetoken>../../../../../local/test/data</replacetoken>
     </replace>
-    <copy todir="${snapshot.dir}/${servlet.context.prefix}/realms/javadoc/content">
+    <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/realms/javadoc/content">
       <fileset dir="${yanel.home.dir}/build/javadoc"/>
     </copy>
-    <copy file="${yanel.home.dir}/conf/realms.xml" todir="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/realms.xml" value="../../realms">
+    <copy file="${yanel.home.dir}/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">
       <replacetoken>../src/realms</replacetoken>
     </replace>
-    <copy todir="${snapshot.dir}/${servlet.context.prefix}/resources">
+    <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/resources">
       <fileset dir="${yanel.home.dir}/src/resources"/>
     </copy>
-    <copy todir="${snapshot.dir}/${servlet.context.prefix}/resources">
+    <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/resources">
       <fileset dir="${yanel.home.dir}/src/contributions/resources"/>
     </copy>
-    <copy todir="${snapshot.dir}/${servlet.context.prefix}/resources">
+    <copy todir="${snapshot.dir}/${target.servlet.context.prefix}/resources">
       <fileset dir="${yanel.home.dir}/src/realms/welcome-admin/yanel/resources"/>
     </copy>
-    <xslt in="${yanel.home.dir}/conf/yanel.xml" out="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/yanel.properties" style="yanel2properties.xsl" force="true">
+    <xslt in="${yanel.home.dir}/conf/yanel.xml" out="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/yanel.properties" style="yanel2properties.xsl" force="true">
       <!--<param name="servlet.context.prefix" expression="${servlet.context.prefix}"/>-->
     </xslt>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
+    <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
       <replacetoken>../src/resources</replacetoken>
     </replace>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
+    <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
       <replacetoken>../src/contributions/resources</replacetoken>
     </replace>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
+    <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
       <replacetoken>../src/realms/welcome-admin/yanel/resources</replacetoken>
     </replace>
 
-    <copy file="${yanel.home.dir}/src/binary-dist/log4j.properties" todir="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/log4j.properties" value="${servlet.context.prefix}">
+    <copy file="${yanel.home.dir}/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="${target.servlet.context.prefix}">
       <replacetoken>@SERVLET_CONTEXT@</replacetoken>
     </replace>
-    <mkdir dir="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/logs"/>
+    <mkdir dir="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/logs"/>
 
+    <copy file="${yanel.home.dir}/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}-r${yanel.revision}">
+      <replacetoken>@VERSION@</replacetoken>
+    </replace>
+    <replace file="${snapshot.dir}/${target.servlet.context.prefix}/WEB-INF/classes/install.rdf" value="bin-snapshot">
+      <replacetoken>@INSTALLTYPE@</replacetoken>
+    </replace>
   </target>
   
   <target name="bin-snapshot-win">
-    <antcall target="patch-install-rdf-win"/>
     <!-- Unpatch install.rdf ... -->
 
     <copy todir="${snapshot.dir.win}/apache-tomcat-${tomcat.version}">
       <fileset dir="${snapshot.dir}/apache-tomcat-${tomcat.version}" />
     </copy>
-    <jar jarfile="${snapshot.dir.win}/apache-tomcat-${tomcat.version}/webapps/${servlet.context.prefix}.war" basedir="${snapshot.dir}/${servlet.context.prefix}"/>
+    <jar jarfile="${snapshot.dir.win}/apache-tomcat-${tomcat.version}/webapps/${target.servlet.context.prefix}.war" basedir="${snapshot.dir}/${target.servlet.context.prefix}"/>
     <!-- <move file="${snapshot.dir}/${servlet.context.prefix}.war" todir="${snapshot.dir.win}/apache-tomcat-${tomcat.version}/webapps"/> -->
 
     <copy file="${yanel.home.dir}/LICENSE.txt" todir="${snapshot.dir.win}"/>
@@ -129,9 +137,8 @@
   </target>
   
   <target name="bin-snapshot-unix">
-    <antcall target="patch-install-rdf-unix"/>
-    <jar jarfile="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/${servlet.context.prefix}.war" basedir="${snapshot.dir}/${servlet.context.prefix}"/>
-    <delete dir="${snapshot.dir}/${servlet.context.prefix}"/>
+    <jar jarfile="${snapshot.dir}/apache-tomcat-${tomcat.version}/webapps/${target.servlet.context.prefix}.war" basedir="${snapshot.dir}/${target.servlet.context.prefix}"/>
+    <delete dir="${snapshot.dir}/${target.servlet.context.prefix}"/>
     <!-- Copy UNIX and Windows specific files -->
     <copy file="${yanel.home.dir}/src/binary-dist/README-UNIX.txt" tofile="${snapshot.dir}/README.txt" overwrite="true"/>
     <copy file="${yanel.home.dir}/src/binary-dist/start.sh" todir="${snapshot.dir}"/>
@@ -145,30 +152,4 @@
     <delete file="${snapshot.dir}.tar"/>
   </target>
   
-  <target name="patch-install-rdf-win">
-    <copy file="${yanel.home.dir}/src/build/install.rdf" todir="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="${yanel.version}-r${yanel.revision}">
-      <replacetoken>@VERSION@</replacetoken>
-    </replace>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="bin-snapshot">
-      <replacetoken>@INSTALLTYPE@</replacetoken>
-    </replace>
-      <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="windows">
-      <replacetoken>@PLATFORM@</replacetoken>
-    </replace>
-  </target>
-
-  <target name="patch-install-rdf-unix">
-    <copy file="${yanel.home.dir}/src/build/install.rdf" todir="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="${yanel.version}-r${yanel.revision}">
-      <replacetoken>@VERSION@</replacetoken>
-    </replace>
-    <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="bin-snapshot">
-      <replacetoken>@INSTALLTYPE@</replacetoken>
-    </replace>
-      <replace file="${snapshot.dir}/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="unix">
-      <replacetoken>@PLATFORM@</replacetoken>
-    </replace>
-  </target>
-  
 </project>

Added: public/yanel/trunk/src/build/targets/build-update-war.xml
===================================================================
--- public/yanel/trunk/src/build/targets/build-update-war.xml	2007-03-02 13:26:40 UTC (rev 23090)
+++ public/yanel/trunk/src/build/targets/build-update-war.xml	2007-03-02 14:04:23 UTC (rev 23091)
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+
+<project name="build-uppdate-war" default="update-war" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
+  
+  <target name="update-war" description="Create a war to update" depends="init, webapp">
+    <delete dir="${build.dir}/update-war"/>
+    <property name="update.dir" value="${build.dir}/update-war/wyona-yanel-UPDATE-${yanel.version}-r${yanel.revision}"/>
+    <mkdir dir="${update.dir}"/>
+    
+   <copy todir="${update.dir}/${servlet.context.prefix}">
+      <fileset dir="${yanel.home.dir}/build/webapps/${servlet.context.prefix}"/>
+    </copy>
+    <copy todir="${update.dir}/${servlet.context.prefix}/realms">
+      <fileset dir="${yanel.home.dir}/src/realms"/>
+    </copy>
+    <replace file="${update.dir}/${servlet.context.prefix}/realms/javadoc/repository.xml" value="content">
+      <replacetoken>../../../build/javadoc</replacetoken>
+    </replace>
+    <replace file="${update.dir}/${servlet.context.prefix}/realms/test/yanel/config/data-repository.xml" value="../data">
+      <replacetoken>../../../../../local/test/data</replacetoken>
+    </replace>
+    <copy todir="${update.dir}/${servlet.context.prefix}/realms/javadoc/content">
+      <fileset dir="${yanel.home.dir}/build/javadoc"/>
+    </copy>
+    <copy file="${yanel.home.dir}/conf/realms.xml" todir="${update.dir}/${servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
+    <replace file="${update.dir}/${servlet.context.prefix}/WEB-INF/classes/realms.xml" value="../../realms">
+      <replacetoken>../src/realms</replacetoken>
+    </replace>
+    <copy todir="${update.dir}/${servlet.context.prefix}/resources">
+      <fileset dir="${yanel.home.dir}/src/resources"/>
+    </copy>
+    <copy todir="${update.dir}/${servlet.context.prefix}/resources">
+      <fileset dir="${yanel.home.dir}/src/contributions/resources"/>
+    </copy>
+    <copy todir="${update.dir}/${servlet.context.prefix}/resources">
+      <fileset dir="${yanel.home.dir}/src/realms/welcome-admin/yanel/resources"/>
+    </copy>
+    <xslt in="${yanel.home.dir}/conf/yanel.xml" out="${update.dir}/${servlet.context.prefix}/WEB-INF/classes/yanel.properties" style="yanel2properties.xsl" force="true">
+      <!--<param name="servlet.context.prefix" expression="${servlet.context.prefix}"/>-->
+    </xslt>
+    <replace file="${update.dir}/${servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
+      <replacetoken>../src/resources</replacetoken>
+    </replace>
+    <replace file="${update.dir}/${servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
+      <replacetoken>../src/contributions/resources</replacetoken>
+    </replace>
+    <replace file="${update.dir}/${servlet.context.prefix}/WEB-INF/classes/yanel.properties" value="../../resources">
+      <replacetoken>../src/realms/welcome-admin/yanel/resources</replacetoken>
+    </replace>
+    <copy file="${yanel.home.dir}/src/binary-dist/log4j.properties" todir="${update.dir}/${servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
+    <replace file="${update.dir}/${servlet.context.prefix}/WEB-INF/classes/log4j.properties" value="${servlet.context.prefix}">
+      <replacetoken>@SERVLET_CONTEXT@</replacetoken>
+    </replace> 
+    <mkdir dir="${update.dir}/${servlet.context.prefix}/WEB-INF/logs"/>
+
+    <copy file="${yanel.home.dir}/src/build/install.rdf" todir="${update.dir}/${servlet.context.prefix}/WEB-INF/classes" overwrite="true"/>
+    <replace file="${update.dir}/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="${yanel.version}-r${yanel.revision}">
+      <replacetoken>@VERSION@</replacetoken>
+    </replace>
+    <replace file="${update.dir}/${servlet.context.prefix}/WEB-INF/classes/install.rdf" value="update">
+      <replacetoken>@INSTALLTYPE@</replacetoken>
+    </replace>
+    
+    <jar jarfile="${build.dir}/update-war/wyona-yanel-UPDATE-${yanel.version}-r${yanel.revision}.war" basedir="${update.dir}/${servlet.context.prefix}"/>
+    
+    <delete dir="${update.dir}"/>
+  </target>  
+</project>




More information about the Yanel-commits mailing list