qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritch...@apache.org
Subject svn commit: r692461 - in /incubator/qpid/trunk/qpid/java: broker/build.xml build.deps build.xml client/build.xml common.xml module.xml
Date Fri, 05 Sep 2008 15:31:09 GMT
Author: ritchiem
Date: Fri Sep  5 08:31:08 2008
New Revision: 692461

URL: http://svn.apache.org/viewvc?rev=692461&view=rev
Log:
QPID-1257 : Add new build target 'release-bin' that will generate a broker and client package.
Documenation will be added to the wiki such that performance tests could also be packaged.

Modified:
    incubator/qpid/trunk/qpid/java/broker/build.xml
    incubator/qpid/trunk/qpid/java/build.deps
    incubator/qpid/trunk/qpid/java/build.xml
    incubator/qpid/trunk/qpid/java/client/build.xml
    incubator/qpid/trunk/qpid/java/common.xml
    incubator/qpid/trunk/qpid/java/module.xml

Modified: incubator/qpid/trunk/qpid/java/broker/build.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/build.xml?rev=692461&r1=692460&r2=692461&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/build.xml (original)
+++ incubator/qpid/trunk/qpid/java/broker/build.xml Fri Sep  5 08:31:08 2008
@@ -20,18 +20,38 @@
  -->
 <project name="AMQ Broker" default="build">
 
-  <property name="module.depends" value="common"/>
-  <property name="module.main" value="org.apache.qpid.server.Main"/>
+    <property name="module.depends" value="common"/>
+    <property name="module.main" value="org.apache.qpid.server.Main"/>
 
-  <import file="../module.xml"/>
+    <import file="../module.xml"/>
 
-  <property name="output.dir" value="${module.precompiled}/org/apache/qpid/server/filter/jms/selector"/>
+    <property name="output.dir" value="${module.precompiled}/org/apache/qpid/server/filter/jms/selector"/>
 
-  <target name="precompile">
-    <mkdir dir="${output.dir}"/>
-    <javacc target="src/main/grammar/SelectorParser.jj"
-            outputdirectory="${output.dir}"
-            javacchome="${project.root}/lib"/>
-  </target>
+
+    <target name="precompile">
+        <mkdir dir="${output.dir}"/>
+        <javacc target="src/main/grammar/SelectorParser.jj"
+                outputdirectory="${output.dir}"
+                javacchome="${project.root}/lib"/>
+    </target>
+
+    <target name="copy-etc-release" if="module.etc.exists" description="copy etc directory
if it exists to build tree">
+      <copy todir="${module.release}/etc" failonerror="false" flatten="true">
+          <fileset dir="${module.etc}" excludes="mstool-log4j.xml,*.conf,*.jpp"/>
+      </copy>
+    </target>
+
+    <target name="copy-bin-release" description="copy dependencies into module release">
+        <copy todir="${module.release}/bin" failonerror="true">
+            <fileset dir="${module.bin}" includes="qpid*"/>
+        </copy>
+        <copy todir="${module.release}/bin" failonerror="true" flatten="true">
+            <fileset dir="${basedir}/../common/bin" includes="qpid-run"/>
+        </copy>
+        <chmod dir="${module.release}/bin" perm="ugo+rx" includes="**/*"/>
+
+    </target>
+
+    <target name="release-bin" depends="release-bin-tasks"/>
 
 </project>

Modified: incubator/qpid/trunk/qpid/java/build.deps
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/build.deps?rev=692461&r1=692460&r2=692461&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/build.deps (original)
+++ incubator/qpid/trunk/qpid/java/build.deps Fri Sep  5 08:31:08 2008
@@ -32,7 +32,7 @@
 client.libs=${common.libs}  ${geronimo-jms} ${junit}
 tools.libs=${client.libs}
 broker.libs=${common.libs} ${commons-cli} ${commons-logging} ${log4j} \
-    ${slf4j-log4j} ${xalan} ${felix.libs}
+    ${slf4j-log4j} ${xalan} ${felix.libs} ${build.lib}/${project.name}-common-${project.version}.jar
 
 broker-plugins.libs=${common.libs} ${felix.libs}
 

Modified: incubator/qpid/trunk/qpid/java/build.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/build.xml?rev=692461&r1=692460&r2=692461&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/build.xml (original)
+++ incubator/qpid/trunk/qpid/java/build.xml Fri Sep  5 08:31:08 2008
@@ -96,6 +96,11 @@
     <iterate target="doc"/>
   </target>
 
+  <target name="release-bin" description="build a binary release artifact" depends="build">
+      <iterate  target="release-bin"/>
+  </target>
+
+
   <target name="check-manifest">
     <uptodate property="manifest.done" targetfile="${qpid.jar}">
       <srcfiles dir="${build.lib}" includes="**/*.jar" excludes="**/${qpid.jar.name}"/>
@@ -176,6 +181,7 @@
 
   <target name="release-all" depends="zip,gzip,bzip2" description="build all release archives"/>
 
+
   <target name="clean" description="remove build and release artifacts">
     <iterate target="clean"/>
     <delete dir="${build}"/>

Modified: incubator/qpid/trunk/qpid/java/client/build.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/build.xml?rev=692461&r1=692460&r2=692461&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/build.xml (original)
+++ incubator/qpid/trunk/qpid/java/client/build.xml Fri Sep  5 08:31:08 2008
@@ -33,4 +33,16 @@
             javacchome="${project.root}/lib"/>
   </target>
 
+
+  <uptodate property="doc-release.done" targetfile="${module.release}/api/index.html">
+    <srcfiles dir="${module.src}" includes="**/*.java"/>
+  </uptodate>
+
+  <target name="doc-release" depends="build" unless="doc-release.done">
+      <javadoc destdir="${module.release}/api" sourcepathref="module.src.path"
+               classpathref="module.class.path" packagenames="org.apache.qpid.jms"/>
+  </target>
+
+  <target name="release-bin" depends="release-bin-tasks"/>    
+
 </project>

Modified: incubator/qpid/trunk/qpid/java/common.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common.xml?rev=692461&r1=692460&r2=692461&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/common.xml (original)
+++ incubator/qpid/trunk/qpid/java/common.xml Fri Sep  5 08:31:08 2008
@@ -26,6 +26,7 @@
   <property name="project.version"       value="incubating-M3"/>
   <property name="project.namever"       value="${project.name}-${project.version}"/>
 
+  <property name="resources"             location="${project.root}/resources"/>
   <property name="build"                 location="${project.root}/build"/>
   <property name="build.bin"             location="${build}/bin"/>
   <property name="build.etc"             location="${build}/etc"/>
@@ -38,6 +39,7 @@
   <property name="build.data"            location="${build}/data"/>
   <property name="build.plugins"         location="${build}/lib/plugins"/>
 
+
   <property name="java.target"           value="1.5"/>
   <property name="java.source"           value="1.5"/>
 

Modified: incubator/qpid/trunk/qpid/java/module.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/module.xml?rev=692461&r1=692460&r2=692461&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/module.xml (original)
+++ incubator/qpid/trunk/qpid/java/module.xml Fri Sep  5 08:31:08 2008
@@ -42,6 +42,19 @@
   <property name="module.bin"          location="bin"/>
   <property name="module.etc"          location="etc"/>
 
+    
+  <property name="module.namever"              value="${project.name}-${module}-${project.version}"/>
+  <property name="module.release.base"	       value="${basedir}/release"/>
+  <property name="module.release"              value="${module.release.base}/${module.namever}"/>
+  <property name="module.release.lib"	       value="${module.release}/lib"/>
+  <property name="module.release.zip"          location="${module.release.base}/${module.namever}.zip"/>
+  <property name="module.release.tar"          location="${module.release.base}/${module.namever}.tar"/>
+  <property name="module.release.tgz"          location="${module.release.base}/${module.namever}.tar.gz"/>
+  <property name="module.release.bz2"          location="${module.release}/${module.namever}.tar.bz2"/>
+
+  <property name="module.qpid.jar"     location="${module.release.lib}/qpid-incubating.jar"/>
+  <basename property="qpid.jar.name"  file="${module.qpid.jar}"/>
+
   <available property="module.test.src.exists" file="${module.test.src}"/>
   <available property="module.etc.exists" file="${module.etc}"/>
   <available property="module.bin.exists" file="${module.bin}"/>
@@ -267,12 +280,25 @@
     <chmod dir="${build.bin}" perm="ugo+rx" includes="**/*"/>
   </target>
 
+  <target name="copy-bin-release" if="module.bin.exists" description="copy dependencies
into module release">
+    <copy todir="${module.release}/bin" failonerror="true">
+      <fileset dir="${module.bin}" />
+    </copy>
+    <chmod dir="${module.release}/bin" perm="ugo+rx" includes="**/*"/>
+  </target>
+
   <target name="copy-etc" if="module.etc.exists" description="copy etc directory if it
exists to build tree">
     <copy todir="${build.etc}" failonerror="false">
       <fileset dir="${module.etc}"/>
     </copy>
   </target>
 
+  <target name="copy-etc-release" if="module.etc.exists" description="copy etc directory
if it exists to build tree">
+    <copy todir="${module.release}/etc" failonerror="false" flatten="true">
+        <fileset dir="${module.etc}"/>
+    </copy>
+  </target>
+
   <target name="build" depends="jar,jar-tests,libs,copy-bin,copy-etc" description="compile
and copy resources into build tree"/>
   <target name="jar.manifest" depends="compile" if="module.manifest">
     <jar destfile="${module.jar}" basedir="${module.classes}" manifest="${module.manifest}"/>
@@ -296,6 +322,35 @@
     </copy>
   </target>
 
+  <map property="module.depends.jars" value="${module.depends}" join=",">
+    <globmapper from="*" to="${project.name}-*-${project.version}.jar"/>
+  </map>
+
+ 
+  <target name="libs-release" description="copy dependencies into module release">
+    <!-- Copy the module dependencies -->
+    <copy todir="${module.release}" failonerror="true">
+      <fileset dir="${basedir}${file.separator}.." includes="${module.libs}"/>
+    </copy>
+    <!-- Copy the jar for this module -->
+    <copy todir="${module.release}/lib" failonerror="true">
+        <fileset file="${module.jar}"/>
+        <fileset dir="${build.lib}" includes="${module.depends.jars}"/>
+    </copy>
+  </target>
+
+  <target name="resources" description="copy resources into build tree">
+    <copy todir="${build}" failonerror="false" flatten="true">
+      <fileset dir="${basedir}${file.separator}.." includes="${resources}"/>
+    </copy>
+  </target>
+
+  <target name="resources-release" description="copy resources into module release">
+    <copy todir="${module.release}" failonerror="false" flatten="true">
+      <fileset dir="${resources}" excludes="META-INF"/>
+    </copy>
+  </target>
+
   <uptodate property="doc.done" targetfile="${module.api}/index.html">
     <srcfiles dir="${module.src}" includes="**/*.java"/>
   </uptodate>
@@ -304,10 +359,94 @@
     <javadoc destdir="${module.api}" sourcepathref="module.src.path"
              classpathref="module.class.path" packagenames="*"/>
   </target>
+  
+  <target name="release-bin-prepare">
+    <mkdir dir="${module.release}"/>
+    <available property="module.release.exists" file="${module.release}"/>
+  </target>
+
+  <target name="check-module-manifest">
+    <uptodate property="module-manifest.done" targetfile="${qpid.jar}">
+      <srcfiles dir="${build.lib}" includes="**/*.jar" excludes="**/${qpid.jar.name}"/>
+    </uptodate>
+  </target>
+
+  <target name="module-manifest" depends="check-module-manifest" unless="module-manifest.done">
+    <path id="class.path">
+      <fileset dir="${module.release.lib}" >
+        <include name="*.jar"/>
+        <exclude name="${qpid.jar.name}"/>
+      </fileset>
+    </path>
+    <pathconvert property="qpid.jar.classpath" pathsep=" " dirsep="/">
+      <path refid="class.path"/>
+      <globmapper from="${module.release.lib}${file.separator}*" to="*"/>
+    </pathconvert>
+
+    <jar destfile="${module.qpid.jar}">
+      <manifest>
+        <attribute name="Class-Path" value="${qpid.jar.classpath}"/>
+      </manifest>
+      <metainf dir="${project.root}/resources/"/>
+    </jar>
+
+    <touch file="${module.qpid.jar}"/>
+  </target>
+
+
+  <target name="zip-release"  depends="build-release-bin" description="build module release
archive">
+    <zip destfile="${module.release.zip}">
+      <zipfileset dir="${module.release}" prefix="${module.namever}" filemode="755">
+        <include name="bin/*"/>
+	<exclude name="bin/*.txt"/>
+      </zipfileset>
+
+      <zipfileset dir="${module.release}" prefix="${module.namever}" filemode="644">
+        <include name="bin/*.txt"/>
+      </zipfileset>
+
+      <zipfileset dir="${module.release}" prefix="${module.namever}" excludes="${module.release.excludes}"
filemode="644" dirmode="755">
+        <exclude name="bin/**"/>
+	    <exclude name="**/*.class"/>          
+      </zipfileset>
+    </zip>
+  </target>
+
+    <target name="tar-release" depends="zip-release" description="build release archive">
+      <tar destfile="${module.release.tar}" longfile="gnu" >
+        <zipfileset src="${module.release.zip}"/>
+      </tar>
+    </target>
+
+    <target name="gzip-release" depends="tar-release" description="build release archive">
+      <gzip src="${module.release.tar}" destfile="${module.release.tgz}"/>
+    </target>
+
+    <target name="bzip2-release" depends="tar-release" description="build release archive">
+      <bzip2 src="${module.release.tar}" destfile="${module.release.bz2}"/>
+    </target>
+
+    <target name="doc-release" description="no-op override if a doc step is requried "/>
+
+
+    <target name="build-release-bin" depends="release-bin-prepare,libs-release,copy-bin-release,
+                                              copy-etc-release,doc-release,resources-release,release-bin-other,module-manifest"
+            description="Task that includes all tasks required to create a module binary
release"/>
+
+    <!-- ,zip-release,gzip-release -->
+  <target name="release-bin-tasks" depends="gzip-release" description="build all release
archives except .bz2"/>
+
+  <target name="release-bin-all-tasks" depends="bzip2-release" description="build all
release archives"/>
+
+  <!-- Dummy targets to no-op for most modules. Override if a module package is required
-->
+  <target name="release-bin-other" description="Override if there is tasks required for
the module bin release to occur last"/>
+  <target name="release-bin" description="Override and depend on release-bin-tasks to
generate"/>
+  <target name="release-bin-all" description="Override and depend on release-bin-tasks
to generate"/>
 
   <target name="clean" description="remove build artifacts">
     <delete dir="${module.build}"/>
     <delete dir="${module.results}"/>
+    <delete dir="${module.release.base}"/>
   </target>
 
 </project>



Mime
View raw message