Author: pete.muir(a)jboss.org
Date: 2008-12-20 14:00:18 -0500 (Sat, 20 Dec 2008)
New Revision: 630
Added:
ri/trunk/dist/
ri/trunk/dist/build.xml
ri/trunk/dist/pom.xml
Log:
move to dist dir
Copied: ri/trunk/dist/build.xml (from rev 629, ri/trunk/build.xml)
===================================================================
--- ri/trunk/dist/build.xml (rev 0)
+++ ri/trunk/dist/build.xml 2008-12-20 19:00:18 UTC (rev 630)
@@ -0,0 +1,140 @@
+<?xml version="1.0"?>
+<project name="DistributionBuilder" default="dist"
basedir="." xmlns:artifact="urn:maven-artifact-ant">
+
+ <property name="wbri.dir"
location="${ant.file.DistributionBuilder}/../../" />
+
+ <path id="maven-ant-tasks.classpath"
path="${wbri.dir}/lib/maven-ant-tasks.jar" />
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath"
/>
+
+ <property name="maven.dir" location="${wbri.dir}/lib/maven"
/>
+
+
+ <property name="dist.dir"
value="${wbri.dir}/dist/webbeans-${version}" />
+ <property name="dist.wb.lib.dir" value="${dist.dir}/lib/webbeans"
/>
+ <property name="dist.doc.dir" value="${dist.dir}/doc" />
+ <property name="dist.src.dir" value="${dist.dir}/src" />
+ <property name="dist.src.doc.dir"
value="${dist.src.dir}/reference" />
+
+ <property name="refdoc.dir" value="${wbri.dir}/reference-guide"
/>
+
+ <target name="dist" description="Build the distribution">
+
+ <fail unless="version" message="You must specify the version with
-Dversion=1.2.3" />
+
+ <maven target="clean" basedir="${wbri.dir}" />
+ <maven target="clean" basedir="${refdoc.dir}" />
+ <delete dir="${wbri.dir}/jboss-as/target" />
+ <delete dir="${wbri.dir}/webbeans-ri/test-output" />
+ <delete dir="${wbri.dir}/webbeans-ri/ObjectStore" />
+ <delete dir="${dist.dir}" failonerror="false"/>
+ <mkdir dir="${dist.dir}"/>
+
+ <mkdir dir="${dist.src.dir}" />
+
+ <copy todir="${dist.src.dir}">
+ <fileset dir="${wbri.dir}">
+ <include name="webbeans-ri/**" />
+ <include name="webbeans-ri-spi/**" />
+ <include name="webbeans-api/**" />
+ <include name="pom.xml" />
+ <exclude name="**/.settings/**" />
+ <exclude name="**/.classpath" />
+ <exclude name="**/.project" />
+ </fileset>
+ </copy>
+
+ <copy todir="${dist.src.doc.dir}">
+ <fileset dir="${refdoc.dir}">
+ <exclude name="**/.settings/**" />
+ <exclude name="**/.classpath" />
+ <exclude name="**/.project" />
+ <exclude name="**/*.pdf" />
+ </fileset>
+ </copy>
+
+ <copy todir="${dist.dir}">
+ <fileset dir="${wbri.dir}">
+ <include name="examples/**"/>
+ <include name="jboss-as/**"/>
+ <include name="lib/**"/>
+ <include name="readme.txt"/>
+ </fileset>
+ </copy>
+
+ <maven target="package" basedir="${refdoc.dir}" />
+ <mkdir dir="${dist.doc.dir}" />
+ <copy todir="${dist.doc.dir}">
+ <fileset dir="${refdoc.dir}/target/docbook/publish" />
+ </copy>
+ <maven target="clean" basedir="${refdoc.dir}" />
+
+ <maven target="install" basedir="${wbri.dir}" />
+ <artifact:dependencies filesetId="webbeans.fileset"
versionsId="webbeans.versions">
+ <dependency groupId="org.jboss.webbeans"
artifactId="webbeans-ri" version="${version}"/>
+ <dependency groupId="org.jboss.webbeans"
artifactId="webbeans-ri-spi" version="${version}"/>
+ <dependency groupId="org.jboss.webbeans"
artifactId="webbeans-api" version="${version}"/>
+ <remoteRepository id="repository.jboss.org"
url="http://repository.jboss.org/maven2" />
+ </artifact:dependencies>
+
+ <delete dir="target" failonerror="false"/>
+ <mkdir dir="target" />
+ <copy todir="target">
+ <fileset refid="webbeans.fileset"/>
+ <chainedmapper>
+ <mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${webbeans.versions}" to="flatten" />
+ <flattenmapper />
+ </chainedmapper>
+ </copy>
+
+ <mkdir dir="${dist.wb.lib.dir}" />
+
+ <copy todir="${dist.wb.lib.dir}">
+ <fileset dir="target">
+ <include name="webbeans-*.jar" />
+ <include name="google*.jar" />
+ </fileset>
+ </copy>
+ <delete dir="target" failonerror="false"/>
+
+ <zip destfile="webbeans-${version}.zip">
+ <fileset dir="${wbri.dir}/dist">
+ <include name="webbeans-${version}/**" />
+ </fileset>
+ </zip>
+ </target>
+
+ <target name="deploy-dist" depends="dist">
+ <maven target="deploy:deploy-file" basedir="${wbri.dir}">
+ <arg line="-DpomFile=${basedir}/pom.xml" />
+ <arg line="-Dpackaging=zip" />
+ <arg line="-Dversion=${version}" />
+ <arg line="-Dfile=${basedir}/webbeans-${version}.zip" />
+ <arg
line="-Durl=dav:https://snapshots.jboss.org/maven2" />
+ <arg line="-DrepositoryId=snapshots.jboss.org" />
+ <arg line="-DuniqueVersion=false" />
+ </maven>
+ </target>
+
+ <macrodef name="maven">
+ <attribute name="target" />
+ <attribute name="basedir" />
+ <element name="args" implicit="true"
optional="true" />
+ <sequential>
+ <java classname="org.codehaus.classworlds.Launcher"
fork="true" dir="@{basedir}">
+ <classpath>
+ <fileset dir="${maven.dir}/boot">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="${maven.dir}/bin">
+ <include name="*.*" />
+ </fileset>
+ </classpath>
+ <sysproperty key="classworlds.conf"
value="${maven.dir}/bin/m2.conf" />
+ <sysproperty key="maven.home" value="${maven.dir}"
/>
+ <args />
+ <arg line="@{target}" />
+ </java>
+ </sequential>
+ </macrodef>
+
+</project>
\ No newline at end of file
Added: ri/trunk/dist/pom.xml
===================================================================
--- ri/trunk/dist/pom.xml (rev 0)
+++ ri/trunk/dist/pom.xml 2008-12-20 19:00:18 UTC (rev 630)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>parent</artifactId>
+ <groupId>org.jboss.webbeans</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-ri-distribution</artifactId>
+ <packaging>zip</packaging>
+ <name>Web Beans Distribution</name>
+
+</project>