]> source.dussan.org Git - vaadin-framework.git/commitdiff
Client-compiled-cache artifact (#9299)
authorArtur Signell <artur@vaadin.com>
Mon, 3 Sep 2012 21:33:58 +0000 (00:33 +0300)
committerArtur Signell <artur@vaadin.com>
Sun, 9 Sep 2012 08:23:10 +0000 (11:23 +0300)
client-compiled/build.xml
client-compiled/ivy.xml
gwt-files.xml
uitest/build.xml
uitest/ivy.xml

index 8cead01a798e0f6e05b343b6238fbaf649fbca74..6533ce27446ec25438f92e3f325a3733b8260c27 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<project name="vaadin-client-compiler" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
+<project name="vaadin-client-compiled" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
        <description>
                Compiled (JS+HTML) version of client side 
        </description>
        <!-- global properties -->
        <property name="module.name" value="vaadin-client-compiled" />
        <property name="result.dir" value="result" />
+       <property name="gwtar.dir" location="${result.dir}/gwtar" />
+       <property name="work.dir" location="${result.dir}/work" />
+       <property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
+       <property name="compiled.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
+       <property name="compiled-cache.jar" location="${result.dir}/lib/${module.name}-cache-${vaadin.version}.jar" />
+
+       <target name="default-widgetset-cache">
+               <antcall target="compile-module-cache">
+                       <param name="module" value="com.vaadin.DefaultWidgetSet" />
+               </antcall>
+       </target>
 
        <target name="default-widgetset">
                <antcall target="compile-module">
        </target>
 
 
+       <target name="compile-module-cache">
+               <fail unless="module" message="You must give the module to compile in the 'module' parameter" />
+               <ivy:resolve resolveid="common" conf="compile-module" />
+               <ivy:cachepath pathid="classpath.compile.widgetset" conf="compile-module" />
+               <echo>Creating gwtar files for ${module} in ${gwtar.dir}</echo>
+
+               <!-- Produce gwtar files for the separate JAR -->
+               <java classname="com.google.gwt.dev.CompileModule" classpathref="classpath.compile.widgetset" failonerror="yes" fork="yes" maxmemory="512m">
+                       <arg value="-out" />
+                       <arg value="${gwtar.dir}" />
+                       <arg value="-strict" />
+                       <arg value="${module}" />
+
+                       <jvmarg value="-Xss8M" />
+                       <jvmarg value="-XX:MaxPermSize=256M" />
+                       <jvmarg value="-Djava.awt.headless=true" />
+               </java>
+       </target>
+
        <target name="compile-module">
                <fail unless="module" message="You must give the module to compile in the 'module' parameter" />
-               <property name="result.dir" location="result" />
                <property name="style" value="OBF" />
                <property name="localWorkers" value="2" />
                <property name="extraParams" value="" />
-               <property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
 
                <ivy:resolve resolveid="common" conf="compile-module" />
                <ivy:cachepath pathid="classpath.compile.widgetset" conf="compile-module" />
 
-               <echo>Compiling ${module} to ${module.output.dir}</echo>
                <mkdir dir="${module.output.dir}" />
 
-               <!-- Disabled to reduce JAR size: precompile the widgetset to a .gwtar file -->
-               <!--
-               <java classname="com.google.gwt.dev.CompileModule" classpathref="compile.classpath.widgetset" failonerror="yes" fork="yes" maxmemory="512m">
-                   <arg value="-out" />
-                   <arg value="${result-precompiled-widgetsets}" />
-                   <arg value="-strict" />
-                   <arg value="${widgetset}" />
-
-                   <jvmarg value="-Xss8M"/>
-                   <jvmarg value="-XX:MaxPermSize=256M"/>  
-                   <jvmarg value="-Djava.awt.headless=true"/>
-               </java>
-               -->
-
-               <!-- compile the widgetset -->
+               <echo>Compiling ${module} to ${module.output.dir}</echo>
+
+               <!-- compile the module -->
                <java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.widgetset" failonerror="yes" fork="yes" maxmemory="512m">
+                       <classpath location="${compiled-cache.jar}" />
+                       <arg value="-workDir" />
+                       <arg value="${work.dir}" />
+                       <arg value="-logLevel" />
+                       <arg value="TRACE" />
                        <arg value="-war" />
                        <arg value="${module.output.dir}" />
                        <arg value="-style" />
                        <arg value="${style}" />
+
                        <arg value="-localWorkers" />
                        <arg value="${localWorkers}" />
                        <arg value="-strict" />
                        <jvmarg value="-Djava.awt.headless=true" />
                </java>
 
-               <!--<antcall target="remove-gwt-tmp" />-->
+       </target>
 
-               <echo>Compiled ${module}</echo>
+       <target name="client-compiled-cache.jar" depends="default-widgetset-cache">
+               <jar file="${compiled-cache.jar}" compress="true">
+                       <fileset dir="${gwtar.dir}">
+                               <include name="**/*.gwtar" />
+                               <include name="pom.xml" />
+                       </fileset>
+                       <union refid="client-compiled-cache.gwt.includes" />
+                       <fileset refid="common.files.for.all.jars" />
+               </jar>
        </target>
 
-       <target name="jar" depends="default-widgetset">
+       <target name="client-compiled.jar" depends="default-widgetset">
                <antcall target="common.pom.xml">
                </antcall>
-               <property name="result.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
 
-               <jar file="${result.jar}" compress="true">
+               <jar file="${compiled.jar}" compress="true">
                        <fileset dir="${result.dir}">
-                               <include name="VAADIN/widgetsets/**" />
+                               <include name="VAADIN/widgetsets/com.vaadin*/**" />
                                <include name="pom.xml" />
-                               <exclude name="VAADIN/widgetsets/WEB-INF"/>
                        </fileset>
                        <fileset refid="common.files.for.all.jars" />
                </jar>
+
+
        </target>
 
-       <target name="publish-local" depends="jar">
+       <target name="publish-local" depends="client-compiled.jar, client-compiled-cache.jar">
                <antcall target="common.publish-local">
                        <param name="conf" value="build" />
                </antcall>
-       </ivy:publish>
--->
        </target>
 
-<target name="clean">
-       <antcall target="common.clean" />
-</target>
+       <target name="clean">
+               <antcall target="common.clean" />
+       </target>
 
-<target name="tests">
-       <!--<antcall target="common.tests.run" />-->
-       <echo>WHAT? No tests for ${module.name}!</echo>
-</target>
+       <target name="tests">
+               <!--<antcall target="common.tests.run" />-->
+               <echo>WHAT? No tests for ${module.name}!</echo>
+       </target>
 
 </project>
\ No newline at end of file
index 7c0fcf01623eaa517590f7322ba0baddae522563..496177682af2cd91ec21c4419797bb03a02ac993 100644 (file)
@@ -11,7 +11,8 @@
         <conf name="compile-module" visibility="private" />
     </configurations>
     <publications>
-        <artifact type="jar"></artifact>
+        <artifact type="jar" name="vaadin-client-compiled"/>
+        <artifact type="jar" name="vaadin-client-compiled-cache"/>
     </publications>
     <dependencies>
         <dependency org="com.vaadin" name="vaadin-server"
index dff4c1baf9b205d2792234acef23a14dc9921089..7ec493bff2b0703bd3e6fb3214cc802c74564d7a 100755 (executable)
@@ -68,7 +68,7 @@
                </fileset>
        </union>
 
-       <union id="client-compiled.gwt.includes">
+       <union id="client-compiled-cache.gwt.includes">
                <!-- Precompiled GWT modules (.gwtar file) -->
                <fileset dir="${gwt.user.jar.files}">
                        <exclude name="META-INF/**" />
index 8a5fe71b354fc68cb7354748ffa5e75fd6c47915..9090df7dccf1859fb81fcd2e4bfb04d582d644f2 100644 (file)
@@ -66,6 +66,7 @@
                </copy>
 
                <war destfile="${result.war}" duplicate="fail" index="true">
+                       <manifest><attribute name="Class-Path" value="WEB-INF/classes"/></manifest>
                        <fileset refid="common.files.for.all.jars" />
                        <fileset dir="${WebContent.dir}">
                                <include name="statictestfiles/**" />
index 583e09c76bb105612f6baceca7ed8411c9c1baeb..b243dfd8ec6f938a320afb1a25d7f2c6616ad34f 100644 (file)
     <dependencies defaultconf="build" defaultconfmapping="build,ide->default">
         <!-- API DEPENDENCIES -->
         <dependency org="javax.portlet" name="portlet-api"
-            rev="2.0" conf="ide -> default" />
+            rev="2.0" conf="build,ide -> default" />
 
         <dependency org="javax.validation" name="validation-api"
-            rev="1.0.0.GA" conf="ide -> default" />
+            rev="1.0.0.GA" conf="build,ide -> default" />
         <!--Servlet API version 2.5 -->
         <dependency org="javax.servlet" name="servlet-api"
-            rev="2.5" conf="ide -> default" />
+            rev="2.5" conf="build,ide -> default" />
         <!-- Google App Engine -->
         <dependency org="com.google.appengine" name="appengine-api-1.0-sdk"
-            rev="1.2.1" conf="ide -> default" />
+            rev="1.2.1" conf="build,ide -> default" />
 
         <!-- LIBRARY DEPENDENCIES (compile time) -->
         <!-- Project modules -->
         <dependency org="com.vaadin" name="vaadin-server"
             rev="${vaadin.version}" conf="build->build"></dependency>
+        <dependency org="com.vaadin" name="vaadin-client"
+            rev="${vaadin.version}" conf="build->build"></dependency>
         <dependency org="com.vaadin" name="vaadin-client-compiled"
             rev="${vaadin.version}" conf="build->build"></dependency>
         <dependency org="com.vaadin" name="vaadin-themes-compiled"