diff options
author | Artur Signell <artur@vaadin.com> | 2012-09-10 13:47:04 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-09-10 16:31:31 +0300 |
commit | fae0a3486d92185c03658ba974ab04d0bf8f05e7 (patch) | |
tree | b9b7dd01e5ed3881889eeb8058524fbc738b6722 /build/build.xml | |
parent | e30db6484b882e3115da871f582f2cdb1320e763 (diff) | |
download | vaadin-framework-fae0a3486d92185c03658ba974ab04d0bf8f05e7.tar.gz vaadin-framework-fae0a3486d92185c03658ba974ab04d0bf8f05e7.zip |
Removed files which are no longer needed (#9299)
Diffstat (limited to 'build/build.xml')
-rw-r--r-- | build/build.xml | 1419 |
1 files changed, 0 insertions, 1419 deletions
diff --git a/build/build.xml b/build/build.xml deleted file mode 100644 index 40b010f443..0000000000 --- a/build/build.xml +++ /dev/null @@ -1,1419 +0,0 @@ -<?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="Vaadin" - basedir="../" default="package-all"> - - <property name="project.root" value="."/> - <!-- Import common targets --> - <import file="./common.xml" /> - - <!--Call one of package-* targets unless you understand what you are doing. --> - <target name="package-all" depends="clean-all, init, build, javadoc, internal-package-war, internal-package-liferay, differences" description="Build public packages."> - </target> - - <target name="package-jar" depends="clean-result, init, vaadin.jar" description="Create vaadin-x.y.z.jar file."> - </target> - - <target name="package-war" depends="clean-result, init, build, javadoc, internal-package-war, differences"> - </target> - - <target name="package-liferay-zip" depends="clean-result, init, build, internal-package-liferay"> - </target> - - <target name="init-deps" depends="common.init-deps" > - <property name="ivy.resolved" value="1" /> - - <ivy:resolve file="build/ivy/ivy.xml" resolveid="common" conf="server.extdep, shared.extdep, client.extdep, client-compiler.extdep, server.tests.extdep,client-compiler.extdep"/> - <ivy:cachepath pathid="ivy.compile.classpath.server" conf="server.extdep"/> - <ivy:cachepath pathid="ivy.compile.classpath.shared" conf="shared.extdep"/> - <ivy:cachepath pathid="ivy.compile.classpath.client" conf="client.extdep"/> - <ivy:cachepath pathid="ivy.compile.classpath.client-compiler" conf="client-compiler.extdep"/> - <ivy:cachepath pathid="ivy.compile.classpath.server-tests" conf="server.tests.extdep"/> - - <ivy:cachepath pathid="buildhelpers.dependencies" resolveId="buildhelpers" conf="compile" file="build/ivy/buildhelpers-ivy.xml"/> - - <!-- Extra JARs for custom builds - taken into account before JARs from Ivy. --> - <!-- Note that this should not be used for permanent build dependencies. --> - <path id="additional.jar.path"> - <fileset dir="build" includes="lib/**/*.jar" ></fileset> - </path> - - <!-- Default location for GWT check-out: trunk and tools in a directory next to Vaadin project --> - <property name="gwt.root" value="${basedir}/../trunk"/> - - <property name="gwt.build.dir" value="${gwt.root}/build"/> - <property name="gwt.tools" value="${gwt.root}/../tools"/> - <property name="gwt.tools.lib" value="${gwt.tools}/lib"/> - <property name="gwt.lib.dir" value="${gwt.build.dir}/lib"/> - - <property name="gwt.user.jar" value="${gwt.lib.dir}/gwt-user.jar"/> - <property name="gwt.dev.jar" value="${gwt.lib.dir}/gwt-dev.jar"/> - <property name="gwt.codeserver.jar" value="${gwt.lib.dir}/gwt-codeserver.jar"/> - <property name="gwt.elemental.jar" value="${gwt.lib.dir}/gwt-elemental.jar"/> - - <property name="gwt.user.dir" value="${gwt.root}/user"/> - <property name="gwt.user.bin" value="${gwt.build.dir}/out/user/bin"/> - - <!-- GWT --> - <path id="gwt.dev.user.jars"> - <pathelement location="${gwt.user.jar}" /> - <pathelement location="${gwt.dev.jar}" /> - </path> - <path id="compile.classpath.server"> - <path refid="additional.jar.path" /> - <path refid="ivy.compile.classpath.server" /> - </path> - <path id="compile.classpath.shared"> - <path refid="additional.jar.path" /> - <path refid="ivy.compile.classpath.shared" /> - </path> - <path id="compile.classpath.client"> - <path refid="additional.jar.path" /> - <path refid="gwt.dev.user.jars"/> - <path refid="ivy.compile.classpath.client" /> - </path> - <path id="compile.classpath.client-compiler"> - <path refid="additional.jar.path" /> - <path refid="gwt.dev.user.jars"/> - <path refid="ivy.compile.classpath.client-compiler" /> - </path> - <path id="compile.classpath.theme-compiler"> - <path refid="additional.jar.path" /> - <path refid="ivy.compile.classpath.server" /> - <path refid="gwt.dev.user.jars"/> - </path> - <path id="compile.classpath.server-tests"> - <path refid="additional.jar.path" /> - <path refid="gwt.dev.user.jars"/> - <path refid="ivy.compile.classpath.server-tests" /> - </path> - - <path id="compile.classpath.buildhelpers"> - <path refid="additional.jar.path" /> - <path refid="gwt.dev.user.jars"/> - <path refid="buildhelpers.dependencies" /> - </path> - </target> - - <!-- Clean results - - - - - - - - - - - - - - - - - - - - - - - - - --> - <target name="clean-result" depends="build.properties"> - - <!-- Clean build result directory. --> - <delete dir="${result-path}" includes="**/*" followsymlinks="false" defaultexcludes="false" includeemptydirs="true" failonerror="false"/> - </target> - - <target name="build.properties" depends="init-deps"> - <property file="build/build.properties" /> - - <property file="build/VERSION.properties" /> - <property file="build/GWT-VERSION.properties" /> - - <!-- result source and classes folders --> - <property name="result-src-server" value="${result-path}/src/server"/> - <property name="result-src-client" value="${result-path}/src/client"/> - <property name="result-src-client-compiler" value="${result-path}/src/client-compiler"/> - <property name="result-src-shared" value="${result-path}/src/shared"/> - <property name="result-src-junit" value="${result-path}/src/junit"/> - <property name="result-src-testbench" value="${result-path}/src/testbench"/> - <property name="result-src-theme-compiler" value="${result-path}/src/theme-compiler"/> - <property name="result-src-theme-compiler-junit" value="${result-path}/src/theme-compiler-junit"/> - <property name="result-classes-server" value="${result-path}/classes/server"/> - <property name="result-classes-client" value="${result-path}/classes/client"/> - <property name="result-classes-client-compiler" value="${result-path}/classes/client-compiler"/> - <property name="result-classes-shared" value="${result-path}/classes/shared"/> - <property name="result-classes-junit" value="${result-path}/classes/junit"/> - <property name="result-classes-testbench" value="${result-path}/classes/testbench"/> - <property name="result-classes-theme-compiler" value="${result-path}/classes/theme-compiler"/> - <property name="result-classes-theme-compiler-junit" value="${result-path}/classes/theme-compiler-junit"/> - <property name="result-precompiled-widgetsets" value="${result-path}/classes/widgetsets"/> - <property name="result-classes-gwt" value="${result-path}/classes/gwt" /> - - <!-- Default classpath for building widgetsets, overridden for testing widgetset --> - <path id="compile.classpath.widgetset"> - <path refid="compile.classpath.client" /> - <!-- Needed to resolve classes which @Connect refers to --> - <pathelement location="${result-src-server}" /> - <!-- Needed to resolve imports in connector classes --> - <pathelement location="${result-classes-server}" /> - - <!-- The actual sources we want to compile --> - <pathelement location="${result-src-client}" /> - <pathelement location="${result-src-shared}" /> - <!-- Contains compiled generators --> - <pathelement location="${result-classes-client-compiler}" /> - <!-- Generators depend on shared and client interfaces --> - <pathelement location="${result-classes-shared}" /> - <pathelement location="${result-classes-client}" /> - - <pathelement location="${result-precompiled-widgetsets}" /> - </path> - </target> - <target name="clean-all" depends="clean-result"> - <delete failonerror="false"> - <fileset dir="${com.vaadin.testbench.screenshot.directory}/errors"> - <include name="*.png" /> - </fileset> - </delete> - <delete failonerror="false" dir="WebContent/VAADIN/gwt-unitCache" /> - </target> - - <!-- ================================================================== --> - <!-- Check versions. --> - <!-- ================================================================== --> - - <!-- Java compiler version. --> - <target name="check-java-version"> - <condition property="java.version.matches"> - <or> - <equals arg1="${ant.java.version}" arg2="${required.java.version}"/> - <isset property="ignoreversion"/> - </or> - </condition> - <fail unless="java.version.matches" message="Java version is ${ant.java.version}, but Vaadin must be compiled with genuine Java ${required.java.version} compiler. Use -Dignoreversion=1 for ant to ignore the version check."/> - <echo>Java version is ${ant.java.version} as required.</echo> - </target> - - <!-- ================================================================== --> - <!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <!-- ================================================================== --> - - <target name="init" depends="init-deps, build.properties, check-java-version"> - <!-- Current timestamp in different formats. --> - <tstamp> - <format property="build.date" pattern="yyyy-MM-dd"/> - </tstamp> - <tstamp> - <format property="build.date.compact" pattern="yyyyMMdd"/> - </tstamp> - - <antcontrib:propertyregex property="version.major" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\1"/> - <antcontrib:propertyregex property="version.minor" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\2"/> - <antcontrib:propertyregex property="version.revision" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\3"/> - - <!-- Default full version name. --> - <!-- Nightly and other TeamCity builds will define their own. --> - <property name="version.full" value="${version}.dev-${build.date.compact}"/> - <echo>Base Version: ${version}</echo> - <echo>Full Version: ${version.full}</echo> - - <!-- Other properties --> - <property file="build/html-style.properties" /> - - <echo>Vaadin package is: ${vaadin-package}</echo> - - <!-- Create result dir unless already exists --> - <mkdir dir="${result-path}" /> - - <echo>We are using gwt version ${gwt-version}.</echo> - - <!-- Destination files --> - <property name="base-name" value="${product-file}-${version.full}" /> - <property name="lib-jar-name" value="${base-name}.jar" /> - <property name="lib-sources-jar-name" value="${base-name}-sources.jar" /> - <property name="lib-javadoc-jar-name" value="${base-name}-javadoc.jar" /> - <property name="test-war-filename" value="${product-file}-tests-${version.full}.war"/> - - <echo message="Prepared to build ${product-file} version ${version.full} packages" /> - - <!-- Output directory --> - <property name="output-dir" value="${result-path}/${base-name}" /> - <mkdir dir="${output-dir}" /> - - <!-- Where widgetsets are written to. --> - <!-- When not building a package, widgetsets should be written to --> - <!-- WebContent/VAADIN/widgetsets, which needs to be set in --> - <!-- init-nonpackage target before calling this main init target. --> - <property name="widgetsets-output-dir" value="${output-dir}/WebContent/VAADIN/widgetsets" /> - - <!-- Build helpers --> - <property name="buildhelpers-src" value="build/buildhelpers" /> - <property name="buildhelpers-classes" value="${result-path}/buildhelpers/classes" /> - - <!-- Sass --> - <property name="theme-compiler-src" value="theme-compiler/src" /> - <property name="theme-compiler-classes" value="${result-classes-theme-compiler}" /> - - <!-- Create Output Directory Hierarchy --> - <mkdir dir="${output-dir}/WebContent" /> - <mkdir dir="${output-dir}/WebContent/demo" /> - <mkdir dir="${output-dir}/WebContent/docs" /> - <mkdir dir="${output-dir}/WebContent/docs/api" /> - <mkdir dir="${output-dir}/WebContent/tests" /> - <mkdir dir="${output-dir}/WebContent/WEB-INF" /> - <mkdir dir="${output-dir}/WebContent/WEB-INF/lib" /> - <mkdir dir="${output-dir}/WebContent/WEB-INF/classes" /> - </target> - - <target name="internal-package-war"> - <echo>Building Test WAR</echo> - - <echo>Adding test class files and resources and launcher configuration.</echo> - <copy todir="${output-dir}/WebContent/WEB-INF/classes"> - <fileset dir="${result-classes-testbench}"> - <include name="${vaadin-package}/tests/**/*" /> - <include name="${vaadin-package}/launcher/**" /> - </fileset> - <fileset dir="${result-classes-shared}" /> - <!-- VaadinClasses and data classes are used by TestBench tests also --> - <fileset dir="${result-classes-junit}" /> - <!-- test resources --> - <fileset dir="uitest/src"> - <include name="${vaadin-package}/tests/**/*" /> - <!-- Pre-processed versions of these copied above --> - <exclude name="**/*.java" /> - <exclude name="**/*.html" /> - <exclude name="**/*.css" /> - <exclude name="**/*.xml" /> - </fileset> - - <!-- Include files required by the DemoLauncher/DevelopmentServerLauncher --> - <fileset dir="uitest/src"> - <include name="${vaadin-package}/launcher/jetty-webdefault.xml" /> - <include name="${vaadin-package}/launcher/keystore" /> - </fileset> - </copy> - - <war warfile="${result-path}/${test-war-filename}"> - <fileset dir="${output-dir}/WebContent"> - <exclude name="VAADIN/gwt-unitCache" /> - <!-- Already in JAR --> - <!-- Not excluded because used from WAR by portal integration tests - <exclude name="VAADIN/themes/base/**/*" /> - <exclude name="VAADIN/themes/chameleon/**/*" /> - <exclude name="VAADIN/themes/liferay/**/*" /> - <exclude name="VAADIN/themes/reindeer/**/*" /> - <exclude name="VAADIN/themes/runo/**/*" /> - <exclude name="VAADIN/widgetsets/com.vaadin.DefaultWidgetSet/**/*" /> - --> - - <!-- Not needed for testing --> - <exclude name="docs/**/*" /> - <exclude name="docs" /> - - <include name="**/*" /> - </fileset> - </war> - </target> - - <target name="internal-package-liferay" depends="internal-package-war"> - <!-- We assume the needed files are put in place by internal-package-war --> - <echo>Building Liferay zip</echo> - - <zip zipfile="${result-path}/${base-name}-liferay.zip"> - <zipfileset prefix="VAADIN/widgetsets/com.vaadin.portal.gwt.PortalDefaultWidgetSet" dir="${output-dir}/WebContent/VAADIN/widgetsets/com.vaadin.portal.gwt.PortalDefaultWidgetSet"> - <patternset> - <include name="**/*" /> - </patternset> - </zipfileset> - <zipfileset prefix="VAADIN/themes" dir="${output-dir}/WebContent/VAADIN/themes"> - <patternset> - <include name="base/**/*" /> - <include name="chameleon/**/*" /> - <include name="liferay/**/*" /> - <include name="runo/**/*" /> - <include name="reindeer/**/*" /> - </patternset> - </zipfileset> - <zipfileset prefix="VAADIN" dir="${output-dir}/WebContent/VAADIN"> - <patternset> - <include name="vaadinBootstrap.js" /> - </patternset> - </zipfileset> - </zip> - - <echo>##teamcity[publishArtifacts '${result-path}/${base-name}-liferay.zip']</echo> - </target> - - <!-- Build server-side, client-side, libraries, and tests. --> - <!-- The client-side needs to be built before vaadin.jar, because the vaadin.jar --> - <!-- require the default widgetset and doing otherwise would build it twice. --> - <!-- However, since compiling the server-side is required by the client-side --> - <!-- compilation, the server-side will actually be built before it. --> - <target name="build" - depends="compile-server-side, compile-tests, compile-client-side, vaadin.jar, vaadin-sources.jar" - description="Build package required files, without packing them."> - </target> - - <target name="compile-server-side" depends="compile-gwt, compile-server, compile-client, webcontent"/> - - <!-- Copy and preprocess sources for packaging - NOTE: Replaces <version></version> tags with build version tag for some "textual" files - --> - <target name="preprocess-src"> - <!-- - Source directories in the project are - * src (Vaadin core) - * theme-compiler/src (SASS compiler) - * uitest/src (TestBench test cases) - * server/tests/src (Server-side JUnit test cases) - * client/tests/src (Client-side JUnit test cases) - - These are copied to - * ${result-path}/src/core - * ${result-path}/src/theme-compiler - * ${result-path}/src/tests - * ${result-path}/src/junit - - And compiled to - * ${result-path}/classes/core - * ${result-path}/classes/theme-compiler - * ${result-path}/classes/tests - * ${result-path}/classes/junit - - Java/HTML/CSS/XML files are filtered so the license is added and the version is set. - Other files are just copied. - --> - - <loadfile property="VaadinApache2LicenseForJavaFiles" srcFile="build/VaadinApache2LicenseForJavaFiles.txt" /> - - <mkdir dir="${result-path}/src" /> - <mkdir dir="${result-src-theme-compiler}/src" /> - <mkdir dir="${result-src-server}" /> - <mkdir dir="${result-src-client}" /> - <mkdir dir="${result-src-client-compiler}" /> - <mkdir dir="${result-src-shared}" /> - <mkdir dir="${result-src-testbench}" /> - <mkdir dir="${result-src-junit}" /> - <mkdir dir="${result-src-theme-compiler-junit}" /> - - <patternset id="preprocessable-files"> - <include name="**/*.java" /> - <include name="**/*.html" /> - <include name="**/*.css" /> - <include name="**/*.xml" /> - </patternset> - <patternset id="non-preprocessable-files"> - <exclude name="**/.svn" /> - <exclude name="**/*.java" /> - <exclude name="**/*.html" /> - <exclude name="**/*.css" /> - <exclude name="**/*.xml" /> - </patternset> - <filterset id="version-and-license"> - <filter token="VaadinApache2LicenseForJavaFiles" value="${VaadinApache2LicenseForJavaFiles}" /> - <filter token="VERSION" value="${version.full}" /> - </filterset> - - <!-- Adds a style class to JavaDoc <pre> tags for style customization. --> - <filterset id="pre-css-style" begintoken=" * <" endtoken=">"> - <filter token="pre" value=" * <pre class='code'>" /> - </filterset> - - <echo>Copying src directory and processing copied files.</echo> - <echo>Replacing <version> tag with build version for java/html/css/xml files.</echo> - <copy todir="${result-src-server}" overwrite="yes"> - <filterset refid="version-and-license"/> - <filterset refid="pre-css-style"/> - <fileset dir="server/src"> - <patternset refid="preprocessable-files" /> - </fileset> - </copy> - <copy todir="${result-src-shared}" overwrite="yes"> - <filterset refid="version-and-license"/> - <filterset refid="pre-css-style"/> - <fileset dir="shared/src"> - <patternset refid="preprocessable-files" /> - </fileset> - </copy> - <copy todir="${result-src-client}" overwrite="yes"> - <filterset refid="version-and-license"/> - <filterset refid="pre-css-style"/> - <fileset dir="client/src"> - <patternset refid="preprocessable-files" /> - </fileset> - </copy> - <copy todir="${result-src-client-compiler}" overwrite="yes"> - <filterset refid="version-and-license"/> - <filterset refid="pre-css-style"/> - <fileset dir="client-compiler/src"> - <patternset refid="preprocessable-files" /> - </fileset> - </copy> - - <copy todir="${result-src-theme-compiler}" overwrite="yes"> - <filterset refid="version-and-license"/> - <filterset refid="pre-css-style"/> - <fileset dir="theme-compiler/src"> - <patternset refid="preprocessable-files" /> - </fileset> - </copy> - - <copy todir="${result-src-testbench}"> - <filterset refid="version-and-license"/> - <fileset dir="uitest/src"> - <patternset refid="preprocessable-files" /> - </fileset> - </copy> - <copy todir="${result-src-junit}"> - <filterset refid="version-and-license"/> - <fileset dir="server/tests/src"> - <patternset refid="preprocessable-files" /> - </fileset> - <fileset dir="client/tests/src"> - <patternset refid="preprocessable-files" /> - </fileset> - </copy> - <copy todir="${result-src-theme-compiler-junit}"> - <filterset refid="version-and-license"/> - <fileset dir="theme-compiler/tests/src"> - <patternset refid="preprocessable-files" /> - </fileset> - </copy> - - <!-- Add other files such as images, these are not filtered or processed by fixcrlf task --> - <echo>Copying non java/html/css/xml files such as images.</echo> - <copy todir="${result-src-server}"> - <fileset dir="server/src"> - <patternset refid="non-preprocessable-files" /> - </fileset> - </copy> - - <copy todir="${result-src-shared}"> - <fileset dir="shared/src"> - <patternset refid="non-preprocessable-files" /> - </fileset> - </copy> - - <copy todir="${result-src-client}"> - <fileset dir="client/src"> - <patternset refid="non-preprocessable-files" /> - </fileset> - </copy> - - <copy todir="${result-src-client-compiler}"> - <fileset dir="client-compiler/src"> - <patternset refid="non-preprocessable-files" /> - </fileset> - </copy> - - <copy todir="${result-src-theme-compiler}"> - <fileset dir="${theme-compiler-src}"> - <patternset refid="non-preprocessable-files" /> - </fileset> - </copy> - <copy todir="${result-src-testbench}"> - <fileset dir="uitest/src"> - <patternset refid="non-preprocessable-files" /> - </fileset> - </copy> - <copy todir="${result-src-junit}"> - <fileset dir="server/tests/src"> - <patternset refid="non-preprocessable-files" /> - </fileset> - <fileset dir="client/tests/src"> - <patternset refid="non-preprocessable-files" /> - </fileset> - </copy> - <copy todir="${result-src-theme-compiler-junit}"> - <fileset dir="theme-compiler/tests/src"> - <patternset refid="non-preprocessable-files" /> - </fileset> - <fileset dir="theme-compiler/tests/resources"> - <!-- test resources (files to compile and compare etc.) --> - </fileset> - </copy> - - </target> - - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WebContent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <target name="webcontent" depends="preprocess-src,defaulttheme"> - - <!-- Add WebContent --> - <echo>Adding VAADIN/themes and META-INF</echo> - <copy todir="${output-dir}/WebContent"> - <fileset dir="WebContent"> - <exclude name="**/.svn" /> - <include name="WEB-INF/lib/hsqldb.jar" /> - <include name="VAADIN/themes/**/*" /> - <include name="VAADIN/vaadinBootstrap.js" /> - <include name="META-INF/**/*" /> - <include name="statictestfiles/**" /> - </fileset> - </copy> - - <!-- Add test files to be included in test war --> - <copy todir="${output-dir}/WebContent"> - <fileset dir="WebContent"> - <include name="statictestfiles/**" /> - </fileset> - </copy> - - <!-- Add servlet and portlet configuration files from WebContent --> - <copy todir="${output-dir}/WebContent/WEB-INF"> - <fileset dir="WebContent/WEB-INF"> - <include name="liferay-*.xml" /> - <include name="portlet.xml" /> - <include name="web.xml" /> - </fileset> - </copy> - - <!-- These should go to various JARs --> - <copy todir="${output-dir}/WebContent"> - <filterchain> - <expandproperties /> - <replacetokens begintoken="@" endtoken="@"> - <token key="version" value="${version.full}" /> - </replacetokens> - <replacetokens begintoken="@" endtoken="@"> - <token key="version-minor" value="${version.major}.${version.minor}" /> - </replacetokens> - <replacetokens begintoken="@" endtoken="@"> - <token key="builddate" value="${build.date}" /> - </replacetokens> - <replacetokens begintoken="@" endtoken="@"> - <token key="gwt-version" value="${gwt-version}" /> - </replacetokens> - </filterchain> - <fileset dir="WebContent"> - <exclude name="**/.svn" /> - <include name="release-notes.html" /> - <include name="license.html" /> - <include name="css/**" /> - <include name="img/**" /> - </fileset> - </copy> - </target> - - <target name="compile-server" depends="init, preprocess-src, compile-shared"> - <echo>Compiling server/src</echo> - <!-- Compile core sources first as the other sources depend on these --> - <mkdir dir="${result-classes-server}" /> - <javac destdir="${result-classes-server}" source="${required.java.version}" target="${required.java.version}" classpathref="compile.classpath.server" debug="true" encoding="UTF-8" includeantruntime="false"> - <classpath location="${result-classes-shared}"></classpath> - <src path="${result-src-server}"/> - </javac> - </target> - - <target name="compile-client" depends="init, preprocess-src, compile-server, compile-shared"> - <echo>Compiling client/src</echo> - <!-- Compile core sources first as the other sources depend on these --> - <mkdir dir="${result-classes-client}" /> - <javac destdir="${result-classes-client}" source="${required.java.version}" target="${required.java.version}" classpathref="compile.classpath.client" debug="true" encoding="UTF-8" includeantruntime="false"> - <classpath location="${result-classes-shared}"></classpath> - <classpath location="${result-classes-server}"></classpath> - <src path="${result-src-client}"/> - </javac> - </target> - - <target name="compile-client-compiler" depends="init, preprocess-src, compile-client, compile-server, compile-shared"> - <echo>Compiling client-compiler/src</echo> - <mkdir dir="${result-classes-client-compiler}" /> - <javac destdir="${result-classes-client-compiler}" source="${required.java.version}" target="${required.java.version}" classpathref="compile.classpath.client-compiler" debug="true" encoding="UTF-8" includeantruntime="false"> - <src path="${result-src-client-compiler}"/> - <!-- These could be removed by using class names instead of class references in generators --> - <classpath location="${result-classes-shared}"></classpath> - <classpath location="${result-classes-client}"></classpath> - <classpath location="${result-classes-server}"></classpath> - </javac> - </target> - - <target name="compile-shared" depends="init, preprocess-src"> - <echo>Compiling shared/src</echo> - <!-- Compile core sources first as the other sources depend on these --> - <mkdir dir="${result-classes-shared}" /> - <javac destdir="${result-classes-shared}" source="${required.java.version}" target="${required.java.version}" classpathref="compile.classpath.shared" debug="true" encoding="UTF-8" includeantruntime="false"> - <src path="${result-src-shared}"/> - </javac> - </target> - - <target name="compile-tests" depends="compile-server,compile-client,compile-theme-compiler"> - <echo>Compiling src (Server and client side JUnit tests)</echo> - <!-- Compile server and client side JUnit tests --> - <mkdir dir="${result-classes-junit}" /> - <javac source="${required.java.version}" target="${required.java.version}" classpathref="compile.classpath.server-tests" destdir="${result-classes-junit}" debug="true" encoding="UTF-8" includeantruntime="false"> - <classpath path="${result-classes-shared}"></classpath> - <classpath path="${result-classes-server}"></classpath> - <classpath path="${result-classes-client}"></classpath> - <src path="${result-src-junit}"/> - </javac> - - <echo>Compiling SASS JUnit tests</echo> - <!-- Compile server and client side JUnit tests --> - <mkdir dir="${result-classes-theme-compiler-junit}" /> - <javac source="${required.java.version}" target="${required.java.version}" classpathref="compile.classpath.server-tests" destdir="${result-classes-theme-compiler-junit}" debug="true" encoding="UTF-8" includeantruntime="false"> - <classpath path="${result-classes-theme-compiler}"></classpath> - <src path="${result-src-theme-compiler-junit}"/> - </javac> - - <echo>Compiling src (TestBench tests)</echo> - <!-- Compile TestBench tests --> - <mkdir dir="${result-classes-testbench}" /> - <javac source="${required.java.version}" target="${required.java.version}" classpathref="compile.classpath.server" destdir="${result-classes-testbench}" debug="true" encoding="UTF-8" includeantruntime="false"> - <classpath path="${result-classes-junit}"></classpath> - <classpath path="${result-classes-server}"></classpath> - <classpath path="${result-classes-shared}"></classpath> - <classpath path="${result-classes-client}"></classpath> - <classpath refid="gwt.dev.user.jars"/> - <src path="${result-src-testbench}"/> - </javac> - - </target> - - <target name="compile-helpers" depends="init, compile-theme-compiler"> - <mkdir dir="${buildhelpers-classes}" /> - <javac source="${required.java.version}" target="${required.java.version}" includeantruntime="false" classpathref="compile.classpath.buildhelpers" destdir="${buildhelpers-classes}" debug="true" encoding="UTF-8" > - <!-- SASS --> - <classpath path="${result-classes-theme-compiler}" /> - - <src path="${buildhelpers-src}"/> - </javac> - </target> - - <target name="compile-theme-compiler-parser"> - <javacc target="${parserDir}/Parser.jj" javacchome="${JavaCChome}"> - </javacc> - </target> - - <target name="compile-theme-compiler" depends="init, preprocess-src"> - <!-- TODO also perform javacc compilation of the parser --> - <mkdir dir="${result-classes-theme-compiler}" /> - <javac source="${required.java.version}" target="${required.java.version}" includeantruntime="false" srcdir="${result-src-theme-compiler}" - classpathref="compile.classpath.theme-compiler" destdir="${result-classes-theme-compiler}" debug="true" encoding="UTF-8" /> - </target> - - <target name="defaulttheme" depends="init, compile-theme-compiler, compile-helpers" description="Compile all included themes"> - <echo>Combining default themes css files</echo> - <java classname="com.vaadin.buildhelpers.CompileDefaultTheme" failonerror="yes" fork="yes"> - <arg value="-version" /> - <arg value="${version.full}"/> - <classpath> - <!-- SASS --> - <path path="${result-classes-theme-compiler}" /> - <path location="${buildhelpers-classes}" /> - <path refid="compile.classpath.buildhelpers" /> - </classpath> - <jvmarg value="-Djava.awt.headless=true"/> - </java> - </target> - - <target name="testtarget"> - <echo>TEST TARGET CALLED</echo> - </target> - - <!-- ================================================================== --> - <!-- Widget Set Compilation --> - <!-- ================================================================== --> - <!-- Widget set compilation process: --> - <!-- 1. Preprocess sources --> - <!-- 2. Compile server-side java --> - <!-- 3. Generate widget set definitions and classes --> - <!-- 4. Compile widget sets --> - <!-- --> - <!-- Widget sets can be built for two purposes: --> - <!-- * for building installation packages --> - <!-- * for building single widget sets during development --> - <!-- Targets: widgetset-<name> --> - - <target name="remove-widgetset-gwt-tmp"> - <echo>Removing widgetset temp files</echo> - <delete dir="${widgetsets-output-dir}/.gwt-tmp" includeemptydirs="true"/> - <!-- This is generated by GWT 2.3+ for rpcPolicyManifest and symbolMaps, cannot disable --> - <delete dir="${widgetsets-output-dir}/WEB-INF" includeemptydirs="true" failonerror="false" /> - </target> - - <!-- The widgetset generator is currently compiled along with rest of server-side Java. --> - <target name="compile-widgetset-generator" depends="compile-server,compile-client, compile-client-compiler"/> - - <!-- Compiles the widgetset given as the first parameter --> - <!-- Caller must ensure necessary classes have been compiled --> - <target name="compile-widgetset"> - <fail unless="widgetset" message="No widgetset parameter set"/> - <property name="widgetset-style" value="OBF" /> - <property name="widgetset-localWorkers" value="2" /> - <property name="widgetset-extraParams" value="" /> - <echo>Compiling widgetset ${widgetset}. Output directory: ${widgetsets-output-dir}</echo> - <mkdir dir="${widgetsets-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 --> - <java classname="com.google.gwt.dev.Compiler" classpathref="compile.classpath.widgetset" failonerror="yes" fork="yes" maxmemory="512m"> - <arg value="-war" /> - <arg value="${widgetsets-output-dir}" /> - <arg value="-style" /> - <arg value="${widgetset-style}" /> - <arg value="-strict" /> - <arg value="-localWorkers" /> - <arg value="${widgetset-localWorkers}" /> - <arg line="${widgetset-extraParams}" /> - <arg value="${widgetset}" /> - - <sysproperty key="vFailIfNotSerializable" value="true" /> - - <jvmarg value="-Xss8M"/> - <jvmarg value="-XX:MaxPermSize=256M"/> - <jvmarg value="-Djava.awt.headless=true"/> - </java> - - <antcall target="remove-widgetset-gwt-tmp"/> - - <echo>Compiled ${widgetset}</echo> - </target> - - <target name="compile-widgetset-default"> - <antcall target="compile-widgetset"> - <reference refid="compile.classpath.widgetset" /> - <param name="widgetset" value="com.vaadin.DefaultWidgetSet"/> - </antcall> - </target> - - <target name="compile-widgetset-testing"> - <!-- Create a path reference containing default widgetset classpath + testbench files --> - <path id="compile.classpath.testingwidgetset"> - <path refid="compile.classpath.widgetset" /> - <pathelement location="${result-classes-testbench}" /> - <pathelement location="${result-src-testbench}" /> - </path> - <antcall target="compile-widgetset"> - <reference refid="compile.classpath.testingwidgetset" torefid="compile.classpath.widgetset" /> - <param name="widgetset" value="com.vaadin.tests.widgetset.TestingWidgetSet"/> - </antcall> - </target> - - <target name="compile-widgetset-portal-default" unless="compile.only.default-widgetset"> - <antcall target="compile-widgetset"> - <reference refid="compile.classpath.widgetset" /> - <param name="widgetset" value="com.vaadin.portal.gwt.PortalDefaultWidgetSet"/> - </antcall> - </target> - - <!-- Compiles all widgetsets. --> - <!-- This is called when building packages and when compiling all --> - <!-- widgetsets, but not when compiling individual widgetsets. --> - <target name="compile-client-side" depends="compile-gwt, compile-server-side, compile-tests, compile-client-compiler"> - <echo>Compiling widget sets in parallel.</echo> - <parallel threadsperprocessor="1"> - <antcall inheritrefs="true" target="compile-widgetset-default"/> - <antcall inheritrefs="true" target="compile-widgetset-testing"/> - <antcall inheritrefs="true" target="compile-widgetset-portal-default"/> - </parallel> - </target> - - <!-- Definitions for building local components, i.e., not for an installation package. --> - <target name="init-nonpackage" depends="build.properties"> - <!-- Definitions for building the client-side. --> - <property name="widgetsets-output-dir" value="WebContent/VAADIN/widgetsets" /> - - <echo>We are using ${gwt.dev.jar}.</echo> - <echo>Widget sets output dir: ${widgetsets-output-dir}</echo> - </target> - - <!-- Builds all widgetsets locally, i.e., not for an installation package. --> - <target name="widgetsets" depends="init-nonpackage, init, compile-widgetset-generator, compile-client-side"/> - - <!-- Build each widgetset locally, i.e., not for an installation package. --> - <target name="widgetset-default" depends="init-nonpackage, init, compile-gwt, compile-widgetset-generator, compile-widgetset-default" description="Compile the DefaultWidgetSet"/> - <target name="widgetset-testing" depends="init-nonpackage, init, compile-gwt, compile-tests, compile-widgetset-generator, compile-widgetset-testing"/> - <target name="widgetset-portal-default" depends="init-nonpackage, init, compile-gwt, compile-widgetset-generator, compile-widgetset-portal-default"/> - - <!-- ================================================================== --> - <!-- Libraries and Tests --> - <!-- ================================================================== --> - - <target name="compile-gwt" depends="init" unless="use.precompiled.gwt"> - <!-- skipped based on a parameter, use pre-compiled JARs from elsewhere --> - <!-- Compile GWT in a directory defined by properties --> - <ant antfile="${gwt.root}/build.xml" target="user" dir="${gwt.root}" inheritall="false" inheritrefs="false"> - <property name="gwt.root" value="${gwt.root}"/> - </ant> - <ant antfile="${gwt.root}/build.xml" target="dev" dir="${gwt.root}" inheritall="false" inheritrefs="false"> - <property name="gwt.root" value="${gwt.root}"/> - </ant> - <ant antfile="${gwt.root}/build.xml" target="codeserver" dir="${gwt.root}" inheritall="false" inheritrefs="false"> - <property name="gwt.root" value="${gwt.root}"/> - </ant> - <ant antfile="${gwt.root}/build.xml" target="elemental" dir="${gwt.root}" inheritall="false" inheritrefs="false"> - <property name="gwt.root" value="${gwt.root}"/> - </ant> - </target> - - <!-- Compile the Vaadin library JAR. --> - <!-- Need only the default widgetset for this, but can't depend --> - <!-- specifically on it, because dependence does not see compiled --> - <!-- individual widgetsets, because antcall does not fulfill --> - <!-- dependencies. --> - <target name="vaadin.jar" depends="compile-server-side, compile-client-side, compile-helpers"> - <echo>Creating JAR (server-side) ${lib-jar-name}</echo> - <!-- Create Vaadin JAR --> - <mkdir dir="${output-dir}/META-INF"/> - <echo file="${output-dir}/META-INF/VERSION">${version.full}</echo> - - <!-- Get Git revision --> - <exec executable="git" outputproperty="git.revision" failifexecutionfails="false" errorproperty=""> - <arg value="describe"/> - <arg value="--tags"/> - <arg value="--always"/> - <arg value="HEAD"/> - </exec> - - <!-- Replace GWT versioning with Vaadin versioning --> - <echo file="${result-classes-gwt}/com/google/gwt/dev/About.properties">gwt.version=${version.full} -gwt.svnrev=${git.revision}</echo> - - <jarjar jarfile="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" - compress="true" manifest="build/package/META-INF/MANIFEST.MF" duplicate="preserve" index="true" > - <metainf dir="${output-dir}/META-INF"/> - <manifest> - <attribute name="Vaadin-Package-Version" value="1" /> - <attribute name="Vaadin-Widgetsets" value="com.vaadin.DefaultWidgetSet" /> - <attribute name="Implementation-Vendor" value="Vaadin Ltd" /> - <attribute name="Implementation-URL" value="http://vaadin.com" /> - <attribute name="Implementation-Version" value="${version.full}" /> - <!-- No separate GWT-Version attribute or file --> - <!-- <attribute name="GWT-Version" value="${gwt-version}" /> --> - <attribute name="GWT-Version-Dependencies" value="${gwt-version-dependencies}" /> - <attribute name="Bundle-Version" value="${version.full}" /> - </manifest> - <fileset dir="${result-classes-server}"/> - <fileset dir="${result-classes-client}"/> - <fileset dir="${result-classes-shared}"/> - <fileset dir="${result-classes-theme-compiler}"/> - <fileset dir="${result-classes-client-compiler}"/> - <!-- add sources --> - <fileset dir="${result-src-server}"/> - <fileset dir="${result-src-client}"/> - <fileset dir="${result-src-shared}"/> - <fileset dir="${result-src-theme-compiler}"/> - <fileset dir="${result-src-client-compiler}"/> - <fileset dir="${result-classes-gwt}"/> - <fileset dir="${output-dir}/WebContent"> - <patternset> - <include name="VAADIN/widgetsets/com.vaadin.DefaultWidgetSet/**/*" /> - <include name="VAADIN/themes/base/**/*" /> - <include name="VAADIN/themes/chameleon/**/*" /> - <include name="VAADIN/themes/liferay/**/*" /> - <include name="VAADIN/themes/runo/**/*" /> - <include name="VAADIN/themes/reindeer/**/*" /> - <include name="VAADIN/vaadinBootstrap.js" /> - - <include name="release-notes.html" /> - <include name="license.html" /> - <include name="css/**" /> - <include name="img/**" /> - </patternset> - </fileset> - - <!-- Precompiled widgetset (.gwtar file) not included to limit JAR size --> - <!-- <fileset dir="${result-precompiled-widgetsets}" includes="com/vaadin/DefaultWidgetSet.gwtar" /> --> - - <!-- TODO GWT related license files etc. should be in subdirectories --> - - <!-- GWT --> - <!-- Precompiled GWT modules (.gwtar file) not included to limit JAR size --> - <zipfileset src="${gwt.user.jar}" excludes="META-INF/**,javax/servlet/**,**/*.gwtar" /> - - <!-- TODO depends on locally compiled gwt-user --> - <!-- - <fileset dir="${gwt.user.dir}/src" excludes="**/package.html" /> - <fileset dir="${gwt.user.dir}/super" excludes="**/package.html" /> - <fileset dir="${gwt.user.bin}" excludes="**/*.gwtar" /> - - <zipfileset src="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" /> - <zipfileset src="${gwt.tools.lib}/w3c/flute/flute-1.3-gg2.jar" /> - <zipfileset src="${gwt.tools.lib}/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar" /> - --> - - <!-- GWT development JAR contents including many external dependencies --> - <zipfileset src="${gwt.dev.jar}" excludes="javax/servlet/**,javax/xml/**" > - <exclude name="com/google/gwt/dev/About.properties"/> - </zipfileset> - - <!-- Alternative approach: GWT compiler and its dependencies only from the dev JAR --> - <!-- - <zipfileset src="${gwt.dev.jar}"> - <include name="com/google/gwt/core/client/**"/> - <include name="com/google/gwt/core/shared/**"/> - - <include name="com/google/gwt/core/ext/**"/> - <include name="com/google/gwt/core/linker/**"/> - <include name="com/google/gwt/dev/About.java"/> - <include name="com/google/gwt/dev/GwtVersion.java"/> - <include name="com/google/gwt/dev/Permutation.java"/> - <include name="com/google/gwt/dev/asm/**"/> - <include name="com/google/gwt/dev/cfg/**"/> - <include name="com/google/gwt/dev/javac/**"/> - <include name="com/google/gwt/dev/jdt/**"/> - <include name="com/google/gwt/dev/jjs/**"/> - <include name="com/google/gwt/dev/js/**"/> - <include name="com/google/gwt/dev/json/**"/> - <include name="com/google/gwt/dev/resource/**"/> - <include name="com/google/gwt/dev/util/**"/> - <include name="com/google/gwt/soyc/**"/> - <include name="com/google/gwt/util/**"/> - <include name="org/eclipse/jdt/**"/> - </zipfileset> - <zipfileset src="${gwt.tools.lib}/apache/ant-1.6.5.jar" /> - <zipfileset src="${gwt.tools.lib}/eclipse/jdt-3.4.2_r894.jar" /> - <zipfileset src="${gwt.tools.lib}/tomcat/commons-collections-3.1.jar" /> - <zipfileset src="${gwt.tools.lib}/guava/guava-10.0.1/guava-10.0.1-rebased.jar" /> - <zipfileset src="${gwt.tools.lib}/jscomp/r1649/compiler-rebased.jar" /> - --> - - <!-- GWT SuperDevMode --> - <zipfileset src="${gwt.codeserver.jar}" /> - - <!-- GWT Elemental --> - <zipfileset src="${gwt.elemental.jar}" /> - - <!-- jarjar rules: rebase packages from gwt-dev.jar but not those from gwt-user --> - - <!-- Don't rebase these --> - <!-- xalan is used via reflection --> - <rule pattern="org.apache.xalan.**" result="@0"/> - <rule pattern="org.apache.xml.**" result="@0"/> - <!-- Cannot rebase - used in APIs etc. --> - <!-- <rule pattern="org.mortbay.**" result="@0"/> --> - <!-- <rule pattern="org.xml.**" result="@0"/> --> - - <!-- Rebase these --> - <rule pattern="com.gargoylesoftware.**" result="com.vaadin.external.@0"/> - <rule pattern="com.ibm.**" result="com.vaadin.external.@0"/> - <rule pattern="com.steadystate.**" result="com.vaadin.external.@0"/> - <rule pattern="mx4j.**" result="com.vaadin.external.@0"/> - <rule pattern="net.sourceforge.htmlunit.**" result="com.vaadin.external.@0"/> - <rule pattern="org.apache.**" result="com.vaadin.external.@0"/> - <rule pattern="org.cyberneko.**" result="com.vaadin.external.@0"/> - <rule pattern="org.eclipse.**" result="com.vaadin.external.@0"/> - <!-- looked up based on class name? --> - <rule pattern="org.hibernate.validator.**" result="com.vaadin.external.@0"/> - <rule pattern="org.jdesktop.swingworker.**" result="com.vaadin.external.@0"/> - <rule pattern="org.kohsuke.args4j.**" result="com.vaadin.external.@0"/> - - </jarjar> - - <!-- Generate the Export-Package attribute in the manifest of the JAR --> - <java classname="com.vaadin.buildhelpers.GeneratePackageExports" failonerror="true" fork="yes"> - <arg value="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}"/> - <classpath> - <pathelement location="${buildhelpers-classes}" /> - </classpath> - </java> - - <echo>##teamcity[publishArtifacts '${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}']</echo> - </target> - - <target name="vaadin-sources.jar" depends="init"> - <jar file="${result-path}/${lib-sources-jar-name}" compress="true"> - <fileset dir="${result-src-server}"> - <patternset> - <include name="**/*.java" /> - </patternset> - </fileset> - <fileset dir="${result-src-shared}"> - <patternset> - <include name="**/*.java" /> - </patternset> - </fileset> - <fileset dir="${result-src-client}"> - <patternset> - <include name="**/*.java" /> - </patternset> - </fileset> - <fileset dir="${result-src-theme-compiler}"> - <patternset> - <include name="**/*.java" /> - </patternset> - </fileset> - <fileset dir="${output-dir}/WebContent"> - <patternset> - <include name="release-notes.html" /> - <include name="license.html" /> - <include name="css/**" /> - <include name="img/**" /> - </patternset> - </fileset> - </jar> - </target> - - <!-- ================================================================== --> - <!-- Documentation --> - <!-- ================================================================== --> - - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <!-- Documentation: Add Javadoc to doc --> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <target name="javadoc" depends="init, preprocess-src"> - <property name="javadoc.destdir" value="${output-dir}/WebContent/docs/api"/> - - <javadoc destdir="${javadoc.destdir}" author="true" version="true" use="true" windowtitle="${product-name}" classpathref="compile.classpath.client"> - <packageset dir="${result-src-server}"/> - <packageset dir="${result-src-client}"/> - <packageset dir="${result-src-shared}"/> - <doctitle>${javadoc.doctitle}</doctitle> - <!-- <header><![CDATA[<script type="text/javascript" src=".html-style/style.js"></script>]]></header> --> - <bottom>${javadoc.bottom}</bottom> - <link offline="true" href="http://docs.oracle.com/javase/6/docs/api/" packagelistLoc="build/javadoc/j2se-1.6.0" /> - <link offline="true" href="http://java.sun.com/j2ee/1.4/docs/api/" packagelistLoc="build/javadoc/j2ee-1.4" /> - </javadoc> - - <!-- Create a javadoc jar, mainly for Maven --> - <jar file="${result-path}/${lib-javadoc-jar-name}" compress="true"> - <fileset dir="${javadoc.destdir}"> - <patternset> - <include name="**" /> - </patternset> - </fileset> - <fileset dir="${output-dir}/WebContent"> - <patternset> - <include name="release-notes.html" /> - <include name="license.html" /> - <include name="css/**" /> - <include name="img/**" /> - </patternset> - </fileset> - </jar> - - <!-- Append local style definitions. --> - <echo>Appending local style definitions</echo> - <concat destfile="${javadoc.destdir}/stylesheet.css" append="yes"> - <filelist dir="build/javadoc" files="stylesheet-local.css"/> - </concat> - </target> - - <!-- ================================================================== --> - <!-- Difference to previous release package. --> - <!-- ================================================================== --> - - <!-- This should be called after the Linux package is ready. --> - <target name="differences" if="build.differences"> - <exec executable="python" searchpath="true" failonerror="true" output="${result-path}/differences.txt"> - <arg value="build/bin/package-diff.py"/> - <arg value="${version.full}"/> - </exec> - - <echo>##teamcity[publishArtifacts '${result-path}/differences.txt']</echo> - </target> - - <!-- ================================================================== --> - <!-- Custom build. --> - <!-- ================================================================== --> - - <!-- Main target for the custom build. --> - <!-- Need to read custom build configuration before calling clean-result --> - <target name="custom-build" depends="custom-build-init, clean-result, nightly-init, init, build"> - </target> - - - <!-- Initialize a custom build. --> - <target name="custom-build-init"> - <echo>Preparing a custom build with properties file: ${build.properties.file}</echo> - - <!-- Custom build support --> - <antcontrib:if> - <isset property="build.properties.file"/> - <then> - <tstamp> - <format property="build.date.compact" pattern="yyyyMMdd"/> - </tstamp> - <property file="${build.properties.file}" /> - <property name="version" value="${vaadin.version}"/> - <property name="version.full" value="${version}-${build.date.compact}"/> - </then> - <!-- Otherwise version is set by the target "init" --> - </antcontrib:if> - </target> - - <target name="custom-build-maven-publish"> - <antcall target="nightly-maven-publish" /> - </target> - - - <!-- ================================================================== --> - <!-- Nightly build. --> - <!-- ================================================================== --> - - <!-- Main target for the nightly build. --> - <target name="nightly" depends="clean-result, nightly-init, init, build, javadoc, differences"> - </target> - - - <!-- Initialize a nightly build. --> - <target name="nightly-init" depends="build.properties"> - - <!-- Mandatory parameters. --> - <fail unless="build.number" message="The build.number property must be defined."/> - <fail unless="nightly.publish" message="The nightly.publish property must be defined."/> - - <!-- Optional parameters. --> - <property name="build.tag" value="dev"/> - - <echo>Base version: ${version}</echo> - <echo>Build number: ${build.number}</echo> - <echo>Build tag: ${build.tag}</echo> - <echo>Publish target: ${nightly.publish}</echo> - <echo>Demo publish target: ${nightly.demo.publish}</echo> - - <!-- Set build number. --> - <tstamp> - <format property="nightly.date" pattern="yyyyMMdd"/> - </tstamp> - <property name="version.full" value="${version}.${build.tag}-${nightly.date}-${build.number}"/> - - <echo>Version will be: ${version.full}</echo> - - <!-- Tell TeamCity the build name. Have to do it this way, because --> - <!-- this script needs to get the plain build number as a parameter. --> - <echo>##teamcity[buildNumber '${version}-c${build.number}']</echo> - </target> - - <target name="nightly-teamcity-publish"> - <!-- Publish as a TeamCity artifact. --> - <echo>##teamcity[publishArtifacts '${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}']</echo> - </target> - - <!-- Copies the nightly build artifacts to the download server. --> - <target name="nightly-download-publish" if="nightly.publish"> - <!-- Publish to the download server. --> - <echo>Installing ${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name} to ${nightly.publish}</echo> - <echo>Hopefully you have permissions for the copy operation with SSH.</echo> - - <!-- Copy the linux installation package and the JAR. --> - <exec executable="scp" searchpath="true" resultproperty="nightly.install.scp.result"> - <arg value="-B"/> - <arg value="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}"/> - <arg value="${nightly.publish}"/> - </exec> - - <echo>Result: ${nightly.install.scp.result}</echo> - </target> - - <!-- Copies the nightly build artifacts to the download server. --> - <target name="nightly-tests-publish" if="nightly.demo.publish" depends="internal-package-war"> - <fail unless="version.major" message="Major version must be defined in version.major"/> - <fail unless="version.minor" message="Major version must be defined in version.minor"/> - - - <!-- Publish to the demo server. --> - <property name="src" value="${result-path}/${test-war-filename}"/> - <property name="target" value="${nightly.demo.publish}/${version.major}.${version.minor}-${build.tag}.war"/> - - <echo>Installing ${src} to ${target}</echo> - - <!-- Copy the linux installation package and the JAR. --> - <exec executable="scp" searchpath="true" resultproperty="nightly.demo.install.scp.result"> - <arg value="-B"/> - <arg value="${src}"/> - <arg value="${target}"/> - </exec> - - <echo>Result: ${nightly.install.scp.result}</echo> - </target> - - <target name="nightly-publish" depends="nightly-teamcity-publish, nightly-download-publish, nightly-tests-publish"> - </target> - - - <target name="nightly-maven-pom.xml"> - <echo>Creating pom.xml for nightly build</echo> - <property name="vaadin.version.maven" value="${version.major}.${version.minor}-SNAPSHOT" /> - <copy tofile="build/maven/pom.xml"> - <filterchain> - <expandproperties /> - <replacetokens begintoken="@" endtoken="@"> - <token key="MAVEN-VERSION" value="${vaadin.version.maven}" /> - </replacetokens> - </filterchain> - <fileset file="build/maven/pom-template.xml"/> - </copy> - </target> - - <target name="nightly-maven-publish" depends="nightly-maven-pom.xml"> - <property file="${gpg.passphrase.file}" /> - - <echo>Publishing ${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name} to Maven repository</echo> - <artifact:mvn failonerror="true"> - <arg value="gpg:sign-and-deploy-file"/> - <!-- .. is a workaround as maven runs in the build directory --> - <sysproperty key="file" value="../${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" /> - <sysproperty key="pomFile" value="maven/pom.xml" /> - <sysproperty key="repositoryId" value="vaadin-snapshots" /> - <sysproperty key="url" value="${snapshot.repository.url}" /> - <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" /> - </artifact:mvn> - </target> - - <target name="local-maven-pom.xml"> - <echo>Creating pom.xml for local test build</echo> - <fail unless="version.major" message="Major version must be defined in version.major"/> - <fail unless="version.minor" message="Major version must be defined in version.minor"/> - <property name="vaadin.version.maven" value="${version.major}.${version.minor}" /> - <copy tofile="build/maven/pom.xml"> - <filterchain> - <expandproperties /> - <replacetokens begintoken="@" endtoken="@"> - <token key="MAVEN-VERSION" value="${vaadin.version.maven}" /> - </replacetokens> - </filterchain> - <fileset file="build/maven/pom-template.xml"/> - </copy> - </target> - - <target name="local-maven-publish" depends="local-maven-pom.xml"> - <echo>Publishing ${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name} to the local Maven repository</echo> - <artifact:mvn> - <arg value="install:install-file"/> - <!-- .. is a workaround as maven runs in the build directory --> - <sysproperty key="file" value="../${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" /> - <sysproperty key="pomFile" value="maven/pom.xml" /> - </artifact:mvn> - </target> - - <!-- ================================================================== --> - <!-- Automated tests. --> - <!-- ================================================================== --> - - <target name="tests" depends="compile-tests, internal-package-war"> - <!-- Run all different types of tests in parallel to decrease testing time --> - <parallel threadcount="3"> - <sequential> - <!-- Sleep before running integration tests so testbench tests have time to compile and start --> - <sleep minutes="4" /> - <antcall inheritrefs="true" inheritall="true" target="integration-tests"></antcall> - </sequential> - <antcall inheritrefs="true" inheritall="true" target="testbench-tests"></antcall> - <antcall inheritrefs="true" inheritall="true" target="server-side-tests"></antcall> - <antcall inheritrefs="true" inheritall="true" target="theme-compiler-tests"></antcall> - </parallel> - </target> - - <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task--> - <target name="server-side-tests" unless="tests.serverside.skip" depends="compile-tests"> - <junit printsummary="yes"> - <classpath> - <pathelement path="${result-classes-server}" /> - <pathelement path="${result-classes-shared}" /> - <pathelement path="${result-classes-junit}" /> - <path refid="compile.classpath.server-tests"></path> - </classpath> - - <batchtest fork="yes"> - <fileset dir="server/tests/src" includes="**/*.java" excludes="**/Abstract*.java,com/vaadin/tests/data/bean/*.java,com/vaadin/tests/util/*.java,**/VaadinClasses.java" /> - <fileset dir="client/tests/src" includes="**/*.java" excludes="**/Abstract*.java" /> - </batchtest> - </junit> - </target> - - <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task--> - <target name="theme-compiler-tests" unless="tests.serverside.skip" depends="compile-tests"> - <junit printsummary="yes"> - <classpath> - <pathelement path="${result-src-theme-compiler-junit}" /> - <pathelement path="${result-classes-theme-compiler}" /> - <pathelement path="${result-classes-theme-compiler-junit}" /> - <path refid="compile.classpath.server-tests"></path> - </classpath> - - <batchtest fork="yes"> - <fileset dir="${result-src-theme-compiler-junit}" includes="**/*.java" excludes="**/Abstract*.java" /> - </batchtest> - </junit> - </target> - - <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task--> - <target name="testbench-tests" unless="tests.testbench.skip"> - <fail unless="product-file" message="The 'product-file' property must be defined."/> - <fail unless="version" message="The 'version' property must be defined."/> - - <echo>Version: ${version.full}</echo> - - <!-- Parameters for the test.xml script. --> - <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined."/> - <fail unless="com.vaadin.testbench.deployment.url" message="The 'com.vaadin.testbench.deployment.url' property must be defined."/> - <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined."/> - - <property name="com.vaadin.testbench.screenshot.block.error" value="0.025"/> - <property name="com.vaadin.testbench.debug" value="false"/> - <property name="package.name" value="${base-name}"/> - - <!-- Only Linux tests allowed. TODO: Generalize this. --> - <property name="package.filename" value="${result-path}/${test-war-filename}"/> - - <!-- Run the separate test script. --> - <ant antfile="uitest/test.xml" target="test-package" inheritall="false" inheritrefs="true"> - <!-- This is provided so that the test script can copy the --> - <!-- "tests" classes after unpacking the package. --> - <property name="output-dir" value="${output-dir}"/> - - <!-- Convert tests to run multiple times if failed. --> - <property name="retries" value="2"/> - - <property name="package.filename" value="${basedir}/${package.filename}"/> - <property name="testing.testarea" value="/tmp/testarea"/> - <property name="package.name" value="${package.name}"/> - <property name="test-output-dir" value="../build/test-output" /> - <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}"/> - <property name="com.vaadin.testbench.deployment.url" value="${com.vaadin.testbench.deployment.url}"/> - <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}"/> - <property name="com.vaadin.testbench.debug" value="${com.vaadin.testbench.debug}"/> - <property name="com.vaadin.testbench.screenshot.block.error" value="${com.vaadin.testbench.screenshot.block.error}"/> - - <property name="deps.initialized" value="${deps.initialized}"/> - - </ant> - - </target> - - <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task--> - <target name="integration-tests" depends="init-deps" unless="tests.integration.skip"> - <!-- Parameters for the test.xml script. --> - <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined."/> - <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined."/> - <fail unless="sshkey.file" message="The 'sshkey.file' property must be defined."/> - - <!-- Empty passphrase if no passphrase defined --> - <property name="passphrase" value="" /> - <property name="tests.war" location="${result-path}/${test-war-filename}" /> - - <!-- Run the separate test script. --> - <ant antfile="uitest/integration_tests.xml" target="integration-test-all" inheritall="false" inheritrefs="true"> - <!-- This is provided so that the test script can copy the --> - <!-- "tests" classes after unpacking the package. --> - <property name="output-dir" value="${output-dir}"/> - - <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}"/> - <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}"/> - <property name="sshkey.file" value="${sshkey.file}" /> - <property name="passphrase" value="${passphrase}" /> - <property name="demo.war" value="${tests.war}"/> - - <property name="deps.initialized" value="${deps.initialized}"/> - </ant> - </target> - -</project> - -<!-- These are for emacs. --> -<!-- Keep this comment at the end of the file -Local variables: -mode: xml -sgml-omittag:nil -sgml-shorttag:nil -sgml-namecase-general:nil -sgml-general-insert-case:lower -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:4 -sgml-indent-data:t -sgml-parent-document:nil -sgml-exposed-tags:nil -sgml-local-catalogs:("/etc/sgml/catalog" "/usr/share/xemacs21/xemacs-packages/etc/psgml-dtds/CATALOG") -sgml-local-ecat-files:("ECAT" "~/sgml/ECAT" "/usr/share/sgml/ECAT" "/usr/local/share/sgml/ECAT" "/usr/local/lib/sgml/ECAT") -End: ---> |