123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <?xml version="1.0"?>
-
- <project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:artifact="antlib:org.apache.maven.artifact.ant" xmlns:ivy="antlib:org.apache.ivy.ant" name="Build script for IDE users" basedir=".." default="theme-and-default-widgetset">
- <property name="work.dir" location="work" />
- <property file="build.properties" />
-
- <!-- Setting this to 0 disables the parallel compilation -->
- <property name="threadsPerProcessor" value="1" />
-
- <target name="resolve" unless="resolve.done">
- <ivy:resolve log="download-only" file="build/ivy.xml" conf="ide" />
- <ivy:cachepath pathid="early.deps" conf="early" />
- <ivy:resolve log="download-only" file="build/ivy.xml" conf="ide" />
- <ivy:cachepath pathid="ide.deps" conf="ide" />
- <ivy:resolve log="download-only" file="uitest/ivy.xml" conf="ide" />
- <ivy:cachepath pathid="uitest.deps" conf="ide" />
-
- <path id="classpath">
- <path refid="early.deps" />
- <path location="bin" />
- <path location="build/classes" />
- <path location="server/src/main/java" />
- <path location="server/src/main/resources" />
- <path location="shared/src/main/java" />
- <path location="shared/src/main/java-templates" />
- <path location="uitest/src" />
- <path location="client/src/main/java" />
- <path location="client/src/main/resources" />
- <path refid="uitest.deps" />
- <path refid="ide.deps" />
- </path>
- <property name="resolve.done" value="true" />
- </target>
-
- <target name="theme-and-default-widgetset" depends="resolve">
- <!-- threadCount is ignored unless threadsPerProcessor is 0 -->
- <parallel threadsPerProcessor="${threadsPerProcessor}" threadCount="1">
- <antcall target="default-widgetset" inheritRefs="true" />
- <antcall target="themes" inheritRefs="true" />
- <antcall target="vaadinPush.js" inheritRefs="true" />
- </parallel>
- </target>
-
- <target name="themes" depends="resolve">
- <!-- threadCount is ignored unless threadsPerProcessor is 0 -->
- <parallel threadsPerProcessor="${threadsPerProcessor}" threadCount="1">
- <antcall target="compile-theme" inheritRefs="true">
- <param name="theme" value="base" />
- </antcall>
- <antcall target="compile-theme" inheritRefs="true">
- <param name="theme" value="runo" />
- </antcall>
- <antcall target="compile-theme" inheritRefs="true">
- <param name="theme" value="reindeer" />
- </antcall>
- <antcall target="compile-theme" inheritRefs="true">
- <param name="theme" value="chameleon" />
- </antcall>
- <antcall target="compile-theme" inheritRefs="true">
- <param name="theme" value="liferay" />
- </antcall>
- <antcall target="compile-theme" inheritRefs="true">
- <param name="theme" value="valo" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo-dark" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo-metro" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo-flat" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo-flatdark" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo-facebook" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo-blueprint" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo-light" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo-disabled-animations" />
- </antcall>
- <antcall target="compile-test-theme" inheritRefs="true">
- <param name="theme" value="tests-valo-no-font-awesome" />
- </antcall>
- </parallel>
- </target>
-
- <target name="compile-theme" depends="resolve">
- <java classname="com.vaadin.buildhelpers.CompileTheme" failonerror="yes" fork="yes">
- <classpath refid="classpath" />
- <jvmarg value="-Djava.awt.headless=true" />
- <arg value="--theme" />
- <arg value="${theme}" />
- <!-- this assumes "mvn package" has been run for vaadin-themes -->
- <arg value="--theme-folder" />
- <arg value="themes/target/classes/VAADIN/themes" />
- <arg value="--version" />
- <arg value="${vaadin.version}" />
- </java>
-
- </target>
-
- <target name="compile-test-theme" depends="resolve">
- <java classname="com.vaadin.buildhelpers.CompileTheme" failonerror="yes" fork="yes">
- <classpath refid="classpath" />
- <jvmarg value="-Djava.awt.headless=true" />
- <arg value="--theme" />
- <arg value="${theme}" />
- <arg value="--theme-folder" />
- <arg value="WebContent/VAADIN/themes" />
- <arg value="--version" />
- <arg value="${vaadin.version}" />
- </java>
-
- </target>
-
-
- <target name="default-widgetset">
- <antcall target="compile-widgetset" inheritRefs="true">
- <param name="widgetset" value="com.vaadin.DefaultWidgetSet" />
- </antcall>
- </target>
-
- <target name="testing-widgetset">
- <antcall target="compile-widgetset" inheritRefs="true">
- <param name="widgetset" value="com.vaadin.tests.widgetset.TestingWidgetSet" />
- </antcall>
- </target>
-
- <target name="compile-widgetset" depends="resolve">
- <property name="module" value="${widgetset}" />
- <property name="module.output.dir" location="WebContent/VAADIN/widgetsets" />
- <property name="logLevel" value="TRACE" />
- <property name="style" value="PRETTY" />
- <property name="localWorkers" value="2" />
- <!-- Whether assertions should be compiled into the widgetset.
- Either "-ea" to enable or "" to disable. -->
- <property name="assertions" value="-ea" />
- <property name="extraParams" value="" />
-
- <property name="gwt.usearchives" value="true" />
- <property name="gwt.persistentunitcache" value="false" />
-
- <mkdir dir="${module.output.dir}" />
-
- <echo>Compiling ${module} to ${module.output.dir} with parameters -logLevel ${logLevel} -style ${style} -localWorkers ${localWorkers} ${assertions} -strict ${extraParams}</echo>
-
- <!--<ivy:resolve log="download-only" inline="true" organisation="javax.validation" module="validation-api"
- revision="1.0.0.GA"/> -->
-
- <!-- compile the module -->
- <java classname="com.google.gwt.dev.Compiler" classpathref="classpath" failonerror="yes" fork="yes" maxmemory="512m">
- <arg value="-workDir" />
- <arg value="${work.dir}" />
- <arg value="-logLevel" />
- <arg value="${logLevel}" />
- <arg value="-war" />
- <arg value="${module.output.dir}" />
- <arg value="-style" />
- <arg value="${style}" />
- <arg value="-localWorkers" />
- <arg value="${localWorkers}" />
- <arg line="${assertions}" />
- <arg value="-strict" />
- <arg line="${extraParams}" />
- <arg value="${module}" />
-
- <sysproperty key="vFailIfNotSerializable" value="true" />
-
- <jvmarg value="-Xss8M" />
- <jvmarg value="-Xmx1G" />
- <jvmarg value="-XX:MaxPermSize=256M" />
- <jvmarg value="-Djava.awt.headless=true" />
- <jvmarg value="-Dgwt.usearchives=${gwt.usearchives}" />
- <jvmarg value="-Dgwt.persistentunitcache=${gwt.persistentunitcache}" />
- </java>
- </target>
- <target name="vaadinPush.js" depends="resolve">
- <property name="project.root" location="."/>
- <ivy:resolve log="download-only" file="${project.root}/ivy-taskdefs.xml" conf="taskdefs" />
- <ivy:cachepath pathid="taskdefs.classpath" conf="taskdefs" />
- <!-- ant contrib for Maven integration -->
- <taskdef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="taskdefs.classpath" />
-
- <!-- Must fork to avoid ExitException -->
- <artifact:mvn pom="${project.root}/push/pom.xml" fork="true" mavenVersion="3.0.4">
- <arg value="package"/>
- </artifact:mvn>
-
- <property name="js.output.dir" location="WebContent" />
- <property name="push.js.dir" location="${basedir}/push/target/classes/" />
- <copy todir="${js.output.dir}">
- <fileset dir="${push.js.dir}" includes="VAADIN/vaadinPush*" excludes="**/*.gz">
- </fileset>
- </copy>
- </target>
-
- <target name="clean-unitcache">
- <delete dir="WebContent/VAADIN/gwt-unitCache" />
- </target>
- </project>
|