cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r628673 - /cocoon/trunk/tools/release-builder/build.xml
Date Mon, 18 Feb 2008 10:02:46 GMT
Author: reinhard
Date: Mon Feb 18 02:02:40 2008
New Revision: 628673

URL: http://svn.apache.org/viewvc?rev=628673&view=rev
Log:
release artifacts for cocoon-fop-block and cocoon-core can be created now (deployment to staging
location hasn't been tested yet though)

Modified:
    cocoon/trunk/tools/release-builder/build.xml

Modified: cocoon/trunk/tools/release-builder/build.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/release-builder/build.xml?rev=628673&r1=628672&r2=628673&view=diff
==============================================================================
--- cocoon/trunk/tools/release-builder/build.xml (original)
+++ cocoon/trunk/tools/release-builder/build.xml Mon Feb 18 02:02:40 2008
@@ -17,83 +17,146 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<project>
+<project xmlns:artifact="urn:maven-artifact-ant">
+
+  <path id="maven-ant-tasks.classpath" path="maven-ant-tasks-2.0.8.jar" />
+  <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"
classpathref="maven-ant-tasks.classpath" />
 
   <!-- TODO clean up properties (consistent naming, external properties file, etc.) -->
-  <property name="downloadUrl" value="http://repo1.maven.org/maven2/org/apache/cocoon/"
/>
+  <property name="download.url" value="http://repo1.maven.org/maven2/org/apache/cocoon/"
/>
   <property name="deploy.server" value="people.apache.org" />
   <property name="deploy.path" value="/home/reinhard/cocoon-staging" />
   <property name="deploy.user" value="reinhard" />
 
-  <property name="docs-output-dir" value="" />
-  <property name="target-dir" value="./target" />
-  <property name="release-dir" value="${target-dir}/release" />
+  <property name="target.dir" value="./target" />
+  <property name="release.dir" value="${target.dir}/release" />
 
   <target name="init">
-    <delete dir="${target-dir}" />
-    <mkdir dir="${release-dir}" />
+    <delete dir="${target.dir}" />
+    <mkdir dir="${release.dir}" />
+  </target>
+
+  <target name="core" depends="init">
+    <add-module name="cocoon-core" version="2.2.0-RC2" type="core" />
+    <add-module name="cocoon-pipeline-api" version="1.0.0-RC2" type="pipeline-api" />
+    <add-module name="cocoon-pipeline-impl" version="1.0.0-RC2" type="pipeline-impl" />
+    <add-module name="cocoon-pipeline-components" version="1.0.0-RC2" type="pipeline-components"
/>
+    <add-module name="cocoon-expression-language-api" version="1.0.0-RC2" type="expression-language-api"
/>
+    <add-module name="cocoon-expression-language-impl" version="1.0.0-RC2" type="expression-language-impl"
/>
+    <add-module name="cocoon-sitemap-api" version="1.0.0-RC2" type="sitemap-api" />
+    <add-module name="cocoon-sitemap-components" version="1.0.0-RC2" type="sitemap-components"
/>
+    <add-module name="cocoon-sitemap-impl" version="1.0.0-RC2" type="sitemap-impl" />
+    <add-module name="cocoon-store-impl" version="1.0.0-RC2" type="store-impl" />
+    <add-module name="cocoon-thread-api" version="1.0.0-RC2" type="thread-api" />
+    <add-module name="cocoon-thread-impl" version="1.0.0-RC2" type="thread-impl" />
+    <add-module name="cocoon-util" version="1.0.0-RC2" type="util" />
+    <add-module name="cocoon-xml-api" version="1.0.0-RC2" type="xml-api" />
+    <add-module name="cocoon-xml-impl" version="1.0.0-RC2" type="xml-impl" />
+    <add-module name="cocoon-xml-resolver" version="1.0.0-RC2" type="xml-resolver" />
+    <add-module name="cocoon-xml-util" version="1.0.0-RC2" type="xml-util" />
+    <dist file="${target.dir}/cocoon-2.2.0-dist" deploy-group-name="" />
   </target>
 
   <target name="fop-block" depends="init">
-    <block-dist name="cocoon-fop-impl" version="1.0.0-RC2" />
+    <create-block-dist-impl name-impl="cocoon-fop-impl" version="1.0.0-RC2" name="cocoon-fop-block"
/>
   </target>
 
-  <macrodef name="block-dist">
+  <macrodef name="create-block-dist-api-impl">
+    <attribute name="name" />
+    <attribute name="name-api" />
+    <attribute name="name-impl" />
+    <attribute name="version" />
+    <attribute name="type" />
+    <sequential>
+      <add-module name="@{name-api}" version="@{version}" type="api" />
+      <add-module name="@{name-impl}" version="@{version}" type="impl" />
+      <dist file="@{name}-@{version}-dist" deploy-group-name="@{name}" />
+    </sequential>
+  </macrodef>
+
+  <macrodef name="create-block-dist-impl">
+    <attribute name="name" />
+    <attribute name="name-impl" />
+    <attribute name="version" />
+    <sequential>
+      <add-module name="@{name-impl}" version="@{version}" type="impl" />
+      <dist file="${target.dir}/@{name}-@{version}-dist" deploy-group-name="@{deploy-group-name}"
/>
+    </sequential>
+  </macrodef>
+
+  <macrodef name="dist">
+    <attribute name="file" />
+    <attribute name="deploy-group-name" />
+    <sequential>
+      <create-package file="@{file}" />
+      <create-checksum file="@{file}" />
+      <gpg-sign file="@{file}" />
+      <!--deploy-staging file="@{file}" deploy-group-name="@{deploy-group-name}" /-->
+    </sequential>
+  </macrodef>
+
+  <macrodef name="add-module">
     <attribute name="name" />
     <attribute name="version" />
+    <attribute name="type" />
+    <attribute name="jarFileName" default="@{name}-@{version}.jar" />
+    <attribute name="sourcesFileName" default="@{name}-@{version}-sources.jar" />
+    <attribute name="javadocFileName" default="@{name}-@{version}-javadoc.jar" />
+    <attribute name="distFileName" default="@{name}-@{version}-dist" />
+
     <sequential>
-      <property name="jarFileName" value="@{name}-@{version}.jar" />
-      <property name="sourcesFileName" value="@{name}-@{version}-sources.jar" />
-      <property name="javadocFileName" value="@{name}-@{version}-javadoc.jar" />
-      <property name="distFileName" value="@{name}-@{version}-dist" />
-
-      <get dest="${target-dir}/${jarFileName}" src="${downloadUrl}/@{name}/@{version}/${jarFileName}"
/>
-      <get dest="${target-dir}/${sourcesFileName}" src="${downloadUrl}/@{name}/@{version}/${sourcesFileName}"
/>
-      <get dest="${target-dir}/${javadocFileName}" src="${downloadUrl}/@{name}/@{version}/${javadocFileName}"
/>
+      <get dest="${target.dir}/@{jarFileName}" src="${download.url}/@{name}/@{version}/@{jarFileName}"
/>
+      <get dest="${target.dir}/@{sourcesFileName}" src="${download.url}/@{name}/@{version}/@{sourcesFileName}"
/>
+      <get dest="${target.dir}/@{javadocFileName}" src="${download.url}/@{name}/@{version}/@{javadocFileName}"
/>
 
       <!-- copy the docs -->
-      <mkdir dir="${release-dir}/docs" />
+      <mkdir dir="${release.dir}/@{type}/docs" />
 
       <!-- unzip Javadocs -->
-      <mkdir dir="${release-dir}/docs/apidocs" />
-      <unzip src="${target-dir}/${javadocFileName}" dest="${release-dir}/docs/apidocs"
/>
+      <unzip src="${target.dir}/@{javadocFileName}" dest="${release.dir}/@{type}/docs/apidocs"
/>
 
       <!-- unzip Sources -->
-      <mkdir dir="${release-dir}/src" />
-      <unzip src="${target-dir}/${sourcesFileName}" dest="${release-dir}/src" />
+      <unzip src="${target.dir}/@{sourcesFileName}" dest="${release.dir}/@{type}/src"
/>
 
       <!-- copy the binaries  -->
-      <copy file="${target-dir}/${jarFileName}" tofile="${release-dir}/${jarFileName}"
/>
+      <copy file="${target.dir}/@{jarFileName}" tofile="${release.dir}/@{jarFileName}"
/>
 
       <!-- notice and license files -->
-      <unzip src="${target-dir}/${jarFileName}" dest="${release-dir}">
+      <unzip src="${target.dir}/@{jarFileName}" dest="${release.dir}">
         <patternset>
           <include name="META-INF/license.txt" />
           <include name="META-INF/notice.txt" />
         </patternset>
         <mapper type="flatten" />
       </unzip>
-
-      <!-- package, sign and release files -->
-      <package-sign-deploy file="${target-dir}/${distFileName}" />
     </sequential>
   </macrodef>
 
-  <macrodef name="package-sign-deploy">
+  <macrodef name="create-package">
     <attribute name="file" />
     <sequential>
       <!-- create packages -->
-      <zip destfile="@{file}.zip" basedir="${release-dir}" />
-      <tar tarfile="@{file}.tar" basedir="${release-dir}" />
+      <zip destfile="@{file}.zip" basedir="${release.dir}" />
+      <tar tarfile="@{file}.tar" basedir="${release.dir}" />
       <gzip zipfile="@{file}.tar.gz" src="@{file}.tar" />
       <delete file="@{file}.tar" />
+    </sequential>
+  </macrodef>
 
+  <macrodef name="create-checksum">
+    <attribute name="file" />
+    <sequential>
       <!-- checksums -->
       <checksum algorithm="SHA" file="@{file}.zip" fileext=".sha1" />
       <checksum file="@{file}.zip" fileext=".md5" />
       <checksum algorithm="SHA" file="@{file}.tar.gz" fileext=".sha1" />
       <checksum file="@{file}.tar.gz" fileext=".md5" />
+    </sequential>
+  </macrodef>
 
+  <macrodef name="gpg-sign">
+    <attribute name="file" />
+    <sequential>
       <!-- gpg -->
       <gpg-sign-file file="@{file}.zip" />
       <gpg-sign-file file="@{file}.zip.md5" />
@@ -101,21 +164,28 @@
       <gpg-sign-file file="@{file}.tar.gz" />
       <gpg-sign-file file="@{file}.tar.gz.md5" />
       <gpg-sign-file file="@{file}.tar.gz.sha1" />
+    </sequential>
+  </macrodef>
 
+  <macrodef name="deploy-staging">
+    <attribute name="file" />
+    <attribute name="deploy-group-name" />
+    <sequential>
       <!-- scp to staging repository -->
-      <local-scp file="@{file}.zip" />
-      <local-scp file="@{file}.zip.md5" />
-      <local-scp file="@{file}.zip.sha1" />
-      <local-scp file="@{file}.tar.gz" />
-      <local-scp file="@{file}.tar.gz.md5" />
-      <local-scp file="@{file}.tar.gz.sha1" />
+      <deploy-via-scp file="@{file}.zip" deploy-group-name="@{deploy-group-name}" />
+      <deploy-via-scp file="@{file}.zip.md5" deploy-group-name="@{deploy-group-name}"
/>
+      <deploy-via-scp file="@{file}.zip.sha1" deploy-group-name="@{deploy-group-name}"
/>
+      <deploy-via-scp file="@{file}.tar.gz" deploy-group-name="@{deploy-group-name}" />
+      <deploy-via-scp file="@{file}.tar.gz.md5" deploy-group-name="@{deploy-group-name}"
/>
+      <deploy-via-scp file="@{file}.tar.gz.sha1" deploy-group-name="@{deploy-group-name}"
/>
     </sequential>
   </macrodef>
 
-  <macrodef name="local-scp">
+  <macrodef name="deploy-via-scp">
     <attribute name="file" />
+    <attribute name="deploy-group-name" />
     <sequential>
-      <exec command="scp @{file} ${deploy.user}@${deploy.server}:${deploy.path}" />
+      <exec command="scp @{file} ${deploy.user}@${deploy.server}:${deploy.path}/@{deploy-group-name}"
/>
     </sequential>
   </macrodef>
 
@@ -125,5 +195,18 @@
       <exec command="gpg -sba --passphrase-file ${gpg-passphrase.file} @{file}" />
     </sequential>
   </macrodef>
+
+
+  <!--target name="test" depends="init">
+    <artifact:dependencies filesetId="dependency.fileset">
+      <dependency groupId="org.apache.cocoon" artifactId="cocoon-fop-impl" version="1.0.0-RC2">
+        <exclusion groupId="org.apache.cocoon" artifactId="cocoon-core"/>
+      </dependency>
+    </artifact:dependencies>
+    <copy todir="${release.dir}">
+      <fileset refid="dependency.fileset" />
+      <mapper type="flatten" />
+    </copy>
+  </target-->
 
 </project>



Mime
View raw message