summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/GWT-VERSION.properties2
-rw-r--r--build/VERSION.properties1
-rw-r--r--build/bin/package-diff.py2
-rw-r--r--build/build.properties7
-rw-r--r--build/build.xml760
-rw-r--r--build/buildhelpers/com/vaadin/buildhelpers/CompileDefaultTheme.java198
-rw-r--r--build/buildhelpers/com/vaadin/buildhelpers/GeneratePackageExports.java68
-rw-r--r--build/common.xml60
-rw-r--r--build/ivy/buildhelpers-ivy.xml19
-rw-r--r--build/ivy/ivy.xml56
-rw-r--r--build/ivy/ivysettings.xml24
-rw-r--r--build/ivy/module/smartsprites-ivy-0.2.3-itmill.xml38
-rw-r--r--build/javadoc/j2se-1.6.0/package-list (renamed from build/javadoc/j2se-1.5.0/package-list)39
13 files changed, 849 insertions, 425 deletions
diff --git a/build/GWT-VERSION.properties b/build/GWT-VERSION.properties
new file mode 100644
index 0000000000..e5bb635e01
--- /dev/null
+++ b/build/GWT-VERSION.properties
@@ -0,0 +1,2 @@
+gwt-version=2.5.0
+gwt-version-dependencies=validation-api-1.0.0.GA.jar, validation-api-1.0.0.GA-sources.jar
diff --git a/build/VERSION.properties b/build/VERSION.properties
new file mode 100644
index 0000000000..ce706c5d02
--- /dev/null
+++ b/build/VERSION.properties
@@ -0,0 +1 @@
+version=7.0.0 \ No newline at end of file
diff --git a/build/bin/package-diff.py b/build/bin/package-diff.py
index f926ea46f4..27f1ade771 100644
--- a/build/bin/package-diff.py
+++ b/build/bin/package-diff.py
@@ -56,7 +56,7 @@ def listJarFiles(jarfile):
# JAPI - Java API Differences
################################################################################
def japize(version, jarfile):
- cmd = "%s as %s apis %s +com.vaadin, $JAVA_HOME/jre/lib/rt.jar lib/core/**/*.jar 2>/dev/null" % (JAPIZE, version, jarfile)
+ cmd = "%s as %s apis %s +com.vaadin, $JAVA_HOME/jre/lib/rt.jar 2>/dev/null" % (JAPIZE, version, jarfile)
command (cmd)
return "%s.japi.gz" % (version)
diff --git a/build/build.properties b/build/build.properties
index 9e126a4479..0260cc54a9 100644
--- a/build/build.properties
+++ b/build/build.properties
@@ -4,16 +4,15 @@ product-file=vaadin
product-name=Vaadin
vaadin-package=com/vaadin
gwt-dir=lib/core/gwt
+required.java.version=1.6
# repository into which Maven snapshots should be published
snapshot.repository.url=http://oss.sonatype.org/content/repositories/vaadin-snapshots
# These are required when compiling WebContent/VAADIN/widgetsets (and also
# Java server-side classes).
-# Using special -noservlet packages to be able to use a different version of
-# the servlet specification than what the GWT JARs include.
-lib-gwt-dev=${gwt-dir}/gwt-dev-noservlet.jar
-lib-gwt-user=${gwt-dir}/gwt-user-noservlet.jar
+lib-gwt-dev=${gwt-dir}/gwt-dev.jar
+lib-gwt-user=${gwt-dir}/gwt-user.jar
# FIXME: Should use ${gwt-version-dependencies}
lib-gwt-validation=${gwt-dir}/validation-api-1.0.0.GA.jar
lib-gwt-validation-src=${gwt-dir}/validation-api-1.0.0.GA-sources.jar
diff --git a/build/build.xml b/build/build.xml
index 4f267c333d..2988218c4d 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -2,9 +2,14 @@
<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>
@@ -17,33 +22,82 @@
<target name="package-liferay-zip" depends="clean-result, init, build, internal-package-liferay">
</target>
-
- <!-- Locations of Ant task JARs - build properties not yet read at this point -->
- <property name="ant.task.jar.antcontrib" value="build/lib/ant-contrib-1.0b3.jar" />
- <property name="ant.task.jar.maven" value="build/lib/maven-ant-tasks-2.0.10.jar" />
-
- <path id="emma.lib" >
- <pathelement location="build/lib/emma_ant.jar" />
- <pathelement location="build/lib/emma-2.0.5312-patched.jar" />
- </path>
- <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
-
- <!-- ant contrib required for flow control (for loop, if, property override) -->
- <!-- Note that we have to use a namespace to avoid clash when running sub-ant. -->
- <taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <pathelement location="${ant.task.jar.antcontrib}" />
- </classpath>
- </taskdef>
-
- <!-- ant contrib for Maven integration -->
- <path id="maven-ant-tasks.classpath" path="${ant.task.jar.maven}" />
- <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
- uri="antlib:org.apache.maven.artifact.ant"
- classpathref="maven-ant-tasks.classpath" />
+ <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.sass">
+ <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">
@@ -51,25 +105,58 @@
<delete dir="${result-path}" includes="**/*" followsymlinks="false" defaultexcludes="false" includeemptydirs="true" failonerror="false"/>
</target>
- <target name="build.properties">
+ <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-core" value="${result-path}/src/core"/>
+ <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-classes-core" value="${result-path}/classes/core"/>
+ <property name="result-src-sass" value="${result-path}/src/sass"/>
+ <property name="result-src-sass-junit" value="${result-path}/src/sass-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"/>
- <!-- Folder where Emma instrumented classes are placed (if Emma is used)-->
- <property name="result-classes-core-for-emma-war" value="${result-path}/classes/emma-war"/>
- <property name="result-classes-core-for-emma-junit" value="${result-path}/classes/emma-junit"/>
-
+ <property name="result-classes-sass" value="${result-path}/classes/sass"/>
+ <property name="result-classes-sass-junit" value="${result-path}/classes/sass-junit"/>
+ <property name="result-precompiled-widgetsets" value="${result-path}/classes/widgetsets"/>
+
+ <!-- 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>
<!-- ================================================================== -->
@@ -80,31 +167,19 @@
<target name="check-java-version">
<condition property="java.version.matches">
<or>
- <equals arg1="${ant.java.version}" arg2="1.5"/>
+ <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 1.5 compiler. Use -Dignoreversion=1 for ant to ignore the version check."/>
+ <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>
- <!-- Check Servlet API version. -->
- <!-- We must use Servlet API 2.3 to catch incompatibilities.. -->
- <target name="check-servlet-version">
- <available classpathref="compile.classpath" classname="javax.servlet.Servlet" property="servlet.available"/>
- <fail unless="servlet.available" message="Java Servlet API library is not available."/>
- <echo>Java Servlet API is available.</echo>
-
- <available classpathref="compile.classpath" classname="javax.servlet.ServletRequestListener" property="servlet.version.is-2.4"/>
- <fail if="servlet.version.is-2.4" message="Java Servlet API 2.4 or later detected. Vaadin must be compiled exactly with Servlet API 2.3."/>
- <echo>Java Servlet API specification 2.3 used.</echo>
- </target>
-
<!-- ================================================================== -->
<!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- ================================================================== -->
- <target name="init" depends="check-java-version, build.properties">
+ <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"/>
@@ -131,11 +206,6 @@
<!-- Create result dir unless already exists -->
<mkdir dir="${result-path}" />
- <!-- Create dirs that might be used by the test coverage generation -->
- <mkdir dir="${result-classes-core-for-emma-war}" />
- <mkdir dir="${result-classes-core-for-emma-junit}" />
- <mkdir dir="${result-path}/coverage" />
-
<echo>We are using gwt version ${gwt-version}.</echo>
<!-- Destination files -->
@@ -157,8 +227,15 @@
<!-- 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="sass-src" value="sass/src" />
+ <property name="sass-classes" value="${result-classes-sass}" />
- <!-- Create Output Directory Hierarchy -->
+ <!-- Create Output Directory Hierarchy -->
<mkdir dir="${output-dir}/WebContent" />
<mkdir dir="${output-dir}/WebContent/demo" />
<mkdir dir="${output-dir}/WebContent/docs" />
@@ -167,31 +244,6 @@
<mkdir dir="${output-dir}/WebContent/WEB-INF" />
<mkdir dir="${output-dir}/WebContent/WEB-INF/lib" />
<mkdir dir="${output-dir}/WebContent/WEB-INF/classes" />
-
- <!-- Construct classpath used by java and javadoc compilation -->
- <path id="compile.classpath">
- <pathelement path="build/lib/servlet.jar" />
- <fileset dir="lib/core">
- <include name="**/*.jar"/>
-
- <!-- Exclude these as they contain Servlet API 2.4. -->
- <!-- The gwt-*-noservlet.jar are then used instead. -->
- <exclude name="**/servlet-api*.jar"/>
- <exclude name="**/gwt-dev.jar"/>
- <exclude name="**/gwt-user.jar"/>
- </fileset>
- <fileset dir="lib/tests">
- <include name="**/*.jar"/>
- </fileset>
- </path>
- <path id="compile.classpath.server-side">
- <path refid="compile.classpath"/>
- </path>
- <path id="compile.classpath.client-side">
- <path refid="compile.classpath"/>
- <pathelement path="${lib-gwt-user}" />
- <pathelement path="${lib-gwt-dev}" />
- </path>
</target>
<target name="internal-package-war">
@@ -203,10 +255,9 @@
<include name="${vaadin-package}/tests/**/*" />
<include name="${vaadin-package}/launcher/**" />
</fileset>
- <fileset dir="${result-classes-junit}">
- <!-- VaadinClasses is used by both JUnit and TestBench tests -->
- <include name="**/VaadinClasses*.class" />
- </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="tests/testbench">
<include name="${vaadin-package}/tests/**/*" />
@@ -226,6 +277,7 @@
<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/**/*" />
@@ -264,7 +316,11 @@
<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>
@@ -280,7 +336,7 @@
description="Build package required files, without packing them.">
</target>
- <target name="compile-server-side" depends="compile-core, webcontent"/>
+ <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
@@ -289,17 +345,20 @@
<!--
Source directories in the project are
* src (Vaadin core)
+ * sass/src (SASS compiler)
* tests/testbench (TestBench test cases)
* tests/server-side (Server-side JUnit test cases)
* tests/client-side (Client-side JUnit test cases)
These are copied to
* ${result-path}/src/core
+ * ${result-path}/src/sass
* ${result-path}/src/tests
* ${result-path}/src/junit
And compiled to
* ${result-path}/classes/core
+ * ${result-path}/classes/sass
* ${result-path}/classes/tests
* ${result-path}/classes/junit
@@ -310,9 +369,14 @@
<loadfile property="VaadinApache2LicenseForJavaFiles" srcFile="build/VaadinApache2LicenseForJavaFiles.txt" />
<mkdir dir="${result-path}/src" />
- <mkdir dir="${result-src-core}" />
+ <mkdir dir="${result-src-sass}/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-sass-junit}" />
<patternset id="preprocessable-files">
<include name="**/*.java" />
@@ -339,10 +403,39 @@
<echo>Copying src directory and processing copied files.</echo>
<echo>Replacing &lt;version&gt; tag with build version for java/html/css/xml files.</echo>
- <copy todir="${result-src-core}" overwrite="yes">
+ <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="src">
+ <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-sass}" overwrite="yes">
+ <filterset refid="version-and-license"/>
+ <filterset refid="pre-css-style"/>
+ <fileset dir="sass/src">
<patternset refid="preprocessable-files" />
</fileset>
</copy>
@@ -362,15 +455,41 @@
<patternset refid="preprocessable-files" />
</fileset>
</copy>
+ <copy todir="${result-src-sass-junit}">
+ <filterset refid="version-and-license"/>
+ <fileset dir="tests/sass/src">
+ <patternset refid="preprocessable-files" />
+ </fileset>
+ </copy>
- <!-- Unify mix usage of mac/Linux/Win characters -->
- <echo>Unifying mix usage of Mac/Linux/Win linefeeds for java/html/css/xml files.</echo>
- <fixcrlf srcdir="${result-path}/src" eol="crlf" tablength="4" tab="asis" includes="**/*.java **/*.html **/*.css **/*.xml" />
-
<!-- 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-core}">
- <fileset dir="src">
+ <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-sass}">
+ <fileset dir="${sass-src}">
<patternset refid="non-preprocessable-files" />
</fileset>
</copy>
@@ -387,6 +506,14 @@
<patternset refid="non-preprocessable-files" />
</fileset>
</copy>
+ <copy todir="${result-src-sass-junit}">
+ <fileset dir="tests/sass/src">
+ <patternset refid="non-preprocessable-files" />
+ </fileset>
+ <fileset dir="tests/sass/resources">
+ <!-- test resources (files to compile and compare etc.) -->
+ </fileset>
+ </copy>
</target>
@@ -395,29 +522,26 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="webcontent" depends="preprocess-src,defaulttheme">
- <!-- copy 3rd part libraries used by tests -->
- <copy todir="${output-dir}/WebContent/tests/lib">
- <fileset dir="lib/core">
- <include name="jetty/**/*" />
- </fileset>
- <fileset dir="build/lib">
- <include name="emma-2.0.5312-patched.jar" />
- </fileset>
- </copy>
-
<!-- Add WebContent -->
<echo>Adding VAADIN/themes and META-INF</echo>
<copy todir="${output-dir}/WebContent">
<fileset dir="WebContent">
<exclude name="**/.svn" />
- <!-- TODO check what is necessary -->
<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">
@@ -454,49 +578,108 @@
</copy>
</target>
- <target name="compile-core" depends="init, preprocess-src">
- <echo>Compiling src (server-side)</echo>
+ <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-core}" />
- <javac source="1.5" target="1.5" classpathref="compile.classpath.server-side" destdir="${result-classes-core}" debug="true" encoding="UTF-8" includeantruntime="false">
- <src path="${result-src-core}"/>
+ <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-tests" depends="compile-core">
+ <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-sass">
<echo>Compiling src (Server and client side JUnit tests)</echo>
<!-- Compile server and client side JUnit tests -->
<mkdir dir="${result-classes-junit}" />
- <javac source="1.5" target="1.5" classpathref="compile.classpath.server-side" destdir="${result-classes-junit}" debug="true" encoding="UTF-8" includeantruntime="false">
- <classpath path="${result-classes-core}"></classpath>
+ <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-sass-junit}" />
+ <javac source="${required.java.version}" target="${required.java.version}" classpathref="compile.classpath.server-tests" destdir="${result-classes-sass-junit}" debug="true" encoding="UTF-8" includeantruntime="false">
+ <classpath path="${result-classes-sass}"></classpath>
+ <src path="${result-src-sass-junit}"/>
+ </javac>
+
<echo>Compiling src (TestBench tests)</echo>
<!-- Compile TestBench tests -->
<mkdir dir="${result-classes-testbench}" />
- <javac source="1.5" target="1.5" classpathref="compile.classpath.server-side" destdir="${result-classes-testbench}" debug="true" encoding="UTF-8" includeantruntime="false">
+ <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-core}"></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">
- <javac source="1.5" target="1.5" srcdir="build/buildhelpers" classpath="build/smartsprites/lib/smartsprites-0.2.3-itmill.jar" includeantruntime="false"/>
+ <target name="compile-helpers" depends="init, compile-sass">
+ <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-sass}" />
+
+ <src path="${buildhelpers-src}"/>
+ </javac>
</target>
- <target name="defaulttheme" depends="init, compile-helpers">
+ <target name="compile-sass" depends="init, preprocess-src">
+ <!-- TODO also perform javacc compilation of the parser -->
+ <mkdir dir="${result-classes-sass}" />
+ <javac source="${required.java.version}" target="${required.java.version}" includeantruntime="false" srcdir="${result-src-sass}"
+ classpathref="compile.classpath.sass" destdir="${result-classes-sass}" debug="true" encoding="UTF-8" />
+ </target>
+
+ <target name="defaulttheme" depends="init, compile-sass, 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>
- <pathelement location="build/buildhelpers" />
- <fileset dir="build/smartsprites/lib">
- <include name="*.jar"/>
- </fileset>
+ <!-- SASS -->
+ <path path="${result-classes-sass}" />
+ <path location="${buildhelpers-classes}" />
+ <path refid="compile.classpath.buildhelpers" />
</classpath>
<jvmarg value="-Djava.awt.headless=true"/>
</java>
@@ -528,40 +711,51 @@
</target>
<!-- The widgetset generator is currently compiled along with rest of server-side Java. -->
- <target name="compile-widgetset-generator" depends="compile-core"/>
-
+ <target name="compile-widgetset-generator" depends="compile-server,compile-client, compile-client-compiler"/>
- <path id="widgetset-compile-classpath">
- <pathelement location="${lib-gwt-user}" />
- <pathelement location="${lib-gwt-dev}" />
- <pathelement location="${lib-gwt-validation}" />
- <pathelement location="${lib-gwt-validation-src}" />
- <pathelement location="${result-classes-core}" />
- <pathelement location="${result-src-core}" />
- </path>
-
- <target name="compile-widgetset" description="Compiles the widgetset given as the first parameter">
+ <!-- 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="4" />
+ <property name="widgetset-localWorkers" value="2" />
<property name="widgetset-extraParams" value="" />
<echo>Compiling widgetset ${widgetset}. Output directory: ${widgetsets-output-dir}</echo>
- <java classname="com.google.gwt.dev.Compiler" failonerror="yes" fork="yes" maxmemory="512m">
- <classpath refid="widgetset-compile-classpath"/>
-
+ <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 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>
@@ -569,12 +763,27 @@
<target name="compile-widgetset-default">
<antcall target="compile-widgetset">
+ <reference refid="compile.classpath.widgetset" />
<param name="widgetset" value="com.vaadin.terminal.gwt.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>
@@ -582,11 +791,12 @@
<!-- 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-server-side">
+ <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 target="compile-widgetset-default"/>
- <antcall target="compile-widgetset-portal-default"/>
+ <antcall inheritrefs="true" target="compile-widgetset-default"/>
+ <antcall inheritrefs="true" target="compile-widgetset-testing"/>
+ <antcall inheritrefs="true" target="compile-widgetset-portal-default"/>
</parallel>
</target>
@@ -595,7 +805,7 @@
<!-- Definitions for building the client-side. -->
<property name="widgetsets-output-dir" value="WebContent/VAADIN/widgetsets" />
- <echo>We are using ${lib-gwt-dev}.</echo>
+ <echo>We are using ${gwt.dev.jar}.</echo>
<echo>Widget sets output dir: ${widgetsets-output-dir}</echo>
</target>
@@ -603,13 +813,31 @@
<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-widgetset-generator, compile-widgetset-default"/>
- <target name="widgetset-portal-default" depends="init-nonpackage, init, compile-widgetset-generator, compile-widgetset-portal-default"/>
+ <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 -->
@@ -620,22 +848,9 @@
<!-- Create Vaadin JAR -->
<mkdir dir="${output-dir}/META-INF"/>
<echo file="${output-dir}/META-INF/VERSION">${version.full}</echo>
- <echo file="${output-dir}/META-INF/GWT-VERSION">${gwt-version}</echo>
- <emma enabled="${emma.enabled}" >
- <instr instrpath="${result-classes-core}"
- destdir="${result-classes-core-for-emma-war}"
- mode="copy"
- metadatafile="${result-path}/war.es"
- merge="false"
- >
- <filter includes="com.vaadin.*" />
- <filter excludes="com.vaadin.terminal.gwt.*" />
- </instr>
- </emma>
-
- <jar jarfile="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}"
- compress="true" manifest="build/package/META-INF/MANIFEST.MF" duplicate="preserve">
+ <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" />
@@ -643,15 +858,22 @@
<attribute name="Implementation-Vendor" value="Vaadin Ltd" />
<attribute name="Implementation-URL" value="http://vaadin.com" />
<attribute name="Implementation-Version" value="${version.full}" />
- <attribute name="GWT-Version" value="${gwt-version}" />
+ <!-- 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>
- <!-- Include any instrumented class files before the normal classes -->
- <fileset dir="${result-classes-core-for-emma-war}" />
- <fileset dir="${result-classes-core}"/>
+ <fileset dir="${result-classes-server}"/>
+ <fileset dir="${result-classes-client}"/>
+ <fileset dir="${result-classes-shared}"/>
+ <fileset dir="${result-classes-sass}"/>
+ <fileset dir="${result-classes-client-compiler}"/>
<!-- add sources -->
- <fileset dir="${result-src-core}"/>
+ <fileset dir="${result-src-server}"/>
+ <fileset dir="${result-src-client}"/>
+ <fileset dir="${result-src-shared}"/>
+ <fileset dir="${result-src-sass}"/>
+ <fileset dir="${result-src-client-compiler}"/>
<fileset dir="${output-dir}/WebContent">
<patternset>
<include name="VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/**/*" />
@@ -660,6 +882,7 @@
<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" />
@@ -667,13 +890,97 @@
<include name="img/**" />
</patternset>
</fileset>
- </jar>
+
+ <!-- Precompiled widgetset (.gwtar file) not included to limit JAR size -->
+ <!-- <fileset dir="${result-precompiled-widgetsets}" includes="com/vaadin/terminal.gwt.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/**" />
+
+ <!-- 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="build/buildhelpers" />
+ <pathelement location="${buildhelpers-classes}" />
</classpath>
</java>
@@ -682,7 +989,22 @@
<target name="vaadin-sources.jar" depends="init">
<jar file="${result-path}/${lib-sources-jar-name}" compress="true">
- <fileset dir="${result-src-core}">
+ <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-sass}">
<patternset>
<include name="**/*.java" />
</patternset>
@@ -708,12 +1030,14 @@
<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-side">
- <packageset dir="${result-src-core}"/>
+ <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://java.sun.com/j2se/1.5.0/docs/api/" packagelistLoc="build/javadoc/j2se-1.5.0" />
+ <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>
@@ -818,7 +1142,7 @@
<tstamp>
<format property="nightly.date" pattern="yyyyMMdd"/>
</tstamp>
- <property name="version.full" value="${version}.${build.tag}-${nightly.date}-c${build.number}"/>
+ <property name="version.full" value="${version}.${build.tag}-${nightly.date}-${build.number}"/>
<echo>Version will be: ${version.full}</echo>
@@ -838,14 +1162,10 @@
<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>
- <!-- FIXME tries to publish a ZIP; how does the download site handle these? -->
- <property name="package.filename" value="${result-path}/${base-name}.zip"/>
-
<!-- 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="${package.filename}"/>
<arg value="${nightly.publish}"/>
</exec>
@@ -947,67 +1267,41 @@
</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="sass-tests"></antcall>
</parallel>
-
- <!-- Create a combined report from each test's sub report -->
- <emma enabled="${emma.enabled}" >
- <merge file="${result-path}/combined.es">
- <fileset dir="${result-path}" >
- <include name="*.ec" />
- <include name="*.em" />
- </fileset>
- </merge>
- <report sourcepath="${result-src-core}" >
- <fileset dir="${result-path}" >
- <include name="combined.es" />
- </fileset>
-
- <txt outfile="../${result-path}/coverage/coverage-combined/coverage.txt" />
- <html outfile="../${result-path}/coverage/coverage-combined/coverage.html" />
- </report>
- </emma>
- <echo>##teamcity[publishArtifacts '${result-path}/coverage']</echo>
</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">
- <emma enabled="${emma.enabled}" >
- <instr instrpath="${result-classes-core}"
- destdir="${result-classes-core-for-emma-junit}"
- mode="copy"
- metadatafile="${result-path}/unittests.em"
- merge="false"
- >
- <filter includes="com.vaadin.*" />
- <filter excludes="com.vaadin.terminal.gwt.*" />
- </instr>
- </emma>
<junit printsummary="yes">
<classpath>
- <pathelement path="${result-classes-core-for-emma-junit}" />
- <pathelement path="${result-classes-core}" />
+ <pathelement path="${result-classes-server}" />
+ <pathelement path="${result-classes-shared}" />
<pathelement path="${result-classes-junit}" />
- <path refid="emma.lib" />
- <path refid="compile.classpath"/>
+ <path refid="compile.classpath.server-tests"></path>
</classpath>
- <jvmarg value="-Demma.coverage.out.file=../${result-path}/unittests.ec" />
<batchtest fork="yes">
- <fileset dir="tests/server-side" includes="**/*.java" excludes="**/Abstract*.java,**/VaadinClasses.java" />
+ <fileset dir="tests/server-side" includes="**/*.java" excludes="**/Abstract*.java,com/vaadin/tests/data/bean/*.java,com/vaadin/tests/util/*.java,**/VaadinClasses.java" />
<fileset dir="tests/client-side" includes="**/*.java" excludes="**/Abstract*.java" />
</batchtest>
</junit>
- <emma enabled="${emma.enabled}" >
- <report sourcepath="${result-src-core}" >
- <fileset dir="${result-path}" >
- <include name="unittests.*" />
- </fileset>
-
- <txt outfile="../${result-path}/coverage/coverage-unittests/unittests_coverage.txt" />
- <html outfile="../${result-path}/coverage/coverage-unittests/unittests_coverage.html" />
- </report>
- </emma>
- <echo>##teamcity[publishArtifacts '${result-path}/coverage']</echo>
+ </target>
+
+ <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task-->
+ <target name="sass-tests" unless="tests.serverside.skip" depends="compile-tests">
+ <junit printsummary="yes">
+ <classpath>
+ <pathelement path="${result-src-sass-junit}" />
+ <pathelement path="${result-classes-sass}" />
+ <pathelement path="${result-classes-sass-junit}" />
+ <path refid="compile.classpath.server-tests"></path>
+ </classpath>
+
+ <batchtest fork="yes">
+ <fileset dir="${result-src-sass-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-->
@@ -1037,8 +1331,8 @@
<!-- Convert tests to run multiple times if failed. -->
<property name="retries" value="2"/>
-
- <property name="package.filename" value="${package.filename}"/>
+
+ <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" />
@@ -1047,23 +1341,15 @@
<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>
- <emma enabled="${emma.enabled}" >
- <report sourcepath="${result-src-core}" >
- <fileset dir="${result-path}" >
- <include name="war.*" />
- </fileset>
-
- <txt outfile="../${result-path}/coverage/coverage-testbench/testbench_coverage.txt" />
- <html outfile="../${result-path}/coverage/coverage-testbench/testbench_coverage.html" />
- </report>
- </emma>
- <echo>##teamcity[publishArtifacts '${result-path}/coverage/']</echo>
</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" unless="tests.integration.skip">
+ <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."/>
@@ -1084,6 +1370,8 @@
<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>
diff --git a/build/buildhelpers/com/vaadin/buildhelpers/CompileDefaultTheme.java b/build/buildhelpers/com/vaadin/buildhelpers/CompileDefaultTheme.java
index 15d2acf6e9..45079ac21f 100644
--- a/build/buildhelpers/com/vaadin/buildhelpers/CompileDefaultTheme.java
+++ b/build/buildhelpers/com/vaadin/buildhelpers/CompileDefaultTheme.java
@@ -1,21 +1,16 @@
package com.vaadin.buildhelpers;
-import java.io.BufferedReader;
import java.io.BufferedWriter;
-import java.io.DataInputStream;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.Arrays;
-import java.util.Comparator;
+
+import com.vaadin.sass.ScssStylesheet;
/**
- * Helper to combine css divded into separate per component dirs into one to
+ * Helper to combine css divided into separate per component dirs into one to
* optimize http requests.
- *
*/
public class CompileDefaultTheme {
@@ -42,79 +37,66 @@ public class CompileDefaultTheme {
break;
}
}
+
+ for (String themeName : new String[] { BASE, RUNO, LIFERAY, CHAMELEON }) {
+ try {
+ processSassTheme(themeName, false, ver);
+ System.out.println("Compiling theme " + themeName
+ + " successful");
+ } catch (Exception e) {
+ System.err.println("Compiling theme " + themeName + " failed");
+ e.printStackTrace();
+ }
+ }
+
// Compile Reindeer last, since it requires the spriting operation
// (makes testing the other themes a bit faster, since you don't need to
// wait for the spriting operation to finish before the theme CSS is
// compiled)
- combineTheme(new String[] { BASE }, false, ver);
- combineTheme(new String[] { BASE, RUNO }, false, ver);
- combineTheme(new String[] { BASE, LIFERAY }, false, ver);
- combineTheme(new String[] { BASE, CHAMELEON }, false, ver);
- combineTheme(new String[] { BASE, REINDEER }, true, ver);
+ for (String themeName : new String[] { REINDEER }) {
+ try {
+ processSassTheme(themeName, true, ver);
+ System.out.println("Compiling theme " + themeName
+ + " successful");
+ } catch (Exception e) {
+ System.err.println("Compiling theme " + themeName + " failed");
+ e.printStackTrace();
+ }
+ }
}
- /**
- *
- * @param themeNames
- * All themes that should be combined together (to include
- * inheritance). The order is the same in which the styles are
- * catenated. The resulted file is placed in the last specified
- * theme folder.
- *
- * @param
- * @throws IOException
- */
- private static void combineTheme(String[] themeNames,
- boolean useSmartSprites, String version) throws IOException {
+ private static void processSassTheme(String themeName,
+ boolean useSmartSprites, String version) throws Exception {
- StringBuffer combinedCss = new StringBuffer();
+ StringBuffer cssHeader = new StringBuffer();
// Theme version
if (version == null) {
version = "9.9.9.INTERNAL-DEBUG-BUILD";
}
version = version.replaceAll("\\.", "_");
- combinedCss.append(".v-theme-version:after {content:\"" + version
+ cssHeader.append(".v-theme-version:after {content:\"" + version
+ "\";}\n");
- combinedCss.append(".v-theme-version-" + version
- + " {display: none;}\n");
-
- for (int j = 0; j < themeNames.length; j++) {
- File f = new File(THEME_DIR + themeNames[j]);
- combinedCss
- .append("/* Automatically compiled css file from subdirectories. */\n");
-
- File[] subdir = f.listFiles();
- Arrays.sort(subdir, new Comparator<File>() {
- public int compare(File arg0, File arg1) {
- return arg0.compareTo(arg1);
- }
- });
-
- for (int i = 0; i < subdir.length; i++) {
- File dir = subdir[i];
- String folder = dir.getName();
- String filename = dir.getPath() + "/" + folder + ".css";
-
- processCSSFile(new File(filename), folder, themeNames[j],
- combinedCss, j < themeNames.length - 1);
- }
- }
+ cssHeader.append(".v-theme-version-" + version + " {display: none;}\n");
- String stylesCssDir = THEME_DIR + themeNames[themeNames.length - 1]
- + "/";
+ String stylesCssDir = THEME_DIR + themeName + "/";
String stylesCssName = stylesCssDir + "styles.css";
+ // Process as SASS file
+ File inputFile = new File(stylesCssDir + "styles.scss");
+ ScssStylesheet scss = ScssStylesheet.get(inputFile);
+ scss.compile();
+
BufferedWriter out = new BufferedWriter(new FileWriter(stylesCssName));
- out.write(combinedCss.toString());
+ out.write(cssHeader.toString());
+ out.write(scss.toString());
out.close();
- System.out.println("Compiled CSS to " + THEME_DIR
- + themeNames[themeNames.length - 1] + "/styles.css ("
- + combinedCss.toString().length() + " bytes)");
+ System.out.println("Compiled CSS to " + stylesCssName + " ("
+ + scss.toString().length() + " bytes)");
if (useSmartSprites) {
- createSprites(themeNames[themeNames.length - 1]);
+ createSprites(themeName);
System.out.println("Used SmartSprites to create sprites");
File oldCss = new File(stylesCssName);
oldCss.delete();
@@ -128,105 +110,11 @@ public class CompileDefaultTheme {
}
}
- private static void processCSSFile(File cssFile, String folder,
- String themeName, StringBuffer combinedCss, boolean inheritedFile)
- throws FileNotFoundException, IOException {
- if (cssFile.isFile()) {
-
- combinedCss.append("\n");
-
- FileInputStream fstream = new FileInputStream(cssFile);
- // Get the object of DataInputStream
- DataInputStream in = new DataInputStream(fstream);
- BufferedReader br = new BufferedReader(new InputStreamReader(in));
- String strLine;
- while ((strLine = br.readLine()) != null) {
-
- // Parse import rules
- if (strLine.startsWith("@import")) {
- // All import statements must be exactly
- // @import "file-to-import.css";
- // or
- // @import "subdir1[/subdir2]*/file-to-import.css"
- // ".." and other similar paths are not allowed in the url
- String importFilename = strLine.split("\"")[1];
-
- File importFile = new File(THEME_DIR + themeName + "/"
- + folder + "/" + importFilename);
- if (importFile.isFile()) {
- String currentFolder = folder;
- if (importFilename.contains("/")) {
- currentFolder = currentFolder
- + "/"
- + importFilename.substring(0,
- importFilename.lastIndexOf("/"));
- }
- processCSSFile(importFile, currentFolder, themeName,
- combinedCss, inheritedFile);
- } else {
- System.out
- .println("File not found for @import statement "
- + THEME_DIR
- + themeName
- + "/"
- + folder
- + "/" + importFilename);
- }
- }
-
- strLine = updateUrls(folder, themeName, inheritedFile, strLine);
-
- if (!strLine.startsWith("@import")) {
- combinedCss.append(strLine);
- combinedCss.append("\n");
- }
- }
- // Close the input stream
- in.close();
- }
- }
-
- private static String updateUrls(String folder, String themeName,
- boolean inheritedFile, String strLine) {
- // Define image url prefix
- String urlPrefix = "";
- if (inheritedFile) {
- urlPrefix = "../" + themeName + "/";
- }
-
- if (strLine.indexOf("url(/") > 0) {
- // Do nothing for urls beginning with /
- } else if (strLine.indexOf("url(../") >= 0) {
- // eliminate a path segment in the folder name for every
- // "../"
- String[] folderSegments = folder.split("/");
- int segmentCount = folderSegments.length;
- while (segmentCount > 0 && strLine.indexOf("url(../") >= 0) {
- segmentCount--;
- strLine = strLine.replaceAll("url\\(../", ("url\\("));
- }
- // add remaining path segments to urlPrefix
- StringBuilder sb = new StringBuilder(urlPrefix);
- for (int i = 0; i < segmentCount; i++) {
- sb.append(folderSegments[i]);
- sb.append("/");
- }
- strLine = strLine.replaceAll("url\\(", ("url\\(" + sb.toString()));
-
- } else {
- strLine = strLine.replaceAll("url\\(", ("url\\(" + urlPrefix
- + folder + "/"));
-
- }
- return strLine;
- }
-
private static void createSprites(String themeName)
throws FileNotFoundException, IOException {
String[] parameters = new String[] { "--sprite-png-depth", "AUTO",
- "--sprite-png-ie6", "--css-file-suffix", "-sprite",
- "--css-file-encoding", "UTF-8", "--root-dir-path",
- THEME_DIR + themeName, "--log-level", "WARN" };
+ "--css-file-suffix", "-sprite", "--css-file-encoding", "UTF-8",
+ "--root-dir-path", THEME_DIR + themeName, "--log-level", "WARN" };
org.carrot2.labs.smartsprites.SmartSprites.main(parameters);
diff --git a/build/buildhelpers/com/vaadin/buildhelpers/GeneratePackageExports.java b/build/buildhelpers/com/vaadin/buildhelpers/GeneratePackageExports.java
index 6f477601ed..0deebdc9a1 100644
--- a/build/buildhelpers/com/vaadin/buildhelpers/GeneratePackageExports.java
+++ b/build/buildhelpers/com/vaadin/buildhelpers/GeneratePackageExports.java
@@ -7,37 +7,40 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Vector;
import java.util.jar.Attributes;
+import java.util.jar.Attributes.Name;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
-import java.util.jar.Attributes.Name;
/**
* Generates Export-Packages attribute for OSGi compatible manifest.
*
* Reads the included Java packages in Vaadin JAR, generates a corresponding
- * MANIFEST.MF file, and replaces the dummy one in the JAR with the
- * generated one.
+ * MANIFEST.MF file, and replaces the dummy one in the JAR with the generated
+ * one.
*
* See #3521 for details.
*
* @author magi
*/
public class GeneratePackageExports {
+ public static final String VAADIN_PACKAGE_PATH_PREFIX = "com/vaadin/";
+ public static final String GOOGLE_PACKAGE_PATH_PREFIX = "com/google/";
+
public static void main(String[] args) {
if (args.length < 1) {
- System.err.println("Invalid number of parameters\n"+
- "Usage: java -cp .. GenerateManifest <package.jar>");
+ System.err.println("Invalid number of parameters\n"
+ + "Usage: java -cp .. GenerateManifest <package.jar>");
System.exit(1);
}
- // Open tje JAR
+ // Open the JAR
String jarFilename = args[0];
JarFile jar = null;
try {
jar = new JarFile(jarFilename);
} catch (IOException e) {
- System.err.println("Unable to open JAR '"+jarFilename+"'");
+ System.err.println("Unable to open JAR '" + jarFilename + "'");
System.exit(1);
}
@@ -45,9 +48,12 @@ public class GeneratePackageExports {
HashSet<String> packages = new HashSet<String>();
for (Enumeration<JarEntry> it = jar.entries(); it.hasMoreElements();) {
JarEntry entry = it.nextElement();
- if (entry.getName().startsWith("com") && entry.getName().endsWith(".class")) {
+ if ((entry.getName().startsWith(VAADIN_PACKAGE_PATH_PREFIX) || entry
+ .getName().startsWith(GOOGLE_PACKAGE_PATH_PREFIX))
+ && entry.getName().endsWith(".class")) {
int lastSlash = entry.getName().lastIndexOf('/');
- String pkg = entry.getName().substring(0, lastSlash).replace('/', '.');
+ String pkg = entry.getName().substring(0, lastSlash)
+ .replace('/', '.');
packages.add(pkg);
}
}
@@ -55,14 +61,16 @@ public class GeneratePackageExports {
// List theme packages
for (Enumeration<JarEntry> it = jar.entries(); it.hasMoreElements();) {
JarEntry entry = it.nextElement();
- if (entry.isDirectory() && entry.getName().startsWith("VAADIN/themes")) {
+ if (entry.isDirectory()
+ && entry.getName().startsWith("VAADIN/themes")) {
// Strip ending slash
int lastSlash = entry.getName().lastIndexOf('/');
- String pkg = entry.getName().substring(0, lastSlash).replace('/', '.');
+ String pkg = entry.getName().substring(0, lastSlash)
+ .replace('/', '.');
packages.add(pkg);
}
}
-
+
// Replacement for the "Export-Package" attribute in the manifest
String exportPackage = "";
@@ -70,13 +78,14 @@ public class GeneratePackageExports {
String packageArray[] = new String[packages.size()];
packages.toArray(packageArray);
Arrays.sort(packageArray);
- for (int i=0; i<packageArray.length; i++) {
- if (i == 0)
+ for (int i = 0; i < packageArray.length; i++) {
+ if (i == 0) {
exportPackage = packageArray[i];
- else
+ } else {
exportPackage += ", " + packageArray[i];
+ }
}
-
+
// Read old manifest
Manifest oldMF = null;
try {
@@ -84,11 +93,12 @@ public class GeneratePackageExports {
} catch (IOException e) {
e.printStackTrace();
}
-
+
// Read main attributes
Attributes mainAtts = oldMF.getMainAttributes();
Vector<String> keys = new Vector<String>(mainAtts.size());
- for (Iterator<Object> attrit = mainAtts.keySet().iterator(); attrit.hasNext();) {
+ for (Iterator<Object> attrit = mainAtts.keySet().iterator(); attrit
+ .hasNext();) {
Name name = (Name) attrit.next();
keys.add(name.toString());
}
@@ -98,11 +108,11 @@ public class GeneratePackageExports {
try {
jar.close();
} catch (IOException e) {
- System.err.println("Unable to close JAR '"+jarFilename+"'");
+ System.err.println("Unable to close JAR '" + jarFilename + "'");
}
-
+
// Put the manifest version as the first line
- String orderedKeys[] = new String[keys.size()];
+ String orderedKeys[] = new String[keys.size()];
keys.toArray(orderedKeys);
Arrays.sort(orderedKeys); // Must sort to be able to search
int mvPos = Arrays.binarySearch(orderedKeys, "Manifest-Version");
@@ -110,20 +120,21 @@ public class GeneratePackageExports {
orderedKeys[0] = "Manifest-Version";
// This final ordering is just for esthetic reasons and
- // in practice unnecessary and will actually be messed up
+ // in practice unnecessary and will actually be messed up
// when the 'jar' command reads the manifest
- Arrays.sort(orderedKeys, 1, orderedKeys.length-1);
+ Arrays.sort(orderedKeys, 1, orderedKeys.length - 1);
// Create the modified manifest
ManifestWriter manifest = new ManifestWriter();
- for (int i=0; i<orderedKeys.length; i++) {
+ for (int i = 0; i < orderedKeys.length; i++) {
// Skip an existing Export-Package attribute
if (orderedKeys[i].equals("Export-Package")) {
// Copy the attribute to the modified manifest
- manifest.writeAttribute(orderedKeys[i], mainAtts.getValue(orderedKeys[i]));
+ manifest.writeAttribute(orderedKeys[i],
+ mainAtts.getValue(orderedKeys[i]));
}
}
-
+
// Add the Export-Package attribute at the end of the manifest.
// The alternative would be replacing an existing attribute in
// the loop above, but it's not guaranteed that it exists.
@@ -133,8 +144,9 @@ public class GeneratePackageExports {
// before this is done.
int status = manifest.updateJar(jarFilename);
- if (status != 0)
+ if (status != 0) {
System.exit(status);
+ }
}
-
+
}
diff --git a/build/common.xml b/build/common.xml
new file mode 100644
index 0000000000..1fc6349a46
--- /dev/null
+++ b/build/common.xml
@@ -0,0 +1,60 @@
+<?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="common"
+ basedir="../"
+ default="init-deps" >
+
+ <property name="ivy.install.version" value="2.2.0"/>
+ <property name="ivy.jar.name" value="ivy-${ivy.install.version}.jar"/>
+ <property name="ivy.jar.dir" value="${user.home}/.ant/lib" />
+ <property name="ivy.jar.file" value="${ivy.jar.dir}/${ivy.jar.name}" />
+
+ <target name="init-deps" description="Configure Ivy dependency management and load common task definitions"
+ depends="init-taskdefs" unless="deps.initialized">
+ <property name="deps.initialized" value="1" />
+ </target>
+
+ <target name="check-ivy-installed">
+ <available property="ivy.installed" file="${ivy.jar.file}"/>
+ <available property="ivy.installed" classname="org.apache.ivy.ant.IvyConfigure" />
+ <antcall target="common.ivy-download" />
+ </target>
+
+ <target name="ivy-download" unless="ivy.installed">
+ <mkdir dir="${ivy.jar.dir}"/>
+ <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.file}" usetimestamp="true"/>
+ </target>
+
+ <target name="ivy-configure" depends="check-ivy-installed" unless="deps.initialized">
+ <!-- Ivy task definitions -->
+ <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.jar.file}" />
+ <!-- Ivy settings -->
+ <property name="ivy.settings.file" value="${project.root}/build/ivy/ivysettings.xml" />
+ <ivy:configure/>
+ </target>
+
+ <target name="init-taskdefs" depends="ivy-configure" unless="deps.initialized">
+ <echo>Loading Ant tasks</echo>
+ <ivy:resolve file="${project.root}/build/ivy/ivy.xml" conf="taskdefs" />
+ <ivy:cachepath pathid="taskdefs.classpath" conf="taskdefs" />
+ <taskdef resource="emma_ant.properties" classpathref="taskdefs.classpath" />
+
+ <!-- ant contrib required for flow control (for loop, if, property override) -->
+ <!-- Note that we have to use a namespace to avoid clash when running sub-ant. -->
+ <taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml"
+ classpathref="taskdefs.classpath" />
+
+ <!-- ant contrib for Maven integration -->
+ <taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
+ uri="antlib:org.apache.maven.artifact.ant" classpathref="taskdefs.classpath" />
+
+ <!-- jarjar -->
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
+ classpathref="taskdefs.classpath"/>
+
+ </target>
+
+</project>
diff --git a/build/ivy/buildhelpers-ivy.xml b/build/ivy/buildhelpers-ivy.xml
new file mode 100644
index 0000000000..13e89eb734
--- /dev/null
+++ b/build/ivy/buildhelpers-ivy.xml
@@ -0,0 +1,19 @@
+<ivy-module version="2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation= "http://ant.apache.org/ivy/schemas/ivy.xsd">
+
+ <info organisation="com.vaadin" module="buildhelpers"/>
+ <configurations>
+ <conf name="compile" visibility="private"/>
+ </configurations>
+ <publications />
+ <dependencies>
+ <dependency org="com.carrotsearch" name="smartsprites" rev="0.2.3-itmill" conf="compile->compile(*),master(*)"/>
+
+ <!-- These come with GWT for Vaadin JAR but are needed to compile CompileDefaultTheme -->
+ <!--
+ <dependency org="org.w3c.css" name="sac" rev="1.3" conf="compile->compile(*),master(*)"/>
+ <dependency org="org.w3c" name="flute" rev="1.2" conf="compile->compile(*),master(*)"/>
+ -->
+ </dependencies>
+</ivy-module> \ No newline at end of file
diff --git a/build/ivy/ivy.xml b/build/ivy/ivy.xml
new file mode 100644
index 0000000000..4231633e98
--- /dev/null
+++ b/build/ivy/ivy.xml
@@ -0,0 +1,56 @@
+<ivy-module version="2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation= "http://ant.apache.org/ivy/schemas/ivy.xsd">
+
+ <info organisation="com.vaadin" module="vaadin"/>
+ <configurations>
+ <conf name="server.extdep" extends="client.extdep" description="Server side compilation dependencies" visibility="private"/>
+ <conf name="shared.extdep" extends="server.extdep" description="Shared compilation dependencies" visibility="private"/>
+ <conf name="client.extdep" description="Client side compilation dependencies" visibility="private"/>
+ <conf name="client-compiler.extdep" description="Client side compilation dependencies" visibility="private"/>
+ <conf name="server.tests.extdep" extends="server.extdep" description="Test compilation dependencies" visibility="private"/>
+ <conf name="taskdefs" description="Ant task definitions" visibility="private" />
+ </configurations>
+ <publications />
+ <dependencies defaultconf="server.extdep" defaultconfmapping="server.extdep->master">
+
+ <!--Servlet API version 2.5 -->
+ <dependency org="javax.servlet" name="servlet-api" rev="2.5" />
+
+ <!-- Liferay Portal Service -->
+ <dependency org="com.liferay.portal" name="portal-service" rev="6.0.2" />
+ <!--Portlet API version 2.0 (JSR-286) -->
+ <dependency org="javax.portlet" name="portlet-api" rev="2.0" />
+ <!-- Google App Engine -->
+ <dependency org="com.google.appengine" name="appengine-api-1.0-sdk" rev="1.2.1" />
+
+ <!-- GWT dependencies (validation-api) -->
+ <dependency org="javax.validation" name="validation-api" rev="1.0.0.GA" conf="client.extdep->master,sources" />
+
+ <!-- Test frameworks & related -->
+ <dependency org="junit" name="junit" rev="4.5" conf="server.tests.extdep -> master"/>
+ <dependency org="org.easymock" name="easymock" rev="3.0" conf="server.tests.extdep -> master, runtime(*)"/>
+ <dependency org="org.hsqldb" name="hsqldb" rev="2.2.6" conf="server.tests.extdep -> master, runtime(*)"/>
+
+ <!-- Additional libraries used by tests - also included from GWT -->
+ <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.26" conf="server.tests.extdep -> master"/>
+ <dependency org="org.mortbay.jetty" name="jetty-util" rev="6.1.26" conf="server.tests.extdep -> master"/>
+ <dependency org="commons-lang" name="commons-lang" rev="2.6" conf="server.tests.extdep -> master"/>
+ <dependency org="commons-io" name="commons-io" rev="2.3" conf="server.tests.extdep -> master"/>
+ <dependency org="commons-codec" name="commons-codec" rev="1.6" conf="server.tests.extdep -> master"/>
+
+ <!-- Ant tasks -->
+ <dependency org="ant-contrib" name="ant-contrib" rev="1.0b3" conf="taskdefs ->master"/>
+ <dependency org="org.apache.maven" name="maven-ant-tasks" rev="2.0.10" conf="taskdefs ->master"/>
+ <dependency org="com.googlecode.jarjar" name="jarjar" rev="1.3" conf="taskdefs ->master"/>
+
+ <!-- Emma -->
+ <dependency org="emma" name="emma_ant" rev="2.0.5312" conf="server.tests.extdep,taskdefs ->master"/>
+ <dependency org="emma" name="emma" rev="2.0.5312-patched" conf="server.tests.extdep,taskdefs ->*"/>
+
+ <!-- Bean Validation implementation -->
+ <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.1" conf="server.tests.extdep -> default"/>
+ <dependency org="org.hibernate" name="hibernate-validator" rev="4.2.0.Final" conf="server.tests.extdep -> default"/>
+ </dependencies>
+
+</ivy-module> \ No newline at end of file
diff --git a/build/ivy/ivysettings.xml b/build/ivy/ivysettings.xml
new file mode 100644
index 0000000000..613b8d9ffe
--- /dev/null
+++ b/build/ivy/ivysettings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ivysettings>
+ <settings defaultResolver="public" />
+ <resolvers>
+ <ibiblio name="public" m2compatible="true"/>
+ <url name="gwt-redist">
+ <artifact pattern="http://google-web-toolkit.googlecode.com/svn/tools/redist/[organisation]/[artifact](-[revision]).[ext]" />
+ </url>
+ <dual name="custom-smartsprites">
+ <filesystem name="smartsprites-ivy">
+ <ivy pattern="${basedir}/build/ivy/module/[module]-ivy-[revision].xml" />
+ </filesystem>
+ <url name="smartsprites-artifact">
+ <artifact pattern="http://dev.vaadin.com/svn/versions/6.8/build/smartsprites/lib/[artifact](-[revision]).[ext]" />
+ </url>
+ </dual>
+ </resolvers>
+ <modules>
+ <!-- GWT patched Emma -->
+ <module organisation="emma" name="emma" resolver="gwt-redist"/>
+ <!-- IT Mill patched SmartSprites -->
+ <module organisation="com.carrotsearch" name="smartsprites" revision="0.2.3-itmill" resolver="custom-smartsprites"/>
+ </modules>
+</ivysettings> \ No newline at end of file
diff --git a/build/ivy/module/smartsprites-ivy-0.2.3-itmill.xml b/build/ivy/module/smartsprites-ivy-0.2.3-itmill.xml
new file mode 100644
index 0000000000..495b6d00c9
--- /dev/null
+++ b/build/ivy/module/smartsprites-ivy-0.2.3-itmill.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
+ <info organisation="com.carrotsearch"
+ module="smartsprites"
+ revision="0.2.3-itmill"
+ status="release"
+ publication="20111130000000">
+ <license name="BSD license" url="http://csssprites.org/smartsprites.LICENSE" />
+ <description homepage="http://csssprites.org">
+ CSS Sprites Generator Done Right. SmartSprites maintains CSS sprites in your designs,
+ fully automatically. No tedious copying and pasting to your CSS when adding or changing
+ sprited images.
+ </description>
+ </info>
+ <configurations>
+ <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
+ <conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
+ <conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
+ <conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
+ <conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
+ <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
+ <conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
+ <conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
+ <conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
+ <conf name="optional" visibility="public" description="contains all optional dependencies"/>
+ </configurations>
+ <publications>
+ <artifact name="smartsprites" type="jar" ext="jar" conf="master"/>
+ </publications>
+ <dependencies>
+ <dependency org="com.google.collections" name="google-collections" rev="0.9" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
+ <dependency org="args4j" name="args4j" rev="2.0.9" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
+ <dependency org="commons-math" name="commons-math" rev="1.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
+ <dependency org="commons-io" name="commons-io" rev="1.4" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
+ <dependency org="commons-lang" name="commons-lang" rev="2.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
+ <dependency org="junit" name="junit" rev="4.4" force="true" conf="test->runtime(*),master(*)"/>
+ </dependencies>
+</ivy-module>
diff --git a/build/javadoc/j2se-1.5.0/package-list b/build/javadoc/j2se-1.6.0/package-list
index 48783362ea..42c9b950ef 100644
--- a/build/javadoc/j2se-1.5.0/package-list
+++ b/build/javadoc/j2se-1.6.0/package-list
@@ -39,6 +39,7 @@ java.security.interfaces
java.security.spec
java.sql
java.text
+java.text.spi
java.util
java.util.concurrent
java.util.concurrent.atomic
@@ -47,9 +48,13 @@ java.util.jar
java.util.logging
java.util.prefs
java.util.regex
+java.util.spi
java.util.zip
javax.accessibility
+javax.activation
javax.activity
+javax.annotation
+javax.annotation.processing
javax.crypto
javax.crypto.interfaces
javax.crypto.spec
@@ -60,6 +65,12 @@ javax.imageio.plugins.bmp
javax.imageio.plugins.jpeg
javax.imageio.spi
javax.imageio.stream
+javax.jws
+javax.jws.soap
+javax.lang.model
+javax.lang.model.element
+javax.lang.model.type
+javax.lang.model.util
javax.management
javax.management.loading
javax.management.modelmbean
@@ -83,6 +94,7 @@ javax.print.event
javax.rmi
javax.rmi.CORBA
javax.rmi.ssl
+javax.script
javax.security.auth
javax.security.auth.callback
javax.security.auth.kerberos
@@ -116,17 +128,42 @@ javax.swing.text.html.parser
javax.swing.text.rtf
javax.swing.tree
javax.swing.undo
+javax.tools
javax.transaction
javax.transaction.xa
javax.xml
+javax.xml.bind
+javax.xml.bind.annotation
+javax.xml.bind.annotation.adapters
+javax.xml.bind.attachment
+javax.xml.bind.helpers
+javax.xml.bind.util
+javax.xml.crypto
+javax.xml.crypto.dom
+javax.xml.crypto.dsig
+javax.xml.crypto.dsig.dom
+javax.xml.crypto.dsig.keyinfo
+javax.xml.crypto.dsig.spec
javax.xml.datatype
javax.xml.namespace
javax.xml.parsers
+javax.xml.soap
+javax.xml.stream
+javax.xml.stream.events
+javax.xml.stream.util
javax.xml.transform
javax.xml.transform.dom
javax.xml.transform.sax
+javax.xml.transform.stax
javax.xml.transform.stream
javax.xml.validation
+javax.xml.ws
+javax.xml.ws.handler
+javax.xml.ws.handler.soap
+javax.xml.ws.http
+javax.xml.ws.soap
+javax.xml.ws.spi
+javax.xml.ws.wsaddressing
javax.xml.xpath
org.ietf.jgss
org.omg.CORBA
@@ -163,4 +200,4 @@ org.w3c.dom.events
org.w3c.dom.ls
org.xml.sax
org.xml.sax.ext
-org.xml.sax.helpers
+org.xml.sax.helpers \ No newline at end of file