ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1195451 - in /ant/antlibs/common/trunk: build.xml fetch.xml
Date Mon, 31 Oct 2011 13:29:47 GMT
Author: bodewig
Date: Mon Oct 31 13:29:47 2011
New Revision: 1195451

URL: http://svn.apache.org/viewvc?rev=1195451&view=rev
Log:
add a target for binary distributions that bundle dependencies

Added:
    ant/antlibs/common/trunk/fetch.xml   (with props)
Modified:
    ant/antlibs/common/trunk/build.xml

Modified: ant/antlibs/common/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/common/trunk/build.xml?rev=1195451&r1=1195450&r2=1195451&view=diff
==============================================================================
--- ant/antlibs/common/trunk/build.xml (original)
+++ ant/antlibs/common/trunk/build.xml Mon Oct 31 13:29:47 2011
@@ -34,6 +34,7 @@
     <property name="build.classes" value="${build}/classes"/>
     <property name="build.testclasses" value="${build}/test-classes"/>
     <property name="build.lib" value="${build}/lib"/>
+    <property name="build.deps" value="${build}/deps"/>
     <property name="build.javarepository"
               value="${build}/java-repository"/>
     <property name="build.javadoc" value="${build}/javadoc"/>
@@ -515,4 +516,61 @@
   </target>
 
   <target name="upload" depends="check-sigs,perform-nexus-upload"/>
+
+  <!-- "fat" binary distributions with dependencies -->
+  <import file="${common.basedir}/fetch.xml"/>
+
+  <target name="fat-distribution"
+          description="creates a complete binary distribution with dependencies"
+          depends="distribution,fetch-dependencies">
+
+    <unzip src="${dist.base.binaries}/${dist.name}-bin.zip"
+           dest="."/>
+
+    <copy todir="${dist.name}">
+      <fileset dir="${build.deps}"/>
+    </copy>
+
+    <zip destfile="${dist.base.binaries}/${dist.name}-bin-withdeps.zip">
+      <zipfileset dir="${dist.name}/.." filemode="755">
+        <include name="${dist.name}/bin/*.pl"/>
+        <include name="${dist.name}/bin/*.py"/>
+      </zipfileset>
+      <fileset dir="${dist.name}/..">
+        <include name="${dist.name}/**"/>
+        <exclude name="${dist.name}/bin/*.pl"/>
+        <exclude name="${dist.name}/bin/*.py"/>
+      </fileset>
+    </zip>
+    <tar longfile="gnu"
+      destfile="${dist.base.binaries}/${dist.name}-bin-withdeps.tar">
+      <tarfileset dir="${dist.name}/.." mode="755" username="ant" group="ant">
+        <include name="${dist.name}/bin/*.pl"/>
+        <include name="${dist.name}/bin/*.py"/>
+      </tarfileset>
+      <tarfileset dir="${dist.name}/.." username="ant" group="ant">
+        <include name="${dist.name}/**"/>
+        <exclude name="${dist.name}/bin/*.pl"/>
+        <exclude name="${dist.name}/bin/*.py"/>
+      </tarfileset>
+    </tar>
+    <gzip destfile="${dist.base.binaries}/${dist.name}-bin-withdeps.tar.gz"
+      src="${dist.base.binaries}/${dist.name}-bin-withdeps.tar"/>
+    <bzip2 destfile="${dist.base.binaries}/${dist.name}-bin-withdeps.tar.bz2"
+      src="${dist.base.binaries}/${dist.name}-bin-withdeps.tar"/>
+    <delete file="${dist.base.binaries}/${dist.name}-bin-withdeps.tar"/>
+
+    <checksums>
+      <fileset dir="${dist.base.binaries}/">
+        <include name="**/*-withdeps*"/>
+        <exclude name="**/*.asc"/>
+        <exclude name="**/*.md5"/>
+        <exclude name="**/*.sha1"/>
+        <exclude name="**/*.sha512"/>
+      </fileset>
+    </checksums>
+
+    <delete dir="${dist.name}"/>
+  </target>
+
 </project>

Added: ant/antlibs/common/trunk/fetch.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/common/trunk/fetch.xml?rev=1195451&view=auto
==============================================================================
--- ant/antlibs/common/trunk/fetch.xml (added)
+++ ant/antlibs/common/trunk/fetch.xml Mon Oct 31 13:29:47 2011
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project name="fetch" xmlns:ivy="antlib:org.apache.ivy.ant">
+
+  <target name="fetch-dependencies" depends="ivy.xml">
+    <ivy:configure file="${common.basedir}/ivysettings-nexus.xml"/>
+    <ivy:resolve file="${target.ivy.xml}"/>
+    <ivy:retrieve type="jar"
+                  pattern="${build.deps}/[artifact]-[revision].[ext]"/>
+  </target>
+
+</project>
\ No newline at end of file

Propchange: ant/antlibs/common/trunk/fetch.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message