[jboss-svn-commits] JBL Code SVN: r27383 - labs/jbosstm/workspace/adinn/byteman/trunk.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Jul 1 08:01:51 EDT 2009
Author: adinn
Date: 2009-07-01 08:01:51 -0400 (Wed, 01 Jul 2009)
New Revision: 27383
Added:
labs/jbosstm/workspace/adinn/byteman/trunk/build-release-pkgs.xml
Log:
added build script for creating and releasing downloads and maven artifacts from tag releases
Added: labs/jbosstm/workspace/adinn/byteman/trunk/build-release-pkgs.xml
===================================================================
--- labs/jbosstm/workspace/adinn/byteman/trunk/build-release-pkgs.xml (rev 0)
+++ labs/jbosstm/workspace/adinn/byteman/trunk/build-release-pkgs.xml 2009-07-01 12:01:51 UTC (rev 27383)
@@ -0,0 +1,170 @@
+<!--
+ 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) 2009,
+ @author JBoss Inc. (jonathan.halliday at redhat.com. adinn at redhat.com)
+-->
+<!--
+
+ build-release-pkgs.xml: Utility script for building Byteman
+ release artifacts. Probably only useful for JBoss Byteman
+ developers. 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 Byteman release in svn.
+ or you can do a snapshot release direct from trunk, see
+ properties below.
+
+ Check out the necessary bits of repository.jboss.org
+ artifacts for use by other projects e.g. JBossAS get published
+ here. You don't need to check out Byteman, the script does
+ that.
+
+ 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 mvn-repository cms-repository
+
+ check in the repository.jboss.org and the cms updates to publish
+ the files.
+
+ Update the project.xml in the cms to link the release bundles
+ from the web pages.
+
+ Update appropriate wiki pages, such as the 'which version to use' page.
+
+-->
+
+<project name="Byteman Release Packaging" default="dist" basedir=".">
+ <description>
+ package Byteman 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/workspace/adinn/byteman/tags"/>
+ <property name="tag" value="trunk"/>
+ <property name="filename" value="1.0.2.SNAPSHOT"/>
+ <property name="mvn.repositoryId" value="snapshots.jboss.org"/>
+ <property name="mvn.url" value="dav:https://snapshots.jboss.org/maven2"/>
+-->
+
+ <!-- a working direrctory for the process. Can contain output from
+ previous releases if you like to keep them archived locally. -->
+ <property name="workdir" location="/tmp/packaged_builds"/>
+ <!-- where to get the source -->
+ <property name="svnbase"
+ value="https://svn.jboss.org/repos/labs/labs/jbosstm/workspace/adinn/byteman/tags"/>
+ <!-- The tag as it appears under svnbase -->
+ <property name="tag" value="Byteman_1_0_2"/>
+ <!-- The file name base for the user downloadable files. Derive it
+ from the tag -->
+ <property name="filename" value="1.0.2"/>
+ <!-- the location the Byteman web site content svn is checked out to -->
+ <property name="cmsdir" value="/home/adinn/jboss/workspace/adinn/byteman/"/>
+ <!-- the location the maven repository svn is checked out to.
+ Hint: checkout only the subtree you need, the full thing is huge -->
+ <property name="mvn.repodir" value="/home/adinn/jboss/repository.jboss.org/maven2"/>
+
+ <!-- you probably don't need to change anything below here -->
+
+ <property name="mvn.repositoryId" value="repository.jboss.org"/>
+ <property name="mvn.url" value="file:///${mvn.repodir}"/>
+
+ <target name="init">
+ <tstamp/>
+ <mkdir dir="${workdir}"/>
+ </target>
+
+ <target name="dist" depends="init" description="build the end-user release bundles (src and binary)">
+
+ <!-- pull the source code from svn -->
+ <exec executable="svn" dir="${workdir}">
+ <arg value="export"/>
+ <arg value="${svnbase}/${tag}"/>
+ </exec>
+
+ <!-- package the byteman source release (all src tree) -->
+ <delete file="${workdir}/byteman-${filename}-src.zip"/>
+ <zip basedir="${workdir}" destfile="${workdir}/byteman-${filename}-src.zip"
+ includes="${tag}/**"/>
+
+ <!-- build the binary release -->
+ <delete dir="${workdir}/build"/>
+ <mkdir dir="${workdir}/build"/>
+ <unzip src="${workdir}/byteman-${filename}-src.zip" dest="${workdir}/build"/>
+ <ant dir="${workdir}/build/${tag}" antfile="build.xml" target="install">
+ <property name="tag" value="${tag}"/>
+ </ant>
+
+ <!-- package the binary release -->
+ <delete file="${workdir}/build/${tag}/build/byteman-${filename}.zip"/>
+ <copy toFile="${workdir}/byteman-${filename}.zip" file="${workdir}/build/${tag}/build/byteman.zip"/>
+ </target>
+
+ <!-- copy the release into the cms svn tree (http://www.jboss.org/jbosstm web site content) -->
+ <target name="cms-repository" description="copy release bundles to JBossTS web site content">
+ <mkdir dir="${cmsdir}/downloads/${filename}"/>
+ <copy todir="${cmsdir}/downloads/${filename}">
+ <fileset dir="${workdir}" includes="byteman-${filename}-src.zip"/>
+ </copy>
+ <copy todir="${cmsdir}/downloads/${filename}">
+ <fileset dir="${workdir}" includes="byteman-${filename}.zip"/>
+ </copy>
+ <!-- TODO: notes dir, xml generation? project.xml edits -->
+ </target>
+
+ <!-- http://wiki.jboss.org/wiki/MavenReleaseRepository -->
+ <target name="mvn-repository" description="copy the release artifacts to the maven repository">
+ <delete dir="${workdir}/build"/>
+ <mkdir dir="${workdir}/build"/>
+
+ <!-- now package the Byteman release -->
+
+ <delete dir="${workdir}/build/${tag}"/>
+ <unzip src="${workdir}/byteman-${filename}.zip" dest="${workdir}/build"/>
+
+ <exec executable="mvn" dir="${workdir}">
+ <arg value="deploy:deploy-file"/>
+ <arg value="-Dfile=${workdir}/build/lib/byteman.jar"/>
+ <arg value="-Dpackaging=jar"/>
+ <arg value="-Durl=${mvn.url}"/>
+ <arg value="-DrepositoryId=${mvn.repositoryId}"/>
+ <arg value="-DgroupId=jboss.byteman"/>
+ <arg value="-DartifactId=byteman"/>
+ <arg value="-Dversion=${filename}"/>
+ <arg value="-DgeneratePom=true"/>
+ </exec>
+ </target>
+
+</project>
More information about the jboss-svn-commits
mailing list