Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

332 lines (315 sloc) 15.869 kB
<!--
JBoss, Home of Professional Open Source
Copyright 2009, Red Hat Middleware LLC, and individual contributors
as indicated by the @author tags.
See the copyright.txt in the distribution for a
full listing of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
of the GNU Lesser General Public License, v. 2.1.
This program is distributed in the hope that it will be useful, but WITHOUT A
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License,
v.2.1 along with this distribution; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
(C) 2007-2009,
@author JBoss Inc. (jonathan.halliday@redhat.com)
-->
<!--
build-release-pkgs.xml: Utility script for building JBossTS release artifacts.
Probably only useful for JBossTS dev team. Everyone else should only need the
regular build.xml.
This script automates the some steps of the release build and packaging process
to reduce the opportunities for users to get it wrong. For example, it works from
a fresh svn checkout to ensure locally modified files in a dev's svn working copy
don't sneak into the release bundle.
usage:
Tag the JBossTS release in svn.
or you can do a snapshot release direct from trunk, see properties below.
Check the version of JBossAS referenced in pom.xml is sane.
In general, use the oldest JBossAS release the JBossTS release is intended to support.
Update the properties section below to suit your machine.
Set JAVA_HOME to a jdk 1.6, since that's the version we currently support.
ant -f build-release-pkgs.xml dist downloads
rsync or sftp the downloads to publish to the web site (careful with the trailing '/') e.g.
rsync \-\-protocol=29 -avz 4.11.0.Final jbosstm@filemgmt.jboss.org:downloads_htdocs/jbosstm/
Log in to magnolia cms at https://www.jboss.org/author, create page under jbosstm/downloads
(note: 'magnolia' target below may help) then edit downloads node itself to update table in downloads.html
Update appropriate wiki pages, such as the 'which version to use' page.
http://community.jboss.org/wiki/JBossTransactionsVersionGuide
Then login to https://repository.jboss.org/nexus/ and publish the artifacts.
This version is for JBossTS 5.0.0 onwards. Don't use it for earlier releases, they are structured differently.
-->
<project name="JBossTS Release Packaging" default="fail" basedir=".">
<description>
package JBossTS binary + src files for upload to website and other repos.
</description>
<property name="rsync" value="true" />
<!-- a working directory for the process. Can contain output from previous releases if you like to keep them archived locally. -->
<property name="workdir" location="/tmp/narayana_releases"/>
<!-- where to get the source -->
<property name="gitbase" value="https://github.com/jbosstm"/>
<!-- The tag as it appears under svnbase -->
<property name="pageName" value="4.17.12.Final"/>
<property name="tag" value="4.17.12.Final"/>
<!-- which uber jar to use -->
<property name="orb" value="jacorb"/>
<!-- the location the JBossTS web site content is copied to -->
<property name="sshfs.dir" value="${user.home}/narayana/filemgmt.jboss.org" />
<property name="downloads.dir" value="downloads_htdocs/jbosstm/"/>
<property name="docs.dir" value="docs_htdocs/jbosstm/"/>
<!-- you probably don't need to change anything below here -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="./antbuildsystem/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<target name="fail">
<fail message="you must specify a target"/>
</target>
<target name="all" depends="dist,downloads"/>
<target name="dist-init" unless="dist-init">
<tstamp/>
<fail message="You must set a workdir">
<condition>
<not>
<isset property="workdir"/>
</not>
</condition>
</fail>
<fail message="You cannot perform a build without cleaning the old version out">
<condition>
<available file="${workdir}/${tag}" type="dir"/>
</condition>
</fail>
<mkdir dir="${workdir}"/>
<!-- pull the source code from git -->
<exec executable="git" dir="${workdir}">
<arg value="clone"/>
<arg value="${gitbase}/narayana.git"/>
<arg value="${tag}"/>
</exec>
<exec executable="git" dir="${workdir}/${tag}">
<arg value="checkout"/>
<arg value="${tag}"/>
</exec>
</target>
<target name="dist" depends="dist-init" description="build the end-user release bundles (src and binary)">
<!-- build the binary releases -->
<exec dir="${workdir}/${tag}" executable="tools/maven/bin/mvn" failonerror="true">
<arg line="clean -gs tools/maven/conf/settings.xml -Demma.jar.location=${user.dir}/ext/emma.jar -Dorson.jar.location=${user.dir}/ext/"/>
</exec>
<!-- package the full source release (all src tree) -->
<delete file="${workdir}/jbossts-full-${tag}-src.zip"/>
<zip basedir="${workdir}" destfile="${workdir}/jbossts-full-${tag}-src.zip" includes="${tag}/**"/>
<!-- build the binary releases -->
<exec dir="${workdir}/${tag}" executable="tools/maven/bin/mvn" failonerror="true">
<arg line="deploy -DskipTests -gs tools/maven/conf/settings.xml -Demma.jar.location=${user.dir}/ext/emma.jar -Dorson.jar.location=${user.dir}/ext/"/>
</exec>
</target>
<!-- copy the release into the downloads dir tree (http://www.jboss.org/jbosstm web site content) -->
<target name="docs">
<if>
<not><equals arg1="${rsync}" arg2="true" /></not>
<then>
<fail>
<condition>
<not>
<available file="${sshfs.dir}/${downloads.dir}" type="dir"/>
</not>
</condition>
</fail>
<fail>
<condition>
<not>
<available file="${sshfs.dir}/${docs.dir}" type="dir"/>
</not>
</condition>
</fail>
</then>
</if>
<exec executable="git" dir="${workdir}">
<arg value="clone"/>
<arg value="${gitbase}/documentation.git"/>
<arg value="${tag}-docs"/>
</exec>
<exec executable="git" dir="${workdir}/${tag}-docs">
<arg value="checkout"/>
<arg value="${tag}"/>
</exec>
<exec dir="${workdir}/${tag}-docs" executable="mvn" failonerror="true">
<arg line="install"/>
</exec>
<delete dir="tmp-docs-dir-docs"/>
<mkdir dir="tmp-docs-dir-docs"/>
<copy todir="tmp-docs-dir-docs/guides/narayana-jts-orbportability_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaJTS/docs/orbportability_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/narayana-jts-quick_start_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaJTS/docs/quick_start_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/narayana-jts-administration_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaJTS/docs/administration_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/narayana-jts-development_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaJTS/docs/development_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/arjunacore-failure_recovery_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaCore/docs/failure_recovery_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/arjunacore-development_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaCore/docs/development_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/narayana-jta-quick_start_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaJTA/docs/quick_start_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/narayana-jta-installation_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaJTA/docs/installation_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/narayana-jta-administration_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaJTA/docs/administration_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/narayana-jta-development_guide">
<fileset dir="${workdir}/${tag}-docs/ArjunaJTA/docs/development_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/xts-administration_and_development_guide">
<fileset dir="${workdir}/${tag}-docs/docs/xts_administration_and_development_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/failure_recovery_guide">
<fileset dir="${workdir}/${tag}-docs/docs/failure_recovery_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/development_guide">
<fileset dir="${workdir}/${tag}-docs/docs/development_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/transactions_overview_guide">
<fileset dir="${workdir}/${tag}-docs/docs/transactions_overview_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<copy todir="tmp-docs-dir-docs/guides/txbridge_guide">
<fileset dir="${workdir}/${tag}-docs/docs/txbridge_guide/target/docbook/publish/en-US/html_single"/>
</copy>
<antcall target="remote-copy">
<param name="from" value="tmp-docs-dir-docs"/>
<param name="to" value="${docs.dir}/${tag}"/>
</antcall>
</target>
<target name="downloads" description="copy release bundles to JBossTS web site content">
<if>
<not><equals arg1="${rsync}" arg2="true" /></not>
<then>
<fail>
<condition>
<not>
<available file="${sshfs.dir}/${downloads.dir}" type="dir"/>
</not>
</condition>
</fail>
<fail>
<condition>
<not>
<available file="${sshfs.dir}/${docs.dir}" type="dir"/>
</not>
</condition>
</fail>
<fail>
<condition>
<available file="${sshfs.dir}/${docs.dir}/${tag}" type="dir"/>
</condition>
</fail>
<fail>
<condition>
<available file="${sshfs.dir}/${downloads.dir}/${tag}" type="dir"/>
</condition>
</fail>
</then>
</if>
<delete dir="tmp-downloads-dir"/>
<mkdir dir="tmp-downloads-dir"/>
<mkdir dir="tmp-downloads-dir/src"/>
<mkdir dir="tmp-downloads-dir/binary"/>
<mkdir dir="tmp-downloads-dir/idl"/>
<delete dir="tmp-docs-dir"/>
<mkdir dir="tmp-docs-dir"/>
<copy todir="tmp-downloads-dir/src">
<fileset dir="${workdir}" includes="jbossts-*-${tag}-src.zip"/>
</copy>
<copy todir="tmp-downloads-dir/binary">
<fileset dir="${workdir}/${tag}/narayana-full/target/" includes="jbossts-full-${tag}.zip"/>
</copy>
<copy todir="tmp-downloads-dir/idl">
<fileset dir="${workdir}/${tag}/ArjunaJTS/idl/src/main/idl/arjuna">
<include name="ArjunaOTS.idl"/>
</fileset>
</copy>
<copy todir="tmp-downloads-dir/idl">
<fileset dir="${workdir}/${tag}/ArjunaJTS/idl/src/main/idl/omg">
<include name="CosTransactions.idl"/>
<include name="XA.idl"/>
</fileset>
</copy>
<copy file="${workdir}/${tag}/ArjunaJTS/narayana-jts-${orb}/target/jbossjts-jacorb-${tag}-javadoc.jar" todir="tmp-downloads-dir/api/jts"/>
<copy file="${workdir}/${tag}/ArjunaJTA/narayana-jta/target/narayana-jta-${tag}-javadoc.jar" todir="tmp-downloads-dir/api/jta"/>
<copy file="${workdir}/${tag}/rest-tx/tx/target/restat-api-${tag}-javadoc.jar" todir="tmp-downloads-dir/api/rts"/>
<copy file="${workdir}/${tag}/XTS/jbossxts/target/jbossxts-${tag}-javadoc.jar" todir="tmp-downloads-dir/api/xts"/>
<unzip src="${workdir}/${tag}/ArjunaJTS/narayana-jts-${orb}/target/jbossjts-jacorb-${tag}-javadoc.jar" dest="tmp-docs-dir/api/jts"/>
<unzip src="${workdir}/${tag}/ArjunaJTA/narayana-jta/target/narayana-jta-${tag}-javadoc.jar" dest="tmp-docs-dir/api/jta"/>
<unzip src="${workdir}/${tag}/rest-tx/tx/target/restat-api-${tag}-javadoc.jar" dest="tmp-docs-dir/api/rts"/>
<unzip src="${workdir}/${tag}/XTS/jbossxts/target/jbossxts-${tag}-javadoc.jar" dest="tmp-docs-dir/api/xts"/>
<antcall target="remote-copy">
<param name="from" value="tmp-downloads-dir"/>
<param name="to" value="${downloads.dir}/${tag}"/>
</antcall>
<antcall target="remote-copy">
<param name="from" value="tmp-docs-dir"/>
<param name="to" value="${docs.dir}/${tag}"/>
</antcall>
</target>
<target name="remote-copy">
<if>
<equals arg1="${rsync}" arg2="true" />
<then>
<property name="rsync.cmd" value="echo rsync --partial --progress --rsh=ssh -r ${from}/* jbosstm@filemgmt.jboss.org:${to}" />
<echo>${rsync.cmd}</echo>
<exec executable="bash" dir="." failonerror="true">
<arg value="-c"/>
<arg value="${rsync.cmd}" />
</exec>
</then>
<else>
<move todir="${sshfs.dir}/${to}" verbose="true">
<fileset dir="${from}"/>
</move>
</else>
</if>
</target>
<!-- magnolia (the cms that sits behind jboss.org/jbosstm pages) is a pain. This target generates
xml for /downloads/somerelease.xml pages to ease some of the pain in publishing an upload
right click jbosstm/downloads node, import from xml, then right click new node and activate.
download ordering in the rollover menu is determined by ordering the GUI - move new page as needed.
edit the 'downloads' node itself to link the new release from downloads.html, it's not automatic. -->
<target name="magnolia">
<exec executable="date" outputproperty="date">
<arg line="+'%FT%H:%M:%S.000Z'"/>
</exec>
<length property="full-src-length" file="${workdir}/jbossts-full-${tag}-src.zip"/>
<length property="full-bin-length" file="${workdir}/${tag}/narayana-full/target/jbossts-full-${tag}.zip"/>
<copy file="magnolia-release-download-page-template.xml" tofile="${workdir}/website.jbosstm.downloads.${pageName}.xml" filtering="true" overwrite="true">
<filterset>
<filter token="pageName" value="${pageName}"/>
<filter token="tag" value="${tag}"/>
<filter token="version" value="${tag}"/>
<filter token="date" value="${date}"/>
<filter token="full-src-length" value="${full-src-length}"/>
<filter token="full-bin-length" value="${full-bin-length}"/>
</filterset>
</copy>
<copy file="magnolia-release-documentation-page-template.xml" tofile="${workdir}/website.jbosstm.documentation.${pageName}.xml" filtering="true" overwrite="true">
<filterset>
<filter token="pageName" value="${pageName}"/>
<filter token="tag" value="${tag}"/>
<filter token="date" value="${date}"/>
</filterset>
</copy>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.