Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 280 lines (267 sloc) 14.827 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
<!--
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>
  <!-- you probably need to change these properties to suit your machine -->
  <!-- uncomment the block of properties below to do a snapshot release.
you need permissions to webdav upload to the server for this to work
http://www.jboss.org/community/docs/DOC-11381 -->
  <!--
<property name="svnbase" value="https://svn.jboss.org/repos/labs/labs/jbosstm"/>
<property name="tag" value="trunk"/>
<property name="version" value="4.17.1.Final"/>
-->
  <!-- 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="svnbase" value="https://svn.jboss.org/repos/labs/labs/jbosstm/tags"/>
  <!-- The tag as it appears under svnbase -->
  <property name="tag" value="5_0_0_M1"/>
  <!-- The file name base for the user downloadable files. Derive it from the tag -->
  <property name="version" value="5.0.0.M1"/>
  <!-- which uber jar to use -->
  <property name="orb" value="jacorb"/>
  <!-- the location the JBossTS web site content is copied to -->
  <property name="downloads.dir" value="${user.home}/narayana/filemgmt.jboss.org/downloads_htdocs/jbosstm/"/>
  <property name="docs.dir" value="${user.home}/narayana/filemgmt.jboss.org/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 must not already have a local maven cached repository to do a release build">
      <condition>
        <available file="repository" type="dir"/>
      </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 svn -->
    <exec executable="svn" dir="${workdir}">
      <arg value="checkout"/>
      <arg value="${svnbase}/${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/orson-0.5.0.jar"/>
    </exec>
    <!-- package the JTA only src tree (no JTS, XTS, txbridge, RTS) -->
    <delete file="${workdir}/narayana-jta-${version}-src.zip"/>
    <zip basedir="${workdir}" destfile="${workdir}/narayana-jta-${version}-src.zip" includes="${tag}/**" excludes="${tag}/ArjunaJTS/**, ${tag}/XTS/** ${tag}/txbridge/**, ${tag}/rest-tx/**, ${tag}/repository/**"/>
    <!-- package the full source release (all src tree) -->
    <delete file="${workdir}/narayana-full-${version}-src.zip"/>
    <zip basedir="${workdir}" destfile="${workdir}/narayana-full-${version}-src.zip" includes="${tag}/**" excludes="${tag}/repository/**"/>
    <!-- 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/orson-0.5.0.jar"/>
    </exec>
  </target>
  <!-- copy the release into the downloads dir tree (http://www.jboss.org/jbosstm web site content) -->
  <target name="downloads" description="copy release bundles to JBossTS web site content">
    <fail>
      <condition>
        <not>
          <available file="${downloads.dir}" type="dir"/>
        </not>
      </condition>
    </fail>
    <fail>
      <condition>
        <available file="${downloads.dir}/${version}" type="dir"/>
      </condition>
    </fail>
    <fail>
      <condition>
        <not>
          <available file="${docs.dir}" type="dir"/>
        </not>
      </condition>
    </fail>
    <fail>
      <condition>
        <available file="${docs.dir}/${version}" type="dir"/>
      </condition>
    </fail>
    <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="narayana-*-${version}-src.zip"/>
    </copy>
    <copy todir="tmp-downloads-dir/binary">
      <fileset dir="${workdir}/${tag}/narayana-full/target/" includes="narayana-full-${version}-bin.zip"/>
    </copy>
    <copy todir="tmp-downloads-dir/idl">
      <fileset dir="${workdir}/${tag}/ArjunaJTS/jts/idl/arjuna">
        <include name="ArjunaOTS.idl"/>
      </fileset>
    </copy>
    <copy todir="tmp-downloads-dir/idl">
      <fileset dir="${workdir}/${tag}/ArjunaJTS/jts/idl/omg">
        <include name="CosTransactions.idl"/>
        <include name="XA.idl"/>
      </fileset>
    </copy>
    <copy file="${workdir}/${tag}/ArjunaJTS/narayana-jts-${orb}/target/narayana-jts-${version}-javadoc.jar" todir="tmp-downloads-dir/api/jta"/>
    <copy file="${workdir}/${tag}/ArjunaJTA/narayana-jta/target/narayana-jta-${version}-javadoc.jar" todir="tmp-downloads-dir/api/jts"/>
    <copy file="${workdir}/${tag}/rest-tx/tx/target/rest-tx-api-${version}-javadoc.jar" todir="tmp-downloads-dir/api/rts"/>
    <copy file="${workdir}/${tag}/XTS/jbossxts/target/jbossxts-${version}-javadoc.jar" todir="tmp-downloads-dir/api/xts"/>
    <copy todir="tmp-docs-dir/guides/narayana-jts-orbportability_guide">
      <fileset dir="${workdir}/${tag}/ArjunaJTS/docs/orbportability_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/narayana-jts-quick_start_guide">
      <fileset dir="${workdir}/${tag}/ArjunaJTS/docs/quick_start_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/narayana-jts-administration_guide">
      <fileset dir="${workdir}/${tag}/ArjunaJTS/docs/administration_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/narayana-jts-development_guide">
      <fileset dir="${workdir}/${tag}/ArjunaJTS/docs/development_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/arjunacore-failure_recovery_guide">
      <fileset dir="${workdir}/${tag}/ArjunaCore/docs/failure_recovery_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/arjunacore-development_guide">
      <fileset dir="${workdir}/${tag}/ArjunaCore/docs/development_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/narayana-jta-quick_start_guide">
      <fileset dir="${workdir}/${tag}/ArjunaJTA/docs/quick_start_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/narayana-jta-installation_guide">
      <fileset dir="${workdir}/${tag}/ArjunaJTA/docs/installation_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/narayana-jta-administration_guide">
      <fileset dir="${workdir}/${tag}/ArjunaJTA/docs/administration_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/narayana-jta-development_guide">
      <fileset dir="${workdir}/${tag}/ArjunaJTA/docs/development_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/xts-administration_and_development_guide">
      <fileset dir="${workdir}/${tag}/XTS/docs/administration_and_development_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/failure_recovery_guide">
      <fileset dir="${workdir}/${tag}/docs/failure_recovery_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/release_notes">
      <fileset dir="${workdir}/${tag}/docs/release_notes/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/development_guide">
      <fileset dir="${workdir}/${tag}/docs/development_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/transactions_overview_guide">
      <fileset dir="${workdir}/${tag}/docs/transactions_overview_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <copy todir="tmp-docs-dir/guides/txbridge_guide">
      <fileset dir="${workdir}/${tag}/docs/txbridge_guide/target/docbook/publish/en-US/html"/>
    </copy>
    <unzip src="${workdir}/${tag}/ArjunaJTS/narayana-jts-${orb}/target/narayana-jts-${version}-javadoc.jar" dest="tmp-docs-dir/api/jts"/>
    <unzip src="${workdir}/${tag}/ArjunaJTA/narayana-jta/target/narayana-jta-${version}-javadoc.jar" dest="tmp-docs-dir/api/jta"/>
    <unzip src="${workdir}/${tag}/rest-tx/tx/target/rest-tx-api-${version}-javadoc.jar" dest="tmp-docs-dir/api/rts"/>
    <unzip src="${workdir}/${tag}/XTS/jbossxts/target/jbossxts-${version}-javadoc.jar" dest="tmp-docs-dir/api/xts"/>
    <move todir="${downloads.dir}/${version}" verbose="true">
      <fileset dir="tmp-downloads-dir"/>
    </move>
    <move todir="${docs.dir}/${version}" verbose="true">
      <fileset dir="tmp-docs-dir"/>
    </move>
  </target>
  <!-- copy the release artifacts to the maven repository -->
  <target name="mvn-repository" description="copy the release artifacts to the maven repository">
    <!-- xts -->
    <mvn-artifact.macro artifact="jbossxts-tests" packaging="zip" dir="${workdir}/build/${tag}/xts/tests"/>
    <mvn-artifact.macro artifact="jbossxts-interop-tests" packaging="zip" dir="${workdir}/build/${tag}/xts/interop-tests"/>
  </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="jta-src-length" file="${workdir}/jbossts-jta-${version}-src.zip"/>
    <length property="full-src-length" file="${workdir}/jbossts-full-${version}-src.zip"/>
    <length property="jta-bin-length" file="${workdir}/jbossts-jta-${version}.zip"/>
    <length property="full-bin-length" file="${workdir}/jbossts-full-${version}.zip"/>
    <copy file="magnolia-release-download-page-template.xml" tofile="${workdir}/website.jbosstm.downloads.${version}.xml" filtering="true" overwrite="true">
      <filterset>
        <filter token="tag" value="${tag}"/>
        <filter token="version" value="${version}"/>
        <filter token="date" value="${date}"/>
        <filter token="jta-src-length" value="${jta-src-length}"/>
        <filter token="full-src-length" value="${full-src-length}"/>
        <filter token="jta-bin-length" value="${jta-bin-length}"/>
        <filter token="full-bin-length" value="${full-bin-length}"/>
      </filterset>
    </copy>
  </target>
</project>
Something went wrong with that request. Please try again.