]> source.dussan.org Git - vaadin-framework.git/commitdiff
Build a zip file containing all jars + dependencies (#9299)
authorArtur Signell <artur@vaadin.com>
Thu, 6 Sep 2012 08:21:25 +0000 (11:21 +0300)
committerArtur Signell <artur@vaadin.com>
Sun, 9 Sep 2012 08:23:38 +0000 (11:23 +0300)
all/build.xml [new file with mode: 0644]
all/ivy.xml [new file with mode: 0644]
common.xml
publish.xml

diff --git a/all/build.xml b/all/build.xml
new file mode 100644 (file)
index 0000000..4e0b229
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<project name="vaadin-all" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib">
+       <description>
+               Compiles a zip containing all jars + dependencies
+       </description>
+       <include file="../common.xml" as="common" />
+       <include file="../build.xml" as="vaadin" />
+
+       <!-- global properties -->
+       <property name="module.name" value="vaadin" />
+       <property name="result.dir" value="result" />
+       <property name="temp.dir" location="${result.dir}/temp" />
+       <property name="zip.file" location="${result.dir}/lib/vaadin-${vaadin.version}.zip" />
+
+       <target name="fetch.module.and.dependencies">
+               <fail unless="module" message="No 'module' parameter given" />
+
+               <ivy:cachepath pathid="module.and.deps" inline="true" organisation="com.vaadin" module="vaadin-${module}" revision="${vaadin.version}" />
+               <copy todir="${temp.dir}" flatten="true">
+                       <path refid="module.and.deps" />
+               </copy>
+       </target>
+
+       <target name="zip">
+               <delete dir="${temp.dir}" />
+               <antcontrib:foreach list="${modules.to.publish}" target="fetch.module.and.dependencies" param="module" />
+               <!-- All jars are now in temp.dir. Still need to separate vaadin and deps -->
+               <move todir="${temp.dir}/deps">
+                       <fileset dir="${temp.dir}">
+                               <exclude name="vaadin-*-${vaadin.version}.*" />
+                               <exclude name="vaadin-*-${vaadin.version}-*.*" />
+                       </fileset>
+               </move>
+               <zip destfile="${zip.file}">
+                       <fileset dir="${temp.dir}">
+                       </fileset>
+                       <fileset refid="common.files.for.all.jars" />
+               </zip>
+       </target>
+
+       <target name="publish-local" depends="zip">
+               <antcall target="common.publish-local" />
+       </target>
+
+       <target name="clean">
+               <antcall target="common.clean" />
+       </target>
+
+       <target name="tests">
+               <!-- No tests for this zip.. -->
+       </target>
+
+</project>
\ No newline at end of file
diff --git a/all/ivy.xml b/all/ivy.xml
new file mode 100644 (file)
index 0000000..93ca988
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ivy-module version="2.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
+    xmlns:m="http://ant.apache.org/ivy/maven">
+
+    <info organisation="com.vaadin" module="vaadin" revision="${vaadin.version}" />
+
+    <configurations>
+        <conf name="build" />
+    </configurations>
+    <publications>
+        <artifact type="zip" ext="zip" />
+    </publications>
+    <dependencies defaultconf="build">
+        <!-- API DEPENDENCIES -->
+
+        <!-- LIBRARY DEPENDENCIES (compile time) -->
+        <!-- Project modules -->
+        <dependency org="com.vaadin" name="vaadin-shared"
+            rev="${vaadin.version}"/>
+        <dependency org="com.vaadin" name="vaadin-server"
+            rev="${vaadin.version}"/>
+        <dependency org="com.vaadin" name="vaadin-client"
+            rev="${vaadin.version}"/>
+        <dependency org="com.vaadin" name="vaadin-client-compiler"
+            rev="${vaadin.version}"/>
+        <dependency org="com.vaadin" name="vaadin-theme-compiler"
+            rev="${vaadin.version}"/>
+        <dependency org="com.vaadin" name="vaadin-themes-compiled"
+            rev="${vaadin.version}"/>
+        <dependency org="com.vaadin" name="vaadin-client-compiled"
+            rev="${vaadin.version}"/>
+
+    </dependencies>
+
+</ivy-module>
index 9a16f7f5fd0a425083cdd5456405b41f107df6c4..1bfe2736af7a7e439c5f4de33aad56953f545bd1 100644 (file)
@@ -4,6 +4,8 @@
        <dirname property="vaadin.basedir" file="${ant.file.common}" />
        <property file="${vaadin.basedir}/build.properties" />
 
+       <property name="modules.to.publish" value="shared,server,client,client-compiler,client-compiled,theme-compiler,themes-compiled" />
+
        <ivy:resolve file="${vaadin.basedir}/build/ivy/ivy.xml" conf="taskdefs" />
        <ivy:cachepath pathid="taskdefs.classpath" conf="taskdefs" />
        <taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml" classpathref="taskdefs.classpath" />
                <property name="tests.classes" location="${result.dir}/tests/classes" />
 
 
-               <junit printsummary="withOutAndErr">
+               <junit printsummary="withOutAndErr" fork="yes">
                        <formatter usefile="false" type="plain" />
                        <jvmarg value="-ea" />
                        <classpath location="${tests.classes}" />
index 6e672f62a4a6c72341858204b6f60cc77ba2fdb9..0e536d49531c00de33e397962d645bd990e3e1c2 100644 (file)
@@ -5,11 +5,10 @@
 
        <!-- Dummy value as ivysettings-publish require a value  -->
        <property name="publish.sftp.keyfile" value="/dummy" />
-       <property name="publish.sftp.ivy.pattern" value="dummy"/>
-       
+       <property name="publish.sftp.ivy.pattern" value="dummy" />
+
        <ivy:settings file="ivysettings.xml" />
        <ivy:settings file="ivysettings-publish.xml" id="publish.settings" />
-       <property name="modules.to.publish" value="shared,server,client,client-compiler,client-compiled,theme-compiler,themes-compiled" />
        <property file="publish.properties" />
 
        <available property="ant-jsch.present" file="${ant.home}/lib/ant-jsch.jar" />