Browse Source

Formatted XML files using defined rules (#11956)

Change-Id: Iecd621321fdde29d2d89d910ba46e9dadee58995
tags/7.1.0
Artur Signell 11 years ago
parent
commit
9a3dc4e99c

+ 1
- 1
WebContent/WEB-INF/liferay-display.xml View File

@@ -4,6 +4,6 @@
<display>
<category name="Vaadin">
<portlet id="JSR286TestPortlet" />
<portlet id="Vaadin Liferay Theme Portlet"/>
<portlet id="Vaadin Liferay Theme Portlet" />
</category>
</display>

+ 3
- 3
WebContent/WEB-INF/liferay-portlet.xml View File

@@ -4,7 +4,7 @@
<liferay-portlet-app>
<portlet>
<portlet-name>JSR286TestPortlet</portlet-name>
<instanceable>false</instanceable>
<instanceable>false</instanceable>
<ajaxable>false</ajaxable>
</portlet>
<portlet>
@@ -12,7 +12,7 @@
<instanceable>false</instanceable>
<ajaxable>false</ajaxable>
</portlet>
<role-mapper>
<role-name>administrator</role-name>
<role-link>Administrator</role-link>
@@ -29,5 +29,5 @@
<role-name>user</role-name>
<role-link>User</role-link>
</role-mapper>
</liferay-portlet-app>

+ 55
- 61
WebContent/WEB-INF/portlet.xml View File

@@ -1,85 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">

<portlet>
<portlet-name>JSR286TestPortlet</portlet-name>
<display-name>Vaadin Portlet 2.0 Test</display-name>
<portlet-class>com.vaadin.server.VaadinPortlet</portlet-class>
<init-param>
<name>ui</name>
<value>com.vaadin.tests.integration.JSR286Portlet</value>
</init-param>
<init-param>
<name>widgetset</name>
<value>com.vaadin.DefaultWidgetSet</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<portlet-info>
<title>Vaadin Portlet 2.0 Test</title>
<short-title>Vaadin Portlet 2.0 Test</short-title>
</portlet-info>
<portlet>
<portlet-name>JSR286TestPortlet</portlet-name>
<display-name>Vaadin Portlet 2.0 Test</display-name>
<portlet-class>com.vaadin.server.VaadinPortlet</portlet-class>
<init-param>
<name>ui</name>
<value>com.vaadin.tests.integration.JSR286Portlet</value>
</init-param>
<init-param>
<name>widgetset</name>
<value>com.vaadin.DefaultWidgetSet</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<portlet-info>
<title>Vaadin Portlet 2.0 Test</title>
<short-title>Vaadin Portlet 2.0 Test</short-title>
</portlet-info>

<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>

<portlet>
<portlet>
<portlet-name>Vaadin Liferay Theme Portlet</portlet-name>
<display-name>Vaadin Liferay Theme</display-name>
<portlet-class>com.vaadin.server.LegacyVaadinPortlet</portlet-class>
<init-param>
<name>application</name>
<value>com.vaadin.tests.integration.LiferayThemeDemo</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<portlet-info>
<title>Vaadin Liferay Theme</title>
<short-title>Vaadin Liferay Theme</short-title>
</portlet-info>

<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>

<!--
This can be used to work around an issue in liferay 5.0-5.1.1

<container-runtime-option>
<name>javax.portlet.escapeXml</name>
<value>false</value>
</container-runtime-option>
-->
<!-- This can be used to work around an issue in liferay 5.0-5.1.1 <container-runtime-option>
<name>javax.portlet.escapeXml</name> <value>false</value> </container-runtime-option> -->
</portlet-app>

+ 116
- 116
WebContent/WEB-INF/web.xml View File

@@ -1,134 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="vaadin-uitest" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<!-- THIS IS A DEVELOPMENT AND TESTING web.xml . -->
<!-- THIS IS A DEVELOPMENT AND TESTING web.xml . -->

<display-name>Vaadin</display-name>
<description>Vaadin examples</description>
<display-name>Vaadin</display-name>
<description>Vaadin examples</description>

<context-param>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>

<context-param>
<param-name>resourceCacheTime</param-name>
<param-value>3600</param-value>
</context-param>
<servlet>
<servlet-name>Embed App 1</servlet-name>
<servlet-class>com.vaadin.server.LegacyVaadinServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>com.vaadin.tests.components.button.Buttons</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>Embed App 2</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<param-name>UI</param-name>
<param-value>com.vaadin.tests.components.label.MarginsInLabels</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>UI provider app</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<param-name>UIProvider</param-name>
<param-value>com.vaadin.tests.applicationservlet.InitParamUIProvider</param-value>
</init-param>
<init-param>
<param-name>UI</param-name>
<param-value>com.vaadin.tests.VerifyAssertionsEnabled</param-value>
</init-param>
</servlet>
<context-param>
<param-name>resourceCacheTime</param-name>
<param-value>3600</param-value>
</context-param>
<servlet>
<servlet-name>Embed App 1</servlet-name>
<servlet-class>com.vaadin.server.LegacyVaadinServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>com.vaadin.tests.components.button.Buttons</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>Embed App 2</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<param-name>UI</param-name>
<param-value>com.vaadin.tests.components.label.MarginsInLabels</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>UI provider app</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<param-name>UIProvider</param-name>
<param-value>com.vaadin.tests.applicationservlet.InitParamUIProvider</param-value>
</init-param>
<init-param>
<param-name>UI</param-name>
<param-value>com.vaadin.tests.VerifyAssertionsEnabled</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>VaadinApplicationRunner</servlet-name>
<servlet-class>com.vaadin.launcher.ApplicationRunnerServlet</servlet-class>
<!-- Non-default values for testing purposes -->
<init-param>
<param-name>legacyPropertyToString</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>heartbeatInterval</param-name>
<param-value>301</param-value>
</init-param>
<init-param>
<param-name>resourceCacheTime</param-name>
<param-value>3601</param-value>
</init-param>
<init-param>
<param-name>closeIdleSessions</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>testParam</param-name>
<param-value>42</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>VaadinApplicationRunner</servlet-name>
<servlet-class>com.vaadin.launcher.ApplicationRunnerServlet</servlet-class>
<!-- Non-default values for testing purposes -->
<init-param>
<param-name>legacyPropertyToString</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>heartbeatInterval</param-name>
<param-value>301</param-value>
</init-param>
<init-param>
<param-name>resourceCacheTime</param-name>
<param-value>3601</param-value>
</init-param>
<init-param>
<param-name>closeIdleSessions</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>testParam</param-name>
<param-value>42</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>VaadinApplicationRunnerWithPush</servlet-name>
<servlet-class>com.vaadin.launcher.ApplicationRunnerServlet</servlet-class>
<init-param>
<param-name>pushmode</param-name>
<param-value>automatic</param-value>
</init-param>
<async-supported>true</async-supported>
</servlet>
<servlet>
<servlet-name>VaadinApplicationRunnerWithPush</servlet-name>
<servlet-class>com.vaadin.launcher.ApplicationRunnerServlet</servlet-class>
<init-param>
<param-name>pushmode</param-name>
<param-value>automatic</param-value>
</init-param>
<async-supported>true</async-supported>
</servlet>

<!-- For testing GAE - the deployment script changes this to use GAEVaadinServlet -->
<servlet>
<servlet-name>IntegrationTest</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<param-name>UI</param-name>
<param-value>com.vaadin.tests.integration.IntegrationTestUI</param-value>
</init-param>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>Embed App 1</servlet-name>
<url-pattern>/embed1/*</url-pattern>
</servlet-mapping>
<!-- For testing GAE - the deployment script changes this to use GAEVaadinServlet -->
<servlet>
<servlet-name>IntegrationTest</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<param-name>UI</param-name>
<param-value>com.vaadin.tests.integration.IntegrationTestUI</param-value>
</init-param>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>Embed App 1</servlet-name>
<url-pattern>/embed1/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Embed App 2</servlet-name>
<url-pattern>/embed2/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Embed App 2</servlet-name>
<url-pattern>/embed2/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>UI provider app</servlet-name>
<url-pattern>/uiprovider/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UI provider app</servlet-name>
<url-pattern>/uiprovider/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>VaadinApplicationRunner</servlet-name>
<url-pattern>/run/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>VaadinApplicationRunner</servlet-name>
<url-pattern>/run/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>VaadinApplicationRunnerWithPush</servlet-name>
<url-pattern>/run-push/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>VaadinApplicationRunnerWithPush</servlet-name>
<url-pattern>/run-push/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>IntegrationTest</servlet-name>
<url-pattern>/integration/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>IntegrationTest</servlet-name>
<url-pattern>/integration/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>IntegrationTest</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>IntegrationTest</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

</web-app>

+ 133
- 116
all/build.xml View File

@@ -1,120 +1,137 @@
<?xml version="1.0"?>

<project name="vaadin-all" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib">
<description>
Compiles a zip containing all jars + dependencies
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />

<!-- global properties -->
<property name="module.name" value="vaadin-all" />
<property name="result.dir" value="result" />
<property name="javadoc.jar" location="${result.dir}/lib/vaadin-all-${vaadin.version}-javadoc.jar" />
<property name="temp.dir" location="${result.dir}/temp" />
<property name="temp.deps.dir" value="${temp.dir}/lib" />
<property name="javadoc.temp.dir" location="${result.dir}/javadoc-temp" />
<property name="zip.file" location="${result.dir}/lib/${module.name}-${vaadin.version}.zip" />

<path id="classpath.javadoc">
<fileset dir="${temp.deps.dir}" includes="*.jar">
</fileset>
</path>
<target name="fetch.module.and.dependencies">
<fail unless="module" message="No 'module' parameter given" />

<ivy:cachepath pathid="module.and.deps" inline="true" organisation="com.vaadin" module="vaadin-${module}" revision="${vaadin.version}" />
<copy todir="${temp.dir}" flatten="true">
<path refid="module.and.deps" />
</copy>
</target>

<target name="unzip.to.javadoctemp">
<property name="file" location="${temp.dir}/vaadin-${module}-${vaadin.version}.jar" />
<unzip src="${file}" dest="${javadoc.temp.dir}" />
</target>

<target name="javadoc" depends="copy-jars">
<!-- Ensure filtered webcontent files are available -->
<antcall target="common.filter.webcontent" />

<!-- Unpack all source files to javadoc.temp.dir-->
<antcontrib:foreach list="${modules.to.publish.to.maven}" target="unzip.to.javadoctemp" param="module" />

<property name="javadoc.dir" location="${result.dir}/javadoc" />
<property name="title" value="Vaadin ${vaadin.version} API" />
<javadoc maxmemory="1024m" destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="${title}" encoding="utf-8">
<packageset dir="${javadoc.temp.dir}">
<!-- TODO Javadoc throws ClassCastException if this is included (#9660)-->
<exclude name="com/google/gwt/uibinder/elementparsers" />
</packageset>
<doctitle>&lt;h1>${title}&lt;/h1></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" />
<classpath refid="classpath.javadoc" />
</javadoc>

<!-- Create a javadoc jar -->
<jar file="${javadoc.jar}" compress="true">
<fileset dir="${javadoc.dir}" />
<fileset refid="common.files.for.all.jars" />
</jar>


</target>

<target name="copy-jars">
<delete dir="${temp.dir}" />
<antcontrib:foreach list="${modules.to.publish.to.maven}" target="fetch.module.and.dependencies" param="module" />
<!-- All jars are now in temp.dir. Still need to separate vaadin and deps -->
<move todir="${temp.deps.dir}">
<fileset dir="${temp.dir}">
<exclude name="vaadin-*-${vaadin.version}.*" />
<exclude name="vaadin-*-${vaadin.version}-*.*" />
</fileset>
</move>


</target>
<target name="zip" depends="copy-jars, javadoc">
<!-- Ensure filtered webcontent files are available -->
<antcall target="common.filter.webcontent" />

<zip destfile="${zip.file}">
<fileset dir="${temp.dir}">
<!-- Avoid conflicts with servlet and portlet API. They are provided by the container -->
<exclude name="**/servlet-api*" />
<exclude name="**/portlet-api*" />
<!-- Buildhelpers should not even get here ... -->
<exclude name="*buildhelpers*" />
<!-- Zip users should not need javadoc, sources or pom files -->
<exclude name="*.pom" />
<exclude name="*-javadoc.jar" />
<exclude name="*-sources.jar" />

</fileset>
<fileset refid="common.files.for.all.jars" />
<fileset dir="${result.dir}/..">
<include name="README.TXT" />
</fileset>
<!-- Do not include javadoc jar in zip as it is huge (> 40MB) and most people do not need it. -->
</zip>
</target>

<target name="publish-local" depends="zip">
<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>
<target name="checkstyle">
<!-- Checkstyle is handled by all separate modules -->
</target>
<target name="test" depends="checkstyle">
<!-- No tests for this zip.. -->
</target>
<project name="vaadin-all" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib">
<description>
Compiles a zip containing all jars + dependencies
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />

<!-- global properties -->
<property name="module.name" value="vaadin-all" />
<property name="result.dir" value="result" />
<property name="javadoc.jar"
location="${result.dir}/lib/vaadin-all-${vaadin.version}-javadoc.jar" />
<property name="temp.dir" location="${result.dir}/temp" />
<property name="temp.deps.dir" value="${temp.dir}/lib" />
<property name="javadoc.temp.dir" location="${result.dir}/javadoc-temp" />
<property name="zip.file"
location="${result.dir}/lib/${module.name}-${vaadin.version}.zip" />

<path id="classpath.javadoc">
<fileset dir="${temp.deps.dir}" includes="*.jar">
</fileset>
</path>
<target name="fetch.module.and.dependencies">
<fail unless="module" message="No 'module' parameter given" />

<ivy:cachepath pathid="module.and.deps" inline="true"
organisation="com.vaadin" module="vaadin-${module}"
revision="${vaadin.version}" />
<copy todir="${temp.dir}" flatten="true">
<path refid="module.and.deps" />
</copy>
</target>

<target name="unzip.to.javadoctemp">
<property name="file"
location="${temp.dir}/vaadin-${module}-${vaadin.version}.jar" />
<unzip src="${file}" dest="${javadoc.temp.dir}" />
</target>

<target name="javadoc" depends="copy-jars">
<!-- Ensure filtered webcontent files are available -->
<antcall target="common.filter.webcontent" />

<!-- Unpack all source files to javadoc.temp.dir -->
<antcontrib:foreach list="${modules.to.publish.to.maven}"
target="unzip.to.javadoctemp" param="module" />

<property name="javadoc.dir" location="${result.dir}/javadoc" />
<property name="title" value="Vaadin ${vaadin.version} API" />
<javadoc maxmemory="1024m" destdir="${javadoc.dir}"
author="true" version="true" use="true" windowtitle="${title}"
encoding="utf-8">
<packageset dir="${javadoc.temp.dir}">
<!-- TODO Javadoc throws ClassCastException if this is included
(#9660) -->
<exclude name="com/google/gwt/uibinder/elementparsers" />
</packageset>
<doctitle>&lt;h1>${title}&lt;/h1></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" />
<classpath refid="classpath.javadoc" />
</javadoc>

<!-- Create a javadoc jar -->
<jar file="${javadoc.jar}" compress="true">
<fileset dir="${javadoc.dir}" />
<fileset refid="common.files.for.all.jars" />
</jar>


</target>

<target name="copy-jars">
<delete dir="${temp.dir}" />
<antcontrib:foreach list="${modules.to.publish.to.maven}"
target="fetch.module.and.dependencies" param="module" />
<!-- All jars are now in temp.dir. Still need to separate vaadin
and deps -->
<move todir="${temp.deps.dir}">
<fileset dir="${temp.dir}">
<exclude name="vaadin-*-${vaadin.version}.*" />
<exclude name="vaadin-*-${vaadin.version}-*.*" />
</fileset>
</move>


</target>
<target name="zip" depends="copy-jars, javadoc">
<!-- Ensure filtered webcontent files are available -->
<antcall target="common.filter.webcontent" />

<zip destfile="${zip.file}">
<fileset dir="${temp.dir}">
<!-- Avoid conflicts with servlet and portlet API. They are
provided by the container -->
<exclude name="**/servlet-api*" />
<exclude name="**/portlet-api*" />
<!-- Buildhelpers should not even get here ... -->
<exclude name="*buildhelpers*" />
<!-- Zip users should not need javadoc, sources or pom files -->
<exclude name="*.pom" />
<exclude name="*-javadoc.jar" />
<exclude name="*-sources.jar" />

</fileset>
<fileset refid="common.files.for.all.jars" />
<fileset dir="${result.dir}/..">
<include name="README.TXT" />
</fileset>
<!-- Do not include javadoc jar in zip as it is huge (> 40MB)
and most people do not need it. -->
</zip>
</target>

<target name="publish-local" depends="zip">
<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>
<target name="checkstyle">
<!-- Checkstyle is handled by all separate modules -->
</target>
<target name="test" depends="checkstyle">
<!-- No tests for this zip.. -->
</target>

</project>

+ 8
- 9
all/ivy.xml View File

@@ -19,21 +19,20 @@
<!-- LIBRARY DEPENDENCIES (compile time) -->
<!-- Project modules -->
<dependency org="com.vaadin" name="vaadin-shared"
rev="${vaadin.version}"/>
rev="${vaadin.version}" />
<dependency org="com.vaadin" name="vaadin-server"
rev="${vaadin.version}"/>
rev="${vaadin.version}" />
<dependency org="com.vaadin" name="vaadin-client"
rev="${vaadin.version}"/>
rev="${vaadin.version}" />
<dependency org="com.vaadin" name="vaadin-client-compiler"
rev="${vaadin.version}"/>
rev="${vaadin.version}" />
<dependency org="com.vaadin" name="vaadin-theme-compiler"
rev="${vaadin.version}"/>
rev="${vaadin.version}" />
<dependency org="com.vaadin" name="vaadin-themes"
rev="${vaadin.version}"/>
rev="${vaadin.version}" />
<dependency org="com.vaadin" name="vaadin-client-compiled"
rev="${vaadin.version}"/>
<dependency org="com.vaadin" name="vaadin-push"
rev="${vaadin.version}"/>
rev="${vaadin.version}" />
<dependency org="com.vaadin" name="vaadin-push" rev="${vaadin.version}" />

</dependencies>


+ 69
- 62
build.xml View File

@@ -1,71 +1,78 @@
<?xml version="1.0"?>

<project name="vaadin" basedir="." default="package" xmlns:ivy="antlib:org.apache.ivy.ant">
<include file="common.xml" as="common" />
<project name="vaadin" basedir="." default="package"
xmlns:ivy="antlib:org.apache.ivy.ant">
<include file="common.xml" as="common" />

<path id="vaadin.buildhelpers.classpath" location="${vaadin.basedir}/buildhelpers/result/classes" />
<path id="vaadin.buildhelpers.classpath" location="${vaadin.basedir}/buildhelpers/result/classes" />

<!-- =================================
target: all
================================= -->
<!--<target name="all" description="Compiles all parts of the project" depends="buildhelpers,theme-compiler,shared,server,client">-->
<target name="package" description="Compiles and packages all modules in the project" depends="buildorder">
<subant buildpathref="build-path" target="publish-local">
</subant>
</target>
<!-- ================================= target: all ================================= -->
<!--<target name="all" description="Compiles all parts of the project"
depends="buildhelpers,theme-compiler,shared,server,client"> -->
<target name="package"
description="Compiles and packages all modules in the project"
depends="buildorder">
<subant buildpathref="build-path" target="publish-local">
</subant>
</target>

<target name="buildorder" depends="official.build.checks">
<!-- Find out a good build order -->
<ivy:buildlist reference="ivy.build.path">
<fileset dir="." includes="**/build.xml">
<exclude name="build.xml" />
<exclude name="build/**" />
<exclude name="buildhelpers/**" />
</fileset>
</ivy:buildlist>
<path id="build-path">
<path location="buildhelpers/build.xml"/>
<path refid="ivy.build.path" />
</path>
</target>
<target name="clean" depends="buildorder">
<subant buildpathref="build-path" target="clean">
</subant>
<delete dir="result" />
<!-- Clean IVY cache (~/.ivy2) so no old artifacts are fetched from there (leave everything but Vaadin artifacts) -->
<delete dir="${ivy.cache.dir}/com.vaadin" />
<delete dir="${ivy.cache.dir}/com.carrotsearch" />
<target name="buildorder" depends="official.build.checks">
<!-- Find out a good build order -->
<ivy:buildlist reference="ivy.build.path">
<fileset dir="." includes="**/build.xml">
<exclude name="build.xml" />
<exclude name="build/**" />
<exclude name="buildhelpers/**" />
</fileset>
</ivy:buildlist>
<path id="build-path">
<path location="buildhelpers/build.xml" />
<path refid="ivy.build.path" />
</path>
</target>
<target name="clean" depends="buildorder">
<subant buildpathref="build-path" target="clean">
</subant>
<delete dir="result" />
<!-- Clean IVY cache (~/.ivy2) so no old artifacts are fetched from
there (leave everything but Vaadin artifacts) -->
<delete dir="${ivy.cache.dir}/com.vaadin" />
<delete dir="${ivy.cache.dir}/com.carrotsearch" />

</target>
<target name="checkstyle" depends="buildorder">
<subant buildpathref="build-path" target="checkstyle"/>
</target>
<target name="test" depends="buildorder">
<subant buildpathref="build-path" target="test" />
</target>
<target name="test-all" depends="buildorder">
<property name="war.file" location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${vaadin.version}.war" />
<parallel>
<sequential>
<!-- Sleep before running integration tests so testbench tests have time to compile and start -->
<sleep minutes="4" />
<ant antfile="uitest/integration_tests.xml" target="integration-test-all" inheritall="false" inheritrefs="false">
<property name="demo.war" value="${war.file}" />
</ant>
</sequential>
<subant buildpathref="build-path" target="test" />
<ant antfile="uitest/test.xml" target="test-package">
<property name="war.file" location="${war.file}" />
</ant>
</parallel>
</target>
</target>
<target name="checkstyle" depends="buildorder">
<subant buildpathref="build-path" target="checkstyle" />
</target>
<target name="test" depends="buildorder">
<subant buildpathref="build-path" target="test" />
</target>
<target name="test-all" depends="buildorder">
<property name="war.file"
location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${vaadin.version}.war" />
<parallel>
<sequential>
<!-- Sleep before running integration tests so testbench
tests have time to compile and start -->
<sleep minutes="4" />
<ant antfile="uitest/integration_tests.xml" target="integration-test-all"
inheritall="false" inheritrefs="false">
<property name="demo.war" value="${war.file}" />
</ant>
</sequential>
<subant buildpathref="build-path" target="test" />
<ant antfile="uitest/test.xml" target="test-package">
<property name="war.file" location="${war.file}" />
</ant>
</parallel>
</target>

<target name="official.build.checks" if="build.release">
<condition property="java.version.matches">
<equals arg1="${ant.java.version}" arg2="${vaadin.java.version}" />
</condition>
<fail unless="java.version.matches" message="Java version is ${ant.java.version}, but Vaadin must be compiled with genuine Java ${vaadin.java.version} compiler." />
<echo>Java version is ${ant.java.version} as required.</echo>
</target>
<target name="official.build.checks" if="build.release">
<condition property="java.version.matches">
<equals arg1="${ant.java.version}" arg2="${vaadin.java.version}" />
</condition>
<fail unless="java.version.matches"
message="Java version is ${ant.java.version}, but Vaadin must be compiled with genuine Java ${vaadin.java.version} compiler." />
<echo>Java version is ${ant.java.version} as required.</echo>
</target>

</project>

+ 43
- 37
build/common.xml View File

@@ -1,59 +1,65 @@
<?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"/>
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">

<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>
<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"/>
<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="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: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 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 -->
<!-- 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 -->
uri="antlib:org.apache.maven.artifact.ant" classpathref="taskdefs.classpath" />
<!-- jarjar -->
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpathref="taskdefs.classpath"/>
classpathref="taskdefs.classpath" />

</target>


+ 162
- 149
build/ide.xml View File

@@ -1,152 +1,165 @@
<?xml version="1.0"?>

<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:artifact="antlib:org.apache.maven.artifact.ant" xmlns:ivy="antlib:org.apache.ivy.ant" name="Build script for IDE users" basedir=".." default="theme-and-default-widgetset">
<include file="${basedir}/gwt-files.xml" />

<property name="gwt.dev.classes" location="${gwt.eclipse.basedir}/dev/bin" />
<property name="gwt.user.classes" location="${gwt.eclipse.basedir}/user/bin" />
<property name="gwt.dev.src" location="${gwt.basedir}/dev/core/src" />
<property name="gwt.dev.super.src" location="${gwt.basedir}/dev/core/super" />
<property name="gwt.user.src" location="${gwt.basedir}/user/src" />
<property name="gwt.user.super.src" location="${gwt.basedir}/user/super" />

<property name="work.dir" location="work" />
<property name="theme-version" location="9.9.9.INTERNAL-DEBUG-BUILD" />
<echo>Using gwt files from ${gwt.user.classes} and ${gwt.dev.classes}</echo>

<ivy:resolve file="client-compiler/ivy.xml" conf="ide" />
<ivy:cachepath pathid="client-compiler.deps" conf="ide" />
<ivy:resolve file="server/ivy.xml" conf="ide" />
<ivy:cachepath pathid="server.deps" conf="ide" />
<ivy:resolve file="client/ivy.xml" conf="ide" />
<ivy:cachepath pathid="client.deps" conf="ide" />
<ivy:resolve file="shared/ivy.xml" conf="ide" />
<ivy:cachepath pathid="shared.deps" conf="ide" />
<ivy:resolve file="uitest/ivy.xml" conf="ide" />
<ivy:cachepath pathid="uitest.deps" conf="ide" />
<ivy:resolve file="theme-compiler/ivy.xml" conf="ide" />
<ivy:cachepath pathid="theme-compiler.deps" conf="ide" />

<path id="classpath">
<path location="bin" />
<path location="build/classes" />
<path location="${gwt.user.classes}" />
<path location="${gwt.user.src}" />
<path location="${gwt.user.super.src}" />
<path location="${gwt.dev.classes}" />
<path location="${gwt.dev.super.src}" />
<path location="${gwt.dev.src}" />
<path refid="client-compiler.deps" />
<path refid="theme-compiler.deps" />
<path refid="server.deps" />
<path refid="shared.deps" />
<path refid="uitest.deps" />
<path refid="client.deps" />
<path location="theme-compiler/src" />
<path location="server/src" />
<path location="shared/src" />
<path location="uitest/src" />
<path location="client/src" />
</path>

<target name="theme-and-default-widgetset" depends="default-widgetset, themes, vaadinPush.js">
</target>
<target name="themes">
<antcall target="compile-theme">
<param name="theme" value="base" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="runo" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="reindeer" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="chameleon" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="liferay" />
</antcall>
</target>

<target name="compile-theme">
<java classname="com.vaadin.buildhelpers.CompileTheme" failonerror="yes" fork="yes">
<classpath refid="classpath" />
<jvmarg value="-Djava.awt.headless=true" />
<arg value="--theme" />
<arg value="${theme}" />
<arg value="--theme-version" />
<arg value="${theme-version}" />
<arg value="--theme-folder" />
<arg value="WebContent/VAADIN/themes" />
</java>

</target>


<target name="default-widgetset">
<antcall target="compile-widgetset">
<param name="widgetset" value="com.vaadin.DefaultWidgetSet" />
</antcall>
</target>

<target name="testing-widgetset">
<antcall target="compile-widgetset">
<param name="widgetset" value="com.vaadin.tests.widgetset.TestingWidgetSet" />
</antcall>
</target>

<target name="compile-widgetset">
<property name="module" value="${widgetset}" />
<property name="module.output.dir" location="WebContent/VAADIN/widgetsets" />
<property name="style" value="PRETTY" />
<property name="localWorkers" value="2" />
<property name="extraParams" value="" />

<mkdir dir="${module.output.dir}" />

<echo>Compiling ${module} to ${module.output.dir} with parameters -logLevel TRACE -style ${style} -localWorkers ${localWorkers} -strict ${extraParams}</echo>

<!--<ivy:resolve inline="true" organisation="javax.validation" module="validation-api" revision="1.0.0.GA"/>-->

<!-- compile the module -->
<java classname="com.google.gwt.dev.Compiler" classpathref="classpath" failonerror="yes" fork="yes" maxmemory="512m">
<arg value="-workDir" />
<arg value="${work.dir}" />
<arg value="-logLevel" />
<arg value="TRACE" />
<arg value="-war" />
<arg value="${module.output.dir}" />
<arg value="-style" />
<arg value="${style}" />

<arg value="-localWorkers" />
<arg value="${localWorkers}" />
<arg value="-strict" />
<arg line="${extraParams}" />
<arg value="${module}" />

<sysproperty key="vFailIfNotSerializable" value="true" />

<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
<jvmarg value="-Dgwt.usearchives=false" />
</java>
</target>
<target name="vaadinPush.js">
<property name="vaadinPush.js.output" location="WebContent/VAADIN/vaadinPush.js" />

<loadfile srcfile="WebContent/VAADIN/jquery-1.7.2.js" property="jquery.js.contents" />
<loadfile srcfile="WebContent/VAADIN/jquery.atmosphere.js" property="jquery.atmosphere.js.contents" />
<loadfile srcfile="WebContent/VAADIN/vaadinPush.js.tpl" property="vaadinPush.js.contents">
<filterchain>
<replacetokens begintoken="@" endtoken="@">
<token key="jquery.js" value="${jquery.js.contents}" />
<token key="jquery.atmosphere.js" value="${jquery.atmosphere.js.contents}" />
</replacetokens>
</filterchain>
</loadfile>
<echo file="${vaadinPush.js.output}">${vaadinPush.js.contents}</echo>
</target>
<project xmlns:antcontrib="antlib:net.sf.antcontrib"
xmlns:artifact="antlib:org.apache.maven.artifact.ant" xmlns:ivy="antlib:org.apache.ivy.ant"
name="Build script for IDE users" basedir=".."
default="theme-and-default-widgetset">
<include file="${basedir}/gwt-files.xml" />

<property name="gwt.dev.classes" location="${gwt.eclipse.basedir}/dev/bin" />
<property name="gwt.user.classes" location="${gwt.eclipse.basedir}/user/bin" />
<property name="gwt.dev.src" location="${gwt.basedir}/dev/core/src" />
<property name="gwt.dev.super.src" location="${gwt.basedir}/dev/core/super" />
<property name="gwt.user.src" location="${gwt.basedir}/user/src" />
<property name="gwt.user.super.src" location="${gwt.basedir}/user/super" />

<property name="work.dir" location="work" />
<property name="theme-version" location="9.9.9.INTERNAL-DEBUG-BUILD" />
<echo>Using gwt files from ${gwt.user.classes} and
${gwt.dev.classes}</echo>

<ivy:resolve file="client-compiler/ivy.xml" conf="ide" />
<ivy:cachepath pathid="client-compiler.deps" conf="ide" />
<ivy:resolve file="server/ivy.xml" conf="ide" />
<ivy:cachepath pathid="server.deps" conf="ide" />
<ivy:resolve file="client/ivy.xml" conf="ide" />
<ivy:cachepath pathid="client.deps" conf="ide" />
<ivy:resolve file="shared/ivy.xml" conf="ide" />
<ivy:cachepath pathid="shared.deps" conf="ide" />
<ivy:resolve file="uitest/ivy.xml" conf="ide" />
<ivy:cachepath pathid="uitest.deps" conf="ide" />
<ivy:resolve file="theme-compiler/ivy.xml" conf="ide" />
<ivy:cachepath pathid="theme-compiler.deps" conf="ide" />

<path id="classpath">
<path location="bin" />
<path location="build/classes" />
<path location="${gwt.user.classes}" />
<path location="${gwt.user.src}" />
<path location="${gwt.user.super.src}" />
<path location="${gwt.dev.classes}" />
<path location="${gwt.dev.super.src}" />
<path location="${gwt.dev.src}" />
<path refid="client-compiler.deps" />
<path refid="theme-compiler.deps" />
<path refid="server.deps" />
<path refid="shared.deps" />
<path refid="uitest.deps" />
<path refid="client.deps" />
<path location="theme-compiler/src" />
<path location="server/src" />
<path location="shared/src" />
<path location="uitest/src" />
<path location="client/src" />
</path>

<target name="theme-and-default-widgetset" depends="default-widgetset, themes, vaadinPush.js">
</target>
<target name="themes">
<antcall target="compile-theme">
<param name="theme" value="base" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="runo" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="reindeer" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="chameleon" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="liferay" />
</antcall>
</target>

<target name="compile-theme">
<java classname="com.vaadin.buildhelpers.CompileTheme"
failonerror="yes" fork="yes">
<classpath refid="classpath" />
<jvmarg value="-Djava.awt.headless=true" />
<arg value="--theme" />
<arg value="${theme}" />
<arg value="--theme-version" />
<arg value="${theme-version}" />
<arg value="--theme-folder" />
<arg value="WebContent/VAADIN/themes" />
</java>

</target>


<target name="default-widgetset">
<antcall target="compile-widgetset">
<param name="widgetset" value="com.vaadin.DefaultWidgetSet" />
</antcall>
</target>

<target name="testing-widgetset">
<antcall target="compile-widgetset">
<param name="widgetset"
value="com.vaadin.tests.widgetset.TestingWidgetSet" />
</antcall>
</target>

<target name="compile-widgetset">
<property name="module" value="${widgetset}" />
<property name="module.output.dir" location="WebContent/VAADIN/widgetsets" />
<property name="style" value="PRETTY" />
<property name="localWorkers" value="2" />
<property name="extraParams" value="" />

<mkdir dir="${module.output.dir}" />

<echo>Compiling ${module} to ${module.output.dir} with
parameters -logLevel TRACE -style ${style} -localWorkers
${localWorkers} -strict ${extraParams}</echo>

<!--<ivy:resolve inline="true" organisation="javax.validation" module="validation-api"
revision="1.0.0.GA"/> -->

<!-- compile the module -->
<java classname="com.google.gwt.dev.Compiler" classpathref="classpath"
failonerror="yes" fork="yes" maxmemory="512m">
<arg value="-workDir" />
<arg value="${work.dir}" />
<arg value="-logLevel" />
<arg value="TRACE" />
<arg value="-war" />
<arg value="${module.output.dir}" />
<arg value="-style" />
<arg value="${style}" />

<arg value="-localWorkers" />
<arg value="${localWorkers}" />
<arg value="-strict" />
<arg line="${extraParams}" />
<arg value="${module}" />

<sysproperty key="vFailIfNotSerializable" value="true" />

<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
<jvmarg value="-Dgwt.usearchives=false" />
</java>
</target>
<target name="vaadinPush.js">
<property name="vaadinPush.js.output" location="WebContent/VAADIN/vaadinPush.js" />

<loadfile srcfile="WebContent/VAADIN/jquery-1.7.2.js"
property="jquery.js.contents" />
<loadfile srcfile="WebContent/VAADIN/jquery.atmosphere.js"
property="jquery.atmosphere.js.contents" />
<loadfile srcfile="WebContent/VAADIN/vaadinPush.js.tpl"
property="vaadinPush.js.contents">
<filterchain>
<replacetokens begintoken="@" endtoken="@">
<token key="jquery.js" value="${jquery.js.contents}" />
<token key="jquery.atmosphere.js" value="${jquery.atmosphere.js.contents}" />
</replacetokens>
</filterchain>
</loadfile>
<echo file="${vaadinPush.js.output}">${vaadinPush.js.contents}</echo>
</target>
</project>

+ 47
- 46
buildhelpers/build.xml View File

@@ -1,50 +1,51 @@
<?xml version="1.0"?>

<project name="vaadin-buildhelpers" basedir="." default="publish-local">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../build.xml" as="vaadin" />
<include file="../common.xml" as="common" />

<property name="module.name" value="vaadin-buildhelpers" />
<property name="module.symbolic" value="com.vaadin.buildhelpers" />
<property name="result.dir" location="result" />
<path id="classpath.compile.custom" />

<target name="jar">
<antcall target="common.jar">
<reference torefid="extra.jar.includes" refid="empty.reference" />
</antcall>
</target>

<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="empty.reference" />
</antcall>
<antcall target="common.javadoc.jar" />
<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>

<target name="fetch-release-notes-tickets">
<antcall target="common.exec-buildhelper">
<param name="main.class" value="com.vaadin.buildhelpers.FetchReleaseNotesTickets" />
<param name="output" value="${output}" />
</antcall>
</target>

<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" />-->
<echo>WHAT? No JUnit tests for ${module.name}!</echo>
</target>
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../build.xml" as="vaadin" />
<include file="../common.xml" as="common" />

<property name="module.name" value="vaadin-buildhelpers" />
<property name="module.symbolic" value="com.vaadin.buildhelpers" />
<property name="result.dir" location="result" />
<path id="classpath.compile.custom" />

<target name="jar">
<antcall target="common.jar">
<reference torefid="extra.jar.includes" refid="empty.reference" />
</antcall>
</target>

<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="empty.reference" />
</antcall>
<antcall target="common.javadoc.jar" />
<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>

<target name="fetch-release-notes-tickets">
<antcall target="common.exec-buildhelper">
<param name="main.class"
value="com.vaadin.buildhelpers.FetchReleaseNotesTickets" />
<param name="output" value="${output}" />
</antcall>
</target>

<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" /> -->
<echo>WHAT? No JUnit tests for ${module.name}!</echo>
</target>
</project>

+ 1
- 1
buildhelpers/ivy.xml View File

@@ -28,7 +28,7 @@

</publications>
<dependencies>
<dependency org="commons-io" name="commons-io" rev="2.2" />
<dependency org="commons-io" name="commons-io" rev="2.2" />
</dependencies>

</ivy-module>

+ 145
- 135
client-compiled/build.xml View File

@@ -1,139 +1,149 @@
<?xml version="1.0"?>

<project name="vaadin-client-compiled" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiled (JS+HTML) version of client side
</description>

<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-client-compiled" />
<property name="module.symbolic" value="com.vaadin.client-compiled" />
<property name="result.dir" value="result" />
<property name="gwtar.dir" location="${result.dir}/gwtar" />
<property name="work.dir" location="${result.dir}/work" />
<property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
<property name="compiled.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
<property name="compiled-cache.jar" location="${result.dir}/lib/${module.name}-cache-${vaadin.version}.jar" />

<union id="jar.includes">
<fileset dir="${result.dir}">
<include name="VAADIN/widgetsets/com.vaadin*/**" />
</fileset>
</union>
<target name="default-widgetset-cache">
<antcall target="compile-module-cache">
<param name="module" value="com.vaadin.DefaultWidgetSet" />
</antcall>
</target>

<target name="default-widgetset">
<antcall target="compile-module">
<param name="module" value="com.vaadin.DefaultWidgetSet" />
</antcall>
</target>


<target name="compile-module-cache">
<fail unless="module" message="You must give the module to compile in the 'module' parameter" />
<ivy:resolve resolveid="common" conf="compile-module" />
<ivy:cachepath pathid="classpath.compile.widgetset" conf="compile-module" />
<echo>Creating gwtar files for ${module} in ${gwtar.dir}</echo>

<!-- Produce gwtar files for the separate JAR -->
<java classname="com.google.gwt.dev.CompileModule" classpathref="classpath.compile.widgetset" failonerror="yes" fork="yes" maxmemory="512m">
<arg value="-out" />
<arg value="${gwtar.dir}" />
<arg value="-strict" />
<arg value="${module}" />

<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
</java>
</target>

<target name="compile-module">
<fail unless="module" message="You must give the module to compile in the 'module' parameter" />
<property name="style" value="OBF" />
<property name="localWorkers" value="2" />
<property name="extraParams" value="" />

<ivy:resolve resolveid="common" conf="compile-module" />
<ivy:cachepath pathid="classpath.compile.widgetset" conf="compile-module" />

<mkdir dir="${module.output.dir}" />

<echo>Compiling ${module} to ${module.output.dir}</echo>

<!-- compile the module -->
<java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.widgetset" failonerror="yes" fork="yes" maxmemory="512m">
<classpath location="${compiled-cache.jar}" />
<arg value="-workDir" />
<arg value="${work.dir}" />
<arg value="-logLevel" />
<arg value="TRACE" />
<arg value="-war" />
<arg value="${module.output.dir}" />
<arg value="-style" />
<arg value="${style}" />

<arg value="-localWorkers" />
<arg value="${localWorkers}" />
<arg value="-strict" />
<arg value="-XenableClosureCompiler" />
<arg line="${extraParams}" />
<arg value="${module}" />

<sysproperty key="vFailIfNotSerializable" value="true" />

<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
</java>

</target>

<target name="client-compiled-cache.jar" depends="default-widgetset-cache">
<!-- Ensure filtered webcontent files are available -->
<antcall target="common.filter.webcontent" />

<jar file="${compiled-cache.jar}" compress="true">
<fileset dir="${gwtar.dir}">
<include name="**/*.gwtar" />
</fileset>
<union refid="client-compiled-cache.gwt.includes" />
<fileset refid="common.files.for.all.jars" />
</jar>
</target>

<target name="jar" depends="default-widgetset">
<antcall target="common.jar">
<param name="osgi.extra.package.prefixes" value="VAADIN/widgetsets/" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>
<target name="publish-local" depends="jar">
<antcall target="common.publish-local">
<param name="conf" value="build" />
</antcall>
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<echo>No java files in module</echo>
</target>
<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" />-->
<echo>WHAT? No tests for ${module.name}!</echo>
</target>
<project name="vaadin-client-compiled" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiled (JS+HTML) version of client side
</description>

<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-client-compiled" />
<property name="module.symbolic" value="com.vaadin.client-compiled" />
<property name="result.dir" value="result" />
<property name="gwtar.dir" location="${result.dir}/gwtar" />
<property name="work.dir" location="${result.dir}/work" />
<property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
<property name="compiled.jar"
location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
<property name="compiled-cache.jar"
location="${result.dir}/lib/${module.name}-cache-${vaadin.version}.jar" />

<union id="jar.includes">
<fileset dir="${result.dir}">
<include name="VAADIN/widgetsets/com.vaadin*/**" />
</fileset>
</union>

<target name="default-widgetset-cache">
<antcall target="compile-module-cache">
<param name="module" value="com.vaadin.DefaultWidgetSet" />
</antcall>
</target>

<target name="default-widgetset">
<antcall target="compile-module">
<param name="module" value="com.vaadin.DefaultWidgetSet" />
</antcall>
</target>


<target name="compile-module-cache">
<fail unless="module"
message="You must give the module to compile in the 'module' parameter" />
<ivy:resolve resolveid="common" conf="compile-module" />
<ivy:cachepath pathid="classpath.compile.widgetset"
conf="compile-module" />
<echo>Creating gwtar files for ${module} in ${gwtar.dir}</echo>

<!-- Produce gwtar files for the separate JAR -->
<java classname="com.google.gwt.dev.CompileModule"
classpathref="classpath.compile.widgetset" failonerror="yes"
fork="yes" maxmemory="512m">
<arg value="-out" />
<arg value="${gwtar.dir}" />
<arg value="-strict" />
<arg value="${module}" />

<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
</java>
</target>

<target name="compile-module">
<fail unless="module"
message="You must give the module to compile in the 'module' parameter" />
<property name="style" value="OBF" />
<property name="localWorkers" value="2" />
<property name="extraParams" value="" />

<ivy:resolve resolveid="common" conf="compile-module" />
<ivy:cachepath pathid="classpath.compile.widgetset"
conf="compile-module" />

<mkdir dir="${module.output.dir}" />

<echo>Compiling ${module} to ${module.output.dir}</echo>

<!-- compile the module -->
<java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.widgetset"
failonerror="yes" fork="yes" maxmemory="512m">
<classpath location="${compiled-cache.jar}" />
<arg value="-workDir" />
<arg value="${work.dir}" />
<arg value="-logLevel" />
<arg value="TRACE" />
<arg value="-war" />
<arg value="${module.output.dir}" />
<arg value="-style" />
<arg value="${style}" />

<arg value="-localWorkers" />
<arg value="${localWorkers}" />
<arg value="-strict" />
<arg value="-XenableClosureCompiler" />
<arg line="${extraParams}" />
<arg value="${module}" />

<sysproperty key="vFailIfNotSerializable" value="true" />

<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
</java>

</target>

<target name="client-compiled-cache.jar" depends="default-widgetset-cache">
<!-- Ensure filtered webcontent files are available -->
<antcall target="common.filter.webcontent" />

<jar file="${compiled-cache.jar}" compress="true">
<fileset dir="${gwtar.dir}">
<include name="**/*.gwtar" />
</fileset>
<union refid="client-compiled-cache.gwt.includes" />
<fileset refid="common.files.for.all.jars" />
</jar>
</target>

<target name="jar" depends="default-widgetset">
<antcall target="common.jar">
<param name="osgi.extra.package.prefixes" value="VAADIN/widgetsets/" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>

<target name="publish-local" depends="jar">
<antcall target="common.publish-local">
<param name="conf" value="build" />
</antcall>
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<echo>No java files in module</echo>
</target>
<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" /> -->
<echo>WHAT? No tests for ${module.name}!</echo>
</target>

</project>

+ 2
- 2
client-compiled/ivy.xml View File

@@ -14,8 +14,8 @@
</configurations>
<publications>
<artifact type="jar" ext="jar" />
<!-- <artifact type="source" ext="jar" m:classifier="sources" /> -->
<!-- <artifact type="javadoc" ext="jar" m:classifier="javadoc" /> -->
<!-- <artifact type="source" ext="jar" m:classifier="sources" /> -->
<!-- <artifact type="javadoc" ext="jar" m:classifier="javadoc" /> -->
<artifact type="pom" ext="pom" />
<!-- cache must be a separate artifact, not within vaadin-client-compiled -->
<!-- <artifact type="jar" name="vaadin-client-compiled-cache"/> -->

+ 55
- 53
client-compiler/build.xml View File

@@ -1,68 +1,70 @@
<?xml version="1.0"?>

<project name="vaadin-client-compiler" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />
<project name="vaadin-client-compiler" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-client-compiler" />
<property name="module.symbolic" value="com.vaadin.client-compiler" />
<property name="result.dir" value="result" />
<path id="classpath.compile.custom">
<fileset file="${gwt.dev.jar}" />
</path>
<!-- global properties -->
<property name="module.name" value="vaadin-client-compiler" />
<property name="module.symbolic" value="com.vaadin.client-compiler" />
<property name="result.dir" value="result" />
<path id="classpath.compile.custom">
<fileset file="${gwt.dev.jar}" />
</path>

<union id="compiler.includes">
<union refid="client-compiler.gwt.includes" />
<fileset dir="${result.dir}">
<include name="com/google/gwt/dev/About.properties" />
</fileset>
</union>
<union id="compiler.includes">
<union refid="client-compiler.gwt.includes" />
<fileset dir="${result.dir}">
<include name="com/google/gwt/dev/About.properties" />
</fileset>
</union>

<target name="jar">
<!-- 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>
<target name="jar">
<!-- 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>

<echo file="${result.dir}/com/google/gwt/dev/About.properties">gwt.version=${vaadin.version}
gwt.svnrev=${git.revision}</echo>
<echo file="${result.dir}/com/google/gwt/dev/About.properties">gwt.version=${vaadin.version}
gwt.svnrev=${git.revision}</echo>

<antcall target="common.jar">
<reference refid="compiler.includes" torefid="extra.jar.includes" />
</antcall>
<antcall target="common.jar">
<reference refid="compiler.includes" torefid="extra.jar.includes" />
</antcall>

</target>
</target>

<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="compiler.includes" />
</antcall>
<antcall target="common.javadoc.jar" />
<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="compiler.includes" />
</antcall>
<antcall target="common.javadoc.jar" />

<antcall target="common.publish-local" />
</target>
<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>
<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>
<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>

<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" />-->
<echo>WHAT? No tests for ${module.name}!</echo>
</target>
<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" /> -->
<echo>WHAT? No tests for ${module.name}!</echo>
</target>

</project>

+ 54
- 52
client-compiler/ivy.xml View File

@@ -1,62 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
xmlns:m="http://ant.apache.org/ivy/maven">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
xmlns:m="http://ant.apache.org/ivy/maven">

<info organisation="com.vaadin" module="vaadin-client-compiler"
revision="${vaadin.version}" />
<info organisation="com.vaadin" module="vaadin-client-compiler"
revision="${vaadin.version}" />

<configurations>
<conf name="build" />
<conf name="build-provided" />
<conf name="ide" visibility="private" />
</configurations>
<publications>
<artifact type="jar" ext="jar" />
<artifact type="source" ext="jar" m:classifier="sources" />
<artifact type="javadoc" ext="jar" m:classifier="javadoc" />
<artifact type="pom" ext="pom" />
</publications>
<dependencies>
<dependency org="com.vaadin" name="vaadin-shared" rev="${vaadin.version}"
conf="build" />
<dependency org="com.vaadin" name="vaadin-server" rev="${vaadin.version}"
conf="build" />
<dependency org="com.vaadin" name="vaadin-client" rev="${vaadin.version}"
conf="build" />
<dependency org="com.vaadin" name="vaadin-theme-compiler"
rev="${vaadin.version}" conf="build" />
<configurations>
<conf name="build" />
<conf name="build-provided" />
<conf name="ide" visibility="private" />
</configurations>
<publications>
<artifact type="jar" ext="jar" />
<artifact type="source" ext="jar" m:classifier="sources" />
<artifact type="javadoc" ext="jar" m:classifier="javadoc" />
<artifact type="pom" ext="pom" />
</publications>
<dependencies>
<dependency org="com.vaadin" name="vaadin-shared"
rev="${vaadin.version}" conf="build" />
<dependency org="com.vaadin" name="vaadin-server"
rev="${vaadin.version}" conf="build" />
<dependency org="com.vaadin" name="vaadin-client"
rev="${vaadin.version}" conf="build" />
<dependency org="com.vaadin" name="vaadin-theme-compiler"
rev="${vaadin.version}" conf="build" />

<dependency org="commons-collections" name="commons-collections"
rev="3.1" conf="build,ide -> default" />
<dependency org="commons-logging" name="commons-logging"
rev="1.1.1" conf="build,ide -> default" />
<dependency org="commons-collections" name="commons-collections"
rev="3.1" conf="build,ide -> default" />
<dependency org="commons-logging" name="commons-logging"
rev="1.1.1" conf="build,ide -> default" />

<dependency org="ant" name="ant" rev="1.6.5" conf="build,ide -> default" />
<dependency org="net.sourceforge.cssparser" name="cssparser"
rev="0.9.5" conf="build,ide -> default" />
<dependency org="ant" name="ant" rev="1.6.5" conf="build,ide -> default" />
<dependency org="ant" name="ant-launcher" rev="1.6.5"
conf="build,ide -> default" />
<dependency org="org.mortbay.jetty" name="jetty" rev="6.1.11"
conf="build,ide -> default" />
<dependency org="org.mortbay.jetty" name="jetty-util" rev="6.1.11"
conf="build,ide -> default" />
<dependency org="org.jdesktop" name="swing-worker" rev="1.1"
conf="build,ide -> default" />
<dependency org="commons-codec" name="commons-codec" rev="1.3"
conf="build,ide -> default" />
<dependency org="commons-io" name="commons-io" rev="2.2"
conf="build,ide -> default" />
<dependency org="commons-lang" name="commons-lang" rev="2.6"
conf="build,ide -> default" />
<dependency org="org.apache.james" name="apache-mime4j"
rev="0.6" conf="build,ide -> default" />
<dependency org="ant" name="ant" rev="1.6.5"
conf="build,ide -> default" />
<dependency org="net.sourceforge.cssparser" name="cssparser"
rev="0.9.5" conf="build,ide -> default" />
<dependency org="ant" name="ant" rev="1.6.5"
conf="build,ide -> default" />
<dependency org="ant" name="ant-launcher" rev="1.6.5"
conf="build,ide -> default" />
<dependency org="org.mortbay.jetty" name="jetty" rev="6.1.11"
conf="build,ide -> default" />
<dependency org="org.mortbay.jetty" name="jetty-util"
rev="6.1.11" conf="build,ide -> default" />
<dependency org="org.jdesktop" name="swing-worker"
rev="1.1" conf="build,ide -> default" />
<dependency org="commons-codec" name="commons-codec"
rev="1.3" conf="build,ide -> default" />
<dependency org="commons-io" name="commons-io" rev="2.2"
conf="build,ide -> default" />
<dependency org="commons-lang" name="commons-lang"
rev="2.6" conf="build,ide -> default" />
<dependency org="org.apache.james" name="apache-mime4j"
rev="0.6" conf="build,ide -> default" />

<dependency org="com.vaadin" name="vaadin-client-compiler-deps"
rev="1.0.2" conf="build,ide -> default" />
<dependency org="com.vaadin" name="vaadin-client-compiler-deps"
rev="1.0.2" conf="build,ide -> default" />

</dependencies>
</dependencies>

</ivy-module>

+ 60
- 57
client/build.xml View File

@@ -1,43 +1,46 @@
<?xml version="1.0"?>

<project name="vaadin-client" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />
<project name="vaadin-client" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-client" />
<property name="module.symbolic" value="com.vaadin.client" />
<property name="result.dir" value="result" />
<!-- global properties -->
<property name="module.name" value="vaadin-client" />
<property name="module.symbolic" value="com.vaadin.client" />
<property name="result.dir" value="result" />

<path id="classpath.compile.custom">
<!-- Could possibly compile GWT files also here to verify that
a) the same dependencies are used and
b) all dependencies have been declared
-->
<fileset file="${gwt.user.jar}" />
</path>
<path id="classpath.test.custom" />
<path id="classpath.compile.custom">
<!-- Could possibly compile GWT files also here to verify that a)
the same dependencies are used and b) all dependencies have been declared -->
<fileset file="${gwt.user.jar}" />
</path>
<path id="classpath.test.custom" />

<target name="jar">
<property name="jar.file" location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
<antcall target="common.jar">
<reference refid="client.gwt.includes" torefid="extra.jar.includes" />
</antcall>
<jar destfile="${jar.file}" update="true">
<manifest>
<attribute name="Vaadin-Package-Version" value="1" />
<attribute name="Vaadin-Widgetsets" value="com.vaadin.DefaultWidgetSet" />
</manifest>
</jar>
<!-- Hack to add validation dependency with source classifier -->
<property name="pom.xml" location="${result.dir}/lib/${module.name}-${vaadin.version}.pom" />
<copy file="${pom.xml}" tofile="${temp.pom}">
<filterchain>
<replacestring from=" &lt;/dependencies&gt;" to=" &lt;dependency&gt;
<target name="jar">
<property name="jar.file"
location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
<antcall target="common.jar">
<reference refid="client.gwt.includes" torefid="extra.jar.includes" />
</antcall>
<jar destfile="${jar.file}" update="true">
<manifest>
<attribute name="Vaadin-Package-Version"
value="1" />
<attribute name="Vaadin-Widgetsets" value="com.vaadin.DefaultWidgetSet" />
</manifest>
</jar>
<!-- Hack to add validation dependency with source classifier -->
<property name="pom.xml"
location="${result.dir}/lib/${module.name}-${vaadin.version}.pom" />
<copy file="${pom.xml}" tofile="${temp.pom}">
<filterchain>
<replacestring from=" &lt;/dependencies&gt;"
to=" &lt;dependency&gt;
&lt;groupId&gt;javax.validation&lt;/groupId&gt;
&lt;artifactId&gt;validation-api&lt;/artifactId&gt;
&lt;version&gt;1.0.0.GA&lt;/version&gt;
@@ -45,32 +48,32 @@
&lt;classifier&gt;sources&lt;/classifier&gt;
&lt;/dependency&gt;
&lt;/dependencies&gt;" />
</filterchain>
</copy>
<move file="${temp.pom}" tofile="${pom.xml}" />
</target>
</filterchain>
</copy>
<move file="${temp.pom}" tofile="${pom.xml}" />
</target>

<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="client.gwt.includes" />
</antcall>
<antcall target="common.javadoc.jar" />
<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="client.gwt.includes" />
</antcall>
<antcall target="common.javadoc.jar" />

<antcall target="common.publish-local" />
</target>
<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>
<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>
<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>

<target name="test" depends="checkstyle">
<antcall target="common.test.run" />
</target>
<target name="test" depends="checkstyle">
<antcall target="common.test.run" />
</target>

</project>

+ 7
- 7
client/src/com/vaadin/DefaultWidgetSet.gwt.xml View File

@@ -1,13 +1,13 @@
<module>
<!-- This GWT module defines the Vaadin DefaultWidgetSet. This is the module
you want to extend when creating an extended widget set, or when creating
a specialized widget set with a subset of the components. -->
<!-- This GWT module defines the Vaadin DefaultWidgetSet. This is the
module you want to extend when creating an extended widget set, or when creating
a specialized widget set with a subset of the components. -->

<!-- Hint for WidgetSetBuilder not to automatically update the file -->
<!-- WS Compiler: manually edited -->
<!-- Hint for WidgetSetBuilder not to automatically update the file -->
<!-- WS Compiler: manually edited -->

<inherits name="com.vaadin.Vaadin" />
<inherits name="com.vaadin.Vaadin" />

<entry-point class="com.vaadin.client.ApplicationConfiguration" />
<entry-point class="com.vaadin.client.ApplicationConfiguration" />

</module>

+ 14
- 11
client/src/com/vaadin/Vaadin.gwt.xml View File

@@ -12,13 +12,14 @@
<inherits name="com.google.gwt.http.HTTP" />

<inherits name="com.google.gwt.json.JSON" />
<inherits name="com.google.gwt.logging.Logging" />
<!-- Firebug handler is deprecated but for some reason still enabled by default -->
<!-- Firebug handler is deprecated but for some reason still enabled
by default -->
<set-property name="gwt.logging.firebugHandler" value="DISABLED" />
<!-- Disable popup logging as we have our own popup logger -->
<set-property name="gwt.logging.popupHandler" value="DISABLED" />
<inherits name="com.vaadin.VaadinBrowserSpecificOverrides" />

<source path="client" />
@@ -40,19 +41,21 @@
<when-type-assignable
class="com.vaadin.client.metadata.ConnectorBundleLoader" />
</generate-with>
<replace-with class="com.vaadin.client.communication.AtmospherePushConnection">

<replace-with
class="com.vaadin.client.communication.AtmospherePushConnection">
<when-type-is class="com.vaadin.client.communication.PushConnection" />
</replace-with>
<!-- Set vaadin.profiler to true to include profiling support in the module -->
</replace-with>

<!-- Set vaadin.profiler to true to include profiling support in the
module -->
<define-property name="vaadin.profiler" values="true,false" />
<set-property name="vaadin.profiler" value="false" />
<set-property name="vaadin.profiler" value="false" />
<replace-with class="com.vaadin.client.Profiler.EnabledProfiler">
<when-type-is class="com.vaadin.client.Profiler" />
<when-property-is name="vaadin.profiler" value="true" />
</replace-with>
</replace-with>

<!-- Use the new cross site linker to get a nocache.js without document.write -->
<add-linker name="xsiframe" />

+ 51
- 50
client/src/com/vaadin/VaadinBrowserSpecificOverrides.gwt.xml View File

@@ -1,54 +1,55 @@
<module>
<!-- This GWT module defines the browser specific overrides used by Vaadin -->

<!-- Hint for WidgetSetBuilder not to automatically update the file -->
<!-- WS Compiler: manually edited -->

<!-- Fall through to this rule for everything but IE -->
<replace-with
class="com.vaadin.client.ui.upload.UploadIFrameOnloadStrategy">
<when-type-is
class="com.vaadin.client.ui.upload.UploadIFrameOnloadStrategy" />
</replace-with>

<replace-with
class="com.vaadin.client.ui.upload.UploadIFrameOnloadStrategyIE">
<when-type-is
class="com.vaadin.client.ui.upload.UploadIFrameOnloadStrategy" />
<any>
<when-property-is name="user.agent" value="ie8" />
</any>
</replace-with>

<!-- Fall through to this rule for everything but IE -->
<replace-with class="com.vaadin.client.ui.VDragAndDropWrapper">
<when-type-is class="com.vaadin.client.ui.VDragAndDropWrapper" />
</replace-with>

<replace-with class="com.vaadin.client.ui.VDragAndDropWrapperIE">
<when-type-is class="com.vaadin.client.ui.VDragAndDropWrapper" />
<any>
<when-property-is name="user.agent" value="ie8" />
</any>
</replace-with>

<!-- Fall through to this rule for everything but IE -->
<replace-with class="com.vaadin.client.LayoutManager">
<when-type-is class="com.vaadin.client.LayoutManager" />
</replace-with>

<replace-with class="com.vaadin.client.LayoutManagerIE8">
<when-type-is class="com.vaadin.client.LayoutManager" />
<any>
<when-property-is name="user.agent" value="ie8" />
</any>
</replace-with>
<replace-with class="com.vaadin.client.ui.VPopupImpl">
<when-type-is class="com.google.gwt.user.client.ui.impl.PopupImplMozilla" />
<when-property-is name="user.agent" value="gecko1_8"/>
</replace-with>
<!-- This GWT module defines the browser specific overrides used by Vaadin -->

<!-- Hint for WidgetSetBuilder not to automatically update the file -->
<!-- WS Compiler: manually edited -->

<!-- Fall through to this rule for everything but IE -->
<replace-with
class="com.vaadin.client.ui.upload.UploadIFrameOnloadStrategy">
<when-type-is
class="com.vaadin.client.ui.upload.UploadIFrameOnloadStrategy" />
</replace-with>

<replace-with
class="com.vaadin.client.ui.upload.UploadIFrameOnloadStrategyIE">
<when-type-is
class="com.vaadin.client.ui.upload.UploadIFrameOnloadStrategy" />
<any>
<when-property-is name="user.agent" value="ie8" />
</any>
</replace-with>

<!-- Fall through to this rule for everything but IE -->
<replace-with class="com.vaadin.client.ui.VDragAndDropWrapper">
<when-type-is class="com.vaadin.client.ui.VDragAndDropWrapper" />
</replace-with>

<replace-with class="com.vaadin.client.ui.VDragAndDropWrapperIE">
<when-type-is class="com.vaadin.client.ui.VDragAndDropWrapper" />
<any>
<when-property-is name="user.agent" value="ie8" />
</any>
</replace-with>

<!-- Fall through to this rule for everything but IE -->
<replace-with class="com.vaadin.client.LayoutManager">
<when-type-is class="com.vaadin.client.LayoutManager" />
</replace-with>

<replace-with class="com.vaadin.client.LayoutManagerIE8">
<when-type-is class="com.vaadin.client.LayoutManager" />
<any>
<when-property-is name="user.agent" value="ie8" />
</any>
</replace-with>

<replace-with class="com.vaadin.client.ui.VPopupImpl">
<when-type-is
class="com.google.gwt.user.client.ui.impl.PopupImplMozilla" />
<when-property-is name="user.agent" value="gecko1_8" />
</replace-with>

<replace-with class="com.vaadin.client.ui.VPopupImpl">
<when-type-is class="com.google.gwt.user.client.ui.impl.PopupImpl" />
</replace-with>

+ 470
- 405
common.xml View File

@@ -1,407 +1,472 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="common" basedir="." default="" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">

<tstamp>
<format property="build.date" pattern="yyyy-MM-dd" />
</tstamp>

<dirname property="vaadin.basedir" file="${ant.file.common}" />
<property name="gwt.basedir" location="${vaadin.basedir}/../gwt" />
<property file="${vaadin.basedir}/build.properties" />

<property name="modules.to.publish.to.maven" value="shared,server,client,client-compiler,client-compiled,theme-compiler,themes,push" />
<property name="modules.to.publish.to.download" value="${modules.to.publish.to.maven},all" />

<ivy:settings file="${vaadin.basedir}/ivysettings.xml" />
<ivy:settings file="${vaadin.basedir}/ivysettings.xml" id="ivysettings" />
<ivy:resolve file="${vaadin.basedir}/ivy-taskdefs.xml" conf="taskdefs" log="quiet" />
<ivy:cachepath pathid="taskdefs.classpath" conf="taskdefs" />
<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" />

<!-- FIXME These are not available in other files -->
<antcontrib:propertyregex property="vaadin.version.major" input="${vaadin.version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\1" />
<antcontrib:propertyregex property="vaadin.version.minor" input="${vaadin.version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\2" />
<antcontrib:propertyregex property="vaadin.version.revision" input="${vaadin.version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\3" />

<union id="empty.reference" />

<property name="filtered.webcontent.dir" location="${vaadin.basedir}/result/filteredWebContent" />
<property name="release-notes-tickets-file" location="${vaadin.basedir}/result/release-notes-tickets.html" />

<target name="filter.webcontent" unless="webcontent.filtered" depends="fetch-release-notes-tickets">
<property name="webcontent.filtered" value="true" />
<!-- Running without build.release-notes will cause an error, which is ignored -->
<loadfile property="release-notes-tickets" srcFile="${release-notes-tickets-file}" failonerror="false" />

<delete dir="${filtered.webcontent.dir}" />
<copy todir="${filtered.webcontent.dir}">
<fileset dir="${vaadin.basedir}/WebContent">
<include name="img/**" />
</fileset>
</copy>
<copy todir="${filtered.webcontent.dir}">
<fileset dir="${vaadin.basedir}/WebContent">
<patternset>
<include name="release-notes.html" />
<include name="license.html" />
<include name="licenses/**" />
<include name="css/**" />
</patternset>
</fileset>
<filterchain>
<expandproperties />
<replacetokens begintoken="@" endtoken="@">
<token key="version" value="${vaadin.version}" />
</replacetokens>
<replacetokens begintoken="@" endtoken="@">
<token key="version-minor" value="${vaadin.version.major}.${vaadin.version.minor}" />
</replacetokens>
<replacetokens begintoken="@" endtoken="@">
<token key="builddate" value="${build.date}" />
</replacetokens>
<replacetokens begintoken="@" endtoken="@">
<token key="release-notes-tickets" value="${release-notes-tickets}" />
</replacetokens>
</filterchain>
</copy>
</target>

<target name="fetch-release-notes-tickets" unless="built.release-notes" if="build.release-notes">
<mkdir dir="${vaadin.basedir}/result" />
<subant buildpath="${vaadin.basedir}/buildhelpers" target="fetch-release-notes-tickets" antfile="build.xml" inheritall="true">
<property name="output" location="${release-notes-tickets-file}" />
</subant>
<property name="built.release-notes" value="1" />
</target>

<fileset dir="${filtered.webcontent.dir}" id="common.files.for.all.jars">
<patternset>
<include name="release-notes.html" />
<include name="license.html" />
<include name="licenses/**" />
<include name="css/**" />
<include name="img/**" />
</patternset>
</fileset>


<target name="pom.xml" description="Generates a pom.xml based on the Ivy configuration. Either for a snapshot or a release version" depends="pom.xml.release,pom.xml.snapshot">
</target>

<target name="pom.xml.release" if="build.release">
<fail unless="result.dir" message="No result.dir parameter given" />
<property name="ivy.xml" location="${result.dir}/../ivy.xml" />
<property name="pom.xml" location="${result.dir}/lib/${module.name}-${vaadin.version}.pom" />
<property name="conf" value="build, build-provided" />
<property name="vaadin.maven.version" value="${vaadin.version}" />

<ivy:makepom templatefile="${vaadin.basedir}/pom-template.xml" ivyfile="${ivy.xml}" pomfile="${pom.xml}" conf="${conf}">
<mapping conf="build" scope="compile" />
<mapping conf="build-provided" scope="provided" />
</ivy:makepom>
</target>

<target name="pom.xml.snapshot" unless="build.release">
<fail unless="result.dir" message="No result.dir parameter given" />
<property name="ivy.xml" location="${result.dir}/../ivy.xml" />
<property name="pom.xml" location="${result.dir}/lib/${module.name}-${vaadin.version}.pom" />
<property name="temp.pom.xml" location="${pom.xml}.temp" />
<property name="conf" value="build, build-provided" />
<property name="vaadin.maven.version" value="${vaadin.version.major}.${vaadin.version.minor}-SNAPSHOT" />

<ivy:makepom templatefile="${vaadin.basedir}/pom-template.xml" ivyfile="${ivy.xml}" pomfile="${temp.pom.xml}" conf="${conf}">
<mapping conf="build" scope="compile" />
<mapping conf="build-provided" scope="provided" />
</ivy:makepom>
<copy file="${temp.pom.xml}" tofile="${pom.xml}">
<filterchain>
<replacestring from="${vaadin.version}" to="${vaadin.maven.version}" />
</filterchain>
</copy>
<delete file="${temp.pom.xml}" />
</target>


<target name="sources.jar" depends="compile, filter.webcontent">
<fail unless="result.dir" message="No result.dir parameter given" />
<fail unless="module.name" message="No module.name parameter given" />
<fail unless="src" message="No src directory parameter given" />

<property name="sources.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}-sources.jar" />

<jar file="${sources.jar}" compress="true">
<fileset dir="${src}">
<patternset>
<include name="**/*.java" />
</patternset>
</fileset>
<fileset refid="common.files.for.all.jars" />
<restrict>
<union refid="extra.jar.includes" />
<name name="*.java" />
</restrict>
</jar>

</target>

<target name="javadoc.jar" depends="dependencies, filter.webcontent">
<fail unless="result.dir" message="No result.dir parameter given" />
<fail unless="module.name" message="No module.name parameter given" />
<property name="src" location="{$result.dir}/../src" />
<property name="javadoc.dir" value="${result.dir}/javadoc" />
<property name="javadoc.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}-javadoc.jar" />

<javadoc destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="${module.name}">
<packageset dir="${src}" excludes="${classes.exclude}" />
<doctitle>&lt;h1>${module.name}&lt;/h1></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" />
<classpath refid="classpath.compile.dependencies" />
</javadoc>

<!-- Create a javadoc jar -->
<jar file="${javadoc.jar}" compress="true">
<fileset dir="${javadoc.dir}" />
<fileset refid="common.files.for.all.jars" />
</jar>

</target>

<target name="jar" depends="compile, pom.xml, filter.webcontent">
<fail unless="result.dir" message="No result.dir parameter given" />
<fail unless="module.name" message="No module.name parameter given" />

<property name="result.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
<property name="classes" location="{$result.dir}/classes" />
<property name="src" location="{$result.dir}/../src" />

<union id="jar.files">
<fileset dir="${classes}" excludes="${classes.exclude}" erroronmissingdir="false" />
<fileset dir="${src}" excludes="${jar.exclude}" erroronmissingdir="false" />
<fileset refid="common.files.for.all.jars" />
<union refid="extra.jar.includes" />
</union>

<jar destfile="${result.jar}" duplicate="fail" index="true">
<manifest>
<attribute name="Implementation-Vendor" value="${vaadin.vendor}" />
<attribute name="Implementation-URL" value="${vaadin.url}" />
<attribute name="Implementation-Version" value="${vaadin.version}" />
</manifest>
<union refid="jar.files" />
</jar>

<antcall target="common.make-osgi-bundle">
<param name="jar" value="${result.jar}" />
<param name="bundle-version" value="${vaadin.version}" />
<param name="bundle-name" value="${module.name}" />
<param name="bundle-symbolic" value="${module.symbolic}" />
<param name="bundle-vendor" value="${vaadin.vendor}" />
</antcall>

</target>

<!-- Add OSGi attributes to the manifest of the given jar -->
<target name="make-osgi-bundle">
<fail unless="jar" message="No jar parameter given" />
<fail unless="bundle-name" message="No bundle-name parameter given" />
<fail unless="bundle-symbolic" message="No bundle-symbolic parameter given" />
<fail unless="bundle-version" message="No bundle-version parameter given" />
<fail unless="bundle-vendor" message="No bundle-vendor parameter given" />

<property name="bundle-manifestversion" value="2" />

<jar file="${jar}" update="true">
<manifest>
<attribute name="Bundle-Version" value="${bundle-version}" />
<attribute name="Bundle-ManifestVersion" value="${bundle-manifestversion}" />
<attribute name="Bundle-Name" value="${bundle-name}" />
<attribute name="Bundle-SymbolicName" value="${bundle-symbolic}" />
<attribute name="Bundle-Vendor" value="${bundle-vendor}" />
<attribute name="Bundle-RequiredExecutionEnvironment" value="JavaSE-${vaadin.java.version}" />
</manifest>
</jar>

<antcontrib:if>
<isset property="import-package" />
<then>
<jar file="${result.jar}" update="true">
<manifest>
<attribute name="Import-Package" value="${import-package}" />
</manifest>
</jar>
</then>
</antcontrib:if>
<antcontrib:if>
<isset property="require-bundle" />
<then>
<jar file="${result.jar}" update="true">
<manifest>
<attribute name="Require-Bundle" value="${require-bundle}" />
</manifest>
</jar>
</then>
</antcontrib:if>
<antcontrib:if>
<isset property="export-package" />
<then>
<jar file="${result.jar}" update="true">
<manifest>
<attribute name="Export-Package" value="${export-package}" />
</manifest>
</jar>
</then>
</antcontrib:if>

<!-- Generate the Export-Package attribute in the manifest -->
<java classname="com.vaadin.buildhelpers.GeneratePackageExports" failonerror="true" fork="yes">
<arg value="${jar}" />
<arg line="com/vaadin com/google ${osgi.extra.package.prefixes}" />
<classpath refid="vaadin.buildhelpers.classpath" />
<jvmarg value="-Dvaadin.version=${vaadin.version}" />
</java>
</target>

<target name="compile" description="Compiles the module" depends="dependencies, directories" if="src-exists">
<fail unless="module.name" message="No module name given" />

<javac srcdir="${src}" destdir="${classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
<classpath refid="classpath.compile.dependencies" />
<classpath refid="classpath.compile.custom" />
</javac>
</target>

<target name="exec-buildhelper" depends="compile">
<fail unless="main.class" message="No main class given in 'main.class'" />
<fail unless="output" message="No output file given in 'output'" />
<java classname="${main.class}" output="${output}" failonerror="true" fork="yes">
<classpath refid="vaadin.buildhelpers.classpath" />
<classpath refid="classpath.compile.dependencies" />
<jvmarg value="-Dvaadin.version=${vaadin.version}" />
</java>
</target>

<target name="directories">
<property name="result.dir" location="result" />
<property name="src" location="${result.dir}/../src" />
<property name="classes" location="${result.dir}/classes" />
<available file="${src}" type="dir" property="src-exists" />
<mkdir dir="${classes}" />
</target>

<target name="test.run" depends="test.compile">
<fail unless="module.name" message="No module name given" />

<property name="result.dir" location="result" />
<property name="classes" location="${result.dir}/classes" />
<property name="test.src" location="${result.dir}/../tests/src" />
<property name="test.classes" location="${result.dir}/tests/classes" />


<junit printsummary="withOutAndErr" fork="yes">
<formatter usefile="false" type="plain" />
<jvmarg value="-ea" />
<classpath location="${test.classes}" />
<classpath location="${classes}" />
<classpath refid="classpath.compile.custom" />
<classpath refid="classpath.test.dependencies" />

<batchtest fork="yes">
<fileset dir="${test.src}">
<exclude name="**/Abstract*" />
<exclude name="com/vaadin/tests/data/bean/*" />
<exclude name="com/vaadin/tests/util/*" />
<exclude name="**/VaadinClasses.java" />
<exclude name="**/*TestRunner.java" />
<exclude name="**/SQLTestsConstants.java" />
</fileset>
</batchtest>
</junit>
</target>

<target name="test.compile" description="Compiles tests" depends="compile, dependencies.test">
<fail unless="module.name" message="No module name given" />
<property name="result.dir" location="result" />
<property name="base.dir" location="${result.dir}/.." />
<property name="test.src" location="${base.dir}/tests/src" />
<property name="test.resources" location="${base.dir}/tests/resources" />
<property name="test.classes" location="${result.dir}/tests/classes" />
<property name="classes" location="${result.dir}/classes" />

<mkdir dir="${test.classes}" />

<javac srcdir="${test.src}" destdir="${test.classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
<classpath refid="classpath.test.dependencies" />
<classpath location="${classes}" />
<classpath refid="classpath.test.custom" />
</javac>

<!-- Copy resources -->
<copy todir="${test.classes}" failonerror="false">
<fileset dir="${test.resources}" />
</copy>
</target>

<target name="dependencies" description="Resolves dependencies needed by this module">
<property name='conf' value="build, build-provided" />
<ivy:resolve resolveid="common" conf="${conf}" />
<ivy:cachepath pathid="classpath.compile.dependencies" conf="${conf}" />
</target>

<target name="dependencies.test" description="Resolves dependencies needed by test">
<ivy:resolve resolveid="common" conf="test" />
<ivy:cachepath pathid="classpath.test.dependencies" conf="test" />
</target>

<target name="clean">
<fail unless="result.dir" message="No result.dir parameter given" />
<delete dir="${result.dir}" />
</target>

<target name="publish-local" description="Publishes the given module to the local repository">
<fail unless="result.dir" message="No result.dir parameter given" />
<property name="conf" value="*(public)" />

<ivy:resolve conf="${conf}" />
<ivy:publish settingsref="ivysettings" conf="${conf}" resolver="build-temp" overwrite="true" forcedeliver="true">
<!-- <artifacts pattern="${result.dir}/[artifact]-[revision].[ext]" />-->
<artifacts pattern="${result.dir}/lib/[artifact]-[revision](-[classifier]).[ext]" />

</ivy:publish>
</target>

<target name="publish.to.local.maven">
<property name="conf" value="*(public)" />

<ivy:resolve conf="${conf}" />
<ivy:publish conf="${conf}" resolver="local-maven" overwrite="true">
</ivy:publish>
</target>

<!-- Checkstyle conf -->
<property name="cs.dir" location="${vaadin.basedir}/checkstyle" />
<property name="cs.xml" location="${cs.dir}/vaadin-checkstyle.xml" />
<property name="cs.header-file" location="${cs.dir}/header" />
<taskdef resource="checkstyletask.properties" uri="antlib:com.puppycrawl.tools.checkstyle" classpathref="taskdefs.classpath" />

<target name="checkstyle">
<fail unless="result.dir" message="No result.dir parameter given" />
<fail unless="cs.src" message="No cs.src parameter given" />
<property name="result.dir.full" location="${result.dir}" />
<mkdir dir="${result.dir}" />
<echo>##teamcity[importData type='checkstyle' path='${result.dir.full}/checkstyle-errors.xml']</echo>
<cs:checkstyle config="${cs.xml}" failOnViolation="false">
<fileset dir="${cs.src}" includes="**/*.java">
<exclude name="com/vaadin/sass/internal/parser/Parser.java" />
<exclude name="com/vaadin/sass/internal/parser/ParserConstants.java" />
<exclude name="com/vaadin/sass/internal/parser/ParserTokenManager.java" />
</fileset>
<formatter type="xml" toFile="${result.dir}/checkstyle-errors.xml" />
<property key="checkstyle.header.file" file="${cs.header-file}" />
</cs:checkstyle>
</target>
<project name="common" basedir="." default=""
xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib"
xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">

<tstamp>
<format property="build.date" pattern="yyyy-MM-dd" />
</tstamp>

<dirname property="vaadin.basedir" file="${ant.file.common}" />
<property name="gwt.basedir" location="${vaadin.basedir}/../gwt" />
<property file="${vaadin.basedir}/build.properties" />

<property name="modules.to.publish.to.maven"
value="shared,server,client,client-compiler,client-compiled,theme-compiler,themes,push" />
<property name="modules.to.publish.to.download" value="${modules.to.publish.to.maven},all" />

<ivy:settings file="${vaadin.basedir}/ivysettings.xml" />
<ivy:settings file="${vaadin.basedir}/ivysettings.xml"
id="ivysettings" />
<ivy:resolve file="${vaadin.basedir}/ivy-taskdefs.xml"
conf="taskdefs" log="quiet" />
<ivy:cachepath pathid="taskdefs.classpath" conf="taskdefs" />
<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" />

<!-- FIXME These are not available in other files -->
<antcontrib:propertyregex property="vaadin.version.major"
input="${vaadin.version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)"
select="\1" />
<antcontrib:propertyregex property="vaadin.version.minor"
input="${vaadin.version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)"
select="\2" />
<antcontrib:propertyregex property="vaadin.version.revision"
input="${vaadin.version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)"
select="\3" />

<union id="empty.reference" />

<property name="filtered.webcontent.dir"
location="${vaadin.basedir}/result/filteredWebContent" />
<property name="release-notes-tickets-file"
location="${vaadin.basedir}/result/release-notes-tickets.html" />

<target name="filter.webcontent" unless="webcontent.filtered"
depends="fetch-release-notes-tickets">
<property name="webcontent.filtered" value="true" />
<!-- Running without build.release-notes will cause an error, which
is ignored -->
<loadfile property="release-notes-tickets" srcFile="${release-notes-tickets-file}"
failonerror="false" />

<delete dir="${filtered.webcontent.dir}" />
<copy todir="${filtered.webcontent.dir}">
<fileset dir="${vaadin.basedir}/WebContent">
<include name="img/**" />
</fileset>
</copy>
<copy todir="${filtered.webcontent.dir}">
<fileset dir="${vaadin.basedir}/WebContent">
<patternset>
<include name="release-notes.html" />
<include name="license.html" />
<include name="licenses/**" />
<include name="css/**" />
</patternset>
</fileset>
<filterchain>
<expandproperties />
<replacetokens begintoken="@" endtoken="@">
<token key="version" value="${vaadin.version}" />
</replacetokens>
<replacetokens begintoken="@" endtoken="@">
<token key="version-minor"
value="${vaadin.version.major}.${vaadin.version.minor}" />
</replacetokens>
<replacetokens begintoken="@" endtoken="@">
<token key="builddate" value="${build.date}" />
</replacetokens>
<replacetokens begintoken="@" endtoken="@">
<token key="release-notes-tickets" value="${release-notes-tickets}" />
</replacetokens>
</filterchain>
</copy>
</target>

<target name="fetch-release-notes-tickets" unless="built.release-notes"
if="build.release-notes">
<mkdir dir="${vaadin.basedir}/result" />
<subant buildpath="${vaadin.basedir}/buildhelpers"
target="fetch-release-notes-tickets" antfile="build.xml"
inheritall="true">
<property name="output" location="${release-notes-tickets-file}" />
</subant>
<property name="built.release-notes" value="1" />
</target>

<fileset dir="${filtered.webcontent.dir}" id="common.files.for.all.jars">
<patternset>
<include name="release-notes.html" />
<include name="license.html" />
<include name="licenses/**" />
<include name="css/**" />
<include name="img/**" />
</patternset>
</fileset>


<target name="pom.xml"
description="Generates a pom.xml based on the Ivy configuration. Either for a snapshot or a release version"
depends="pom.xml.release,pom.xml.snapshot">
</target>

<target name="pom.xml.release" if="build.release">
<fail unless="result.dir" message="No result.dir parameter given" />
<property name="ivy.xml" location="${result.dir}/../ivy.xml" />
<property name="pom.xml"
location="${result.dir}/lib/${module.name}-${vaadin.version}.pom" />
<property name="conf" value="build, build-provided" />
<property name="vaadin.maven.version" value="${vaadin.version}" />

<ivy:makepom templatefile="${vaadin.basedir}/pom-template.xml"
ivyfile="${ivy.xml}" pomfile="${pom.xml}" conf="${conf}">
<mapping conf="build" scope="compile" />
<mapping conf="build-provided" scope="provided" />
</ivy:makepom>
</target>

<target name="pom.xml.snapshot" unless="build.release">
<fail unless="result.dir" message="No result.dir parameter given" />
<property name="ivy.xml" location="${result.dir}/../ivy.xml" />
<property name="pom.xml"
location="${result.dir}/lib/${module.name}-${vaadin.version}.pom" />
<property name="temp.pom.xml" location="${pom.xml}.temp" />
<property name="conf" value="build, build-provided" />
<property name="vaadin.maven.version"
value="${vaadin.version.major}.${vaadin.version.minor}-SNAPSHOT" />

<ivy:makepom templatefile="${vaadin.basedir}/pom-template.xml"
ivyfile="${ivy.xml}" pomfile="${temp.pom.xml}" conf="${conf}">
<mapping conf="build" scope="compile" />
<mapping conf="build-provided" scope="provided" />
</ivy:makepom>
<copy file="${temp.pom.xml}" tofile="${pom.xml}">
<filterchain>
<replacestring from="${vaadin.version}"
to="${vaadin.maven.version}" />
</filterchain>
</copy>
<delete file="${temp.pom.xml}" />
</target>


<target name="sources.jar" depends="compile, filter.webcontent">
<fail unless="result.dir" message="No result.dir parameter given" />
<fail unless="module.name" message="No module.name parameter given" />
<fail unless="src" message="No src directory parameter given" />

<property name="sources.jar"
location="${result.dir}/lib/${module.name}-${vaadin.version}-sources.jar" />

<jar file="${sources.jar}" compress="true">
<fileset dir="${src}">
<patternset>
<include name="**/*.java" />
</patternset>
</fileset>
<fileset refid="common.files.for.all.jars" />
<restrict>
<union refid="extra.jar.includes" />
<name name="*.java" />
</restrict>
</jar>

</target>

<target name="javadoc.jar" depends="dependencies, filter.webcontent">
<fail unless="result.dir" message="No result.dir parameter given" />
<fail unless="module.name" message="No module.name parameter given" />
<property name="src" location="{$result.dir}/../src" />
<property name="javadoc.dir" value="${result.dir}/javadoc" />
<property name="javadoc.jar"
location="${result.dir}/lib/${module.name}-${vaadin.version}-javadoc.jar" />

<javadoc destdir="${javadoc.dir}" author="true" version="true"
use="true" windowtitle="${module.name}">
<packageset dir="${src}" excludes="${classes.exclude}" />
<doctitle>&lt;h1>${module.name}&lt;/h1></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" />
<classpath refid="classpath.compile.dependencies" />
</javadoc>

<!-- Create a javadoc jar -->
<jar file="${javadoc.jar}" compress="true">
<fileset dir="${javadoc.dir}" />
<fileset refid="common.files.for.all.jars" />
</jar>

</target>

<target name="jar" depends="compile, pom.xml, filter.webcontent">
<fail unless="result.dir" message="No result.dir parameter given" />
<fail unless="module.name" message="No module.name parameter given" />

<property name="result.jar"
location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
<property name="classes" location="{$result.dir}/classes" />
<property name="src" location="{$result.dir}/../src" />

<union id="jar.files">
<fileset dir="${classes}" excludes="${classes.exclude}"
erroronmissingdir="false" />
<fileset dir="${src}" excludes="${jar.exclude}"
erroronmissingdir="false" />
<fileset refid="common.files.for.all.jars" />
<union refid="extra.jar.includes" />
</union>

<jar destfile="${result.jar}" duplicate="fail" index="true">
<manifest>
<attribute name="Implementation-Vendor" value="${vaadin.vendor}" />
<attribute name="Implementation-URL" value="${vaadin.url}" />
<attribute name="Implementation-Version"
value="${vaadin.version}" />
</manifest>
<union refid="jar.files" />
</jar>

<antcall target="common.make-osgi-bundle">
<param name="jar" value="${result.jar}" />
<param name="bundle-version" value="${vaadin.version}" />
<param name="bundle-name" value="${module.name}" />
<param name="bundle-symbolic" value="${module.symbolic}" />
<param name="bundle-vendor" value="${vaadin.vendor}" />
</antcall>

</target>

<!-- Add OSGi attributes to the manifest of the given jar -->
<target name="make-osgi-bundle">
<fail unless="jar" message="No jar parameter given" />
<fail unless="bundle-name" message="No bundle-name parameter given" />
<fail unless="bundle-symbolic" message="No bundle-symbolic parameter given" />
<fail unless="bundle-version" message="No bundle-version parameter given" />
<fail unless="bundle-vendor" message="No bundle-vendor parameter given" />

<property name="bundle-manifestversion" value="2" />

<jar file="${jar}" update="true">
<manifest>
<attribute name="Bundle-Version" value="${bundle-version}" />
<attribute name="Bundle-ManifestVersion"
value="${bundle-manifestversion}" />
<attribute name="Bundle-Name" value="${bundle-name}" />
<attribute name="Bundle-SymbolicName" value="${bundle-symbolic}" />
<attribute name="Bundle-Vendor" value="${bundle-vendor}" />
<attribute name="Bundle-RequiredExecutionEnvironment"
value="JavaSE-${vaadin.java.version}" />
</manifest>
</jar>

<antcontrib:if>
<isset property="import-package" />
<then>
<jar file="${result.jar}" update="true">
<manifest>
<attribute name="Import-Package"
value="${import-package}" />
</manifest>
</jar>
</then>
</antcontrib:if>
<antcontrib:if>
<isset property="require-bundle" />
<then>
<jar file="${result.jar}" update="true">
<manifest>
<attribute name="Require-Bundle"
value="${require-bundle}" />
</manifest>
</jar>
</then>
</antcontrib:if>
<antcontrib:if>
<isset property="export-package" />
<then>
<jar file="${result.jar}" update="true">
<manifest>
<attribute name="Export-Package"
value="${export-package}" />
</manifest>
</jar>
</then>
</antcontrib:if>

<!-- Generate the Export-Package attribute in the manifest -->
<java classname="com.vaadin.buildhelpers.GeneratePackageExports"
failonerror="true" fork="yes">
<arg value="${jar}" />
<arg line="com/vaadin com/google ${osgi.extra.package.prefixes}" />
<classpath refid="vaadin.buildhelpers.classpath" />
<jvmarg value="-Dvaadin.version=${vaadin.version}" />
</java>
</target>

<target name="compile" description="Compiles the module"
depends="dependencies, directories" if="src-exists">
<fail unless="module.name" message="No module name given" />

<javac srcdir="${src}" destdir="${classes}" source="${vaadin.java.version}"
target="${vaadin.java.version}" debug="true" encoding="UTF-8"
includeantruntime="false">
<classpath refid="classpath.compile.dependencies" />
<classpath refid="classpath.compile.custom" />
</javac>
</target>

<target name="exec-buildhelper" depends="compile">
<fail unless="main.class" message="No main class given in 'main.class'" />
<fail unless="output" message="No output file given in 'output'" />
<java classname="${main.class}" output="${output}"
failonerror="true" fork="yes">
<classpath refid="vaadin.buildhelpers.classpath" />
<classpath refid="classpath.compile.dependencies" />
<jvmarg value="-Dvaadin.version=${vaadin.version}" />
</java>
</target>

<target name="directories">
<property name="result.dir" location="result" />
<property name="src" location="${result.dir}/../src" />
<property name="classes" location="${result.dir}/classes" />
<available file="${src}" type="dir" property="src-exists" />
<mkdir dir="${classes}" />
</target>

<target name="test.run" depends="test.compile">
<fail unless="module.name" message="No module name given" />

<property name="result.dir" location="result" />
<property name="classes" location="${result.dir}/classes" />
<property name="test.src" location="${result.dir}/../tests/src" />
<property name="test.classes" location="${result.dir}/tests/classes" />


<junit printsummary="withOutAndErr" fork="yes">
<formatter usefile="false" type="plain" />
<jvmarg value="-ea" />
<classpath location="${test.classes}" />
<classpath location="${classes}" />
<classpath refid="classpath.compile.custom" />
<classpath refid="classpath.test.dependencies" />

<batchtest fork="yes">
<fileset dir="${test.src}">
<exclude name="**/Abstract*" />
<exclude name="com/vaadin/tests/data/bean/*" />
<exclude name="com/vaadin/tests/util/*" />
<exclude name="**/VaadinClasses.java" />
<exclude name="**/*TestRunner.java" />
<exclude name="**/SQLTestsConstants.java" />
</fileset>
</batchtest>
</junit>
</target>

<target name="test.compile" description="Compiles tests"
depends="compile, dependencies.test">
<fail unless="module.name" message="No module name given" />
<property name="result.dir" location="result" />
<property name="base.dir" location="${result.dir}/.." />
<property name="test.src" location="${base.dir}/tests/src" />
<property name="test.resources" location="${base.dir}/tests/resources" />
<property name="test.classes" location="${result.dir}/tests/classes" />
<property name="classes" location="${result.dir}/classes" />

<mkdir dir="${test.classes}" />

<javac srcdir="${test.src}" destdir="${test.classes}"
source="${vaadin.java.version}" target="${vaadin.java.version}"
debug="true" encoding="UTF-8" includeantruntime="false">
<classpath refid="classpath.test.dependencies" />
<classpath location="${classes}" />
<classpath refid="classpath.test.custom" />
</javac>

<!-- Copy resources -->
<copy todir="${test.classes}" failonerror="false">
<fileset dir="${test.resources}" />
</copy>
</target>

<target name="dependencies" description="Resolves dependencies needed by this module">
<property name='conf' value="build, build-provided" />
<ivy:resolve resolveid="common" conf="${conf}" />
<ivy:cachepath pathid="classpath.compile.dependencies"
conf="${conf}" />
</target>

<target name="dependencies.test" description="Resolves dependencies needed by test">
<ivy:resolve resolveid="common" conf="test" />
<ivy:cachepath pathid="classpath.test.dependencies"
conf="test" />
</target>

<target name="clean">
<fail unless="result.dir" message="No result.dir parameter given" />
<delete dir="${result.dir}" />
</target>

<target name="publish-local"
description="Publishes the given module to the local repository">
<fail unless="result.dir" message="No result.dir parameter given" />
<property name="conf" value="*(public)" />

<ivy:resolve conf="${conf}" />
<ivy:publish settingsref="ivysettings" conf="${conf}"
resolver="build-temp" overwrite="true" forcedeliver="true">
<!-- <artifacts pattern="${result.dir}/[artifact]-[revision].[ext]"
/> -->
<artifacts
pattern="${result.dir}/lib/[artifact]-[revision](-[classifier]).[ext]" />

</ivy:publish>
</target>

<target name="publish.to.local.maven">
<property name="conf" value="*(public)" />

<ivy:resolve conf="${conf}" />
<ivy:publish conf="${conf}" resolver="local-maven"
overwrite="true">
</ivy:publish>
</target>

<!-- Checkstyle conf -->
<property name="cs.dir" location="${vaadin.basedir}/checkstyle" />
<property name="cs.xml" location="${cs.dir}/vaadin-checkstyle.xml" />
<property name="cs.header-file" location="${cs.dir}/header" />
<taskdef resource="checkstyletask.properties" uri="antlib:com.puppycrawl.tools.checkstyle"
classpathref="taskdefs.classpath" />

<target name="checkstyle">
<fail unless="result.dir" message="No result.dir parameter given" />
<fail unless="cs.src" message="No cs.src parameter given" />
<property name="result.dir.full" location="${result.dir}" />
<mkdir dir="${result.dir}" />
<echo>##teamcity[importData type='checkstyle'
path='${result.dir.full}/checkstyle-errors.xml']</echo>
<cs:checkstyle config="${cs.xml}" failOnViolation="false">
<fileset dir="${cs.src}" includes="**/*.java">
<exclude name="com/vaadin/sass/internal/parser/Parser.java" />
<exclude
name="com/vaadin/sass/internal/parser/ParserConstants.java" />
<exclude
name="com/vaadin/sass/internal/parser/ParserTokenManager.java" />
</fileset>
<formatter type="xml"
toFile="${result.dir}/checkstyle-errors.xml" />
<property key="checkstyle.header.file" file="${cs.header-file}" />
</cs:checkstyle>
</target>
</project>

+ 186
- 184
gwt-files.xml View File

@@ -1,189 +1,191 @@
<?xml version="1.0"?>

<project name="GWT files for Vaadin" basedir=".">
<include file="common.xml" as="common" />

<property name="gwt.lib.dir" location="${gwt.basedir}/build/lib" />
<property name="gwt.eclipse.basedir" location="${gwt.basedir}/eclipse" />

<property name="gwt.user.jar" location="${gwt.lib.dir}/gwt-user.jar" />
<property name="gwt.dev.jar" location="${gwt.lib.dir}/gwt-dev.jar" />
<property name="gwt.elemental.jar" location="${gwt.lib.dir}/gwt-elemental.jar" />
<property name="gwt.codeserver.jar" location="${gwt.lib.dir}/gwt-codeserver.jar" />

<available file="${gwt.dev.jar}" property="gwt.dev.jar.found" />
<available file="${gwt.user.jar}" property="gwt.user.jar.found" />
<available file="${gwt.elemental.jar}" property="gwt.elemental.jar.found" />
<available file="${gwt.codeserver.jar}" property="gwt.codeserver.jar.found" />

<property name="gwt.unpack.dir" location="${vaadin.basedir}/build/gwt" />

<property name="gwt.user.jar.files" location="${gwt.unpack.dir}/gwt-user.jar" />
<property name="gwt.dev.jar.files" location="${gwt.unpack.dir}/gwt-dev.jar" />
<property name="gwt.elemental.jar.files" location="${gwt.unpack.dir}/gwt-elemental.jar" />
<property name="gwt.codeserver.jar.files" location="${gwt.unpack.dir}/gwt-codeserver.jar" />

<target name="unpack.gwt">
<fail unless="gwt.dev.jar.found" message="Could not find gwt-dev.jar at ${gwt.dev.jar}" />
<fail unless="gwt.user.jar.found" message="Could not find gwt-user.jar at ${gwt.user.jar}" />
<fail unless="gwt.elemental.jar.found" message="Could not find gwt-elemental.jar at ${gwt.elemental.jar}" />
<fail unless="gwt.codeserver.jar.found" message="Could not find gwt-codeserver.jar at ${gwt.codeserver.jar}" />

<delete dir="${gwt.unpack.dir}" />

<mkdir dir="${gwt.user.jar.files}" />
<mkdir dir="${gwt.dev.jar.files}" />
<mkdir dir="${gwt.elemental.jar.files}" />
<mkdir dir="${gwt.codeserver.jar.files}" />

<unzip dest="${gwt.user.jar.files}" src="${gwt.user.jar}" />
<unzip dest="${gwt.dev.jar.files}" src="${gwt.dev.jar}" />
<unzip dest="${gwt.elemental.jar.files}" src="${gwt.elemental.jar}" />
<unzip dest="${gwt.codeserver.jar.files}" src="${gwt.codeserver.jar}" />
</target>

<union id="client-compiler.gwt.includes">
<!-- GWT development JAR contents including many external dependencies
<include file="common.xml" as="common" />

<property name="gwt.lib.dir" location="${gwt.basedir}/build/lib" />
<property name="gwt.eclipse.basedir" location="${gwt.basedir}/eclipse" />

<property name="gwt.user.jar" location="${gwt.lib.dir}/gwt-user.jar" />
<property name="gwt.dev.jar" location="${gwt.lib.dir}/gwt-dev.jar" />
<property name="gwt.elemental.jar" location="${gwt.lib.dir}/gwt-elemental.jar" />
<property name="gwt.codeserver.jar" location="${gwt.lib.dir}/gwt-codeserver.jar" />

<available file="${gwt.dev.jar}" property="gwt.dev.jar.found" />
<available file="${gwt.user.jar}" property="gwt.user.jar.found" />
<available file="${gwt.elemental.jar}" property="gwt.elemental.jar.found" />
<available file="${gwt.codeserver.jar}" property="gwt.codeserver.jar.found" />

<property name="gwt.unpack.dir" location="${vaadin.basedir}/build/gwt" />

<property name="gwt.user.jar.files" location="${gwt.unpack.dir}/gwt-user.jar" />
<property name="gwt.dev.jar.files" location="${gwt.unpack.dir}/gwt-dev.jar" />
<property name="gwt.elemental.jar.files" location="${gwt.unpack.dir}/gwt-elemental.jar" />
<property name="gwt.codeserver.jar.files" location="${gwt.unpack.dir}/gwt-codeserver.jar" />

<target name="unpack.gwt">
<fail unless="gwt.dev.jar.found" message="Could not find gwt-dev.jar at ${gwt.dev.jar}" />
<fail unless="gwt.user.jar.found"
message="Could not find gwt-user.jar at ${gwt.user.jar}" />
<fail unless="gwt.elemental.jar.found"
message="Could not find gwt-elemental.jar at ${gwt.elemental.jar}" />
<fail unless="gwt.codeserver.jar.found"
message="Could not find gwt-codeserver.jar at ${gwt.codeserver.jar}" />

<delete dir="${gwt.unpack.dir}" />

<mkdir dir="${gwt.user.jar.files}" />
<mkdir dir="${gwt.dev.jar.files}" />
<mkdir dir="${gwt.elemental.jar.files}" />
<mkdir dir="${gwt.codeserver.jar.files}" />

<unzip dest="${gwt.user.jar.files}" src="${gwt.user.jar}" />
<unzip dest="${gwt.dev.jar.files}" src="${gwt.dev.jar}" />
<unzip dest="${gwt.elemental.jar.files}" src="${gwt.elemental.jar}" />
<unzip dest="${gwt.codeserver.jar.files}" src="${gwt.codeserver.jar}" />
</target>

<union id="client-compiler.gwt.includes">
<!-- GWT development JAR contents including many external dependencies
(for now) -->
<fileset dir="${gwt.dev.jar.files}">
<exclude name="META-INF/**" />
<exclude name="license*" />
<exclude name="LICENSE*" />

<!-- Packages in vaadin-shared-deps.jar or declared
as dependencies -->
<exclude name="com/google/gwt/thirdparty/guava/**" />
<exclude name="javax/servlet/**" />
<exclude name="javax/xml/**" />
<!-- cssparser -->
<exclude name="com/steadystate/css/**" />
<!-- Ant & AntLauncher -->
<exclude name="org/apache/tools/**" />
<!-- Jetty & jetty-util -->
<exclude name="org/mortbay/**" />
<!-- Swing Worker-->
<exclude name="org/jdesktop/swingworker/**" />
<!-- Apache commons codec & io & lang & collections & logging -->
<exclude name="org/apache/commons/codec/**" />
<exclude name="org/apache/commons/io/**" />
<exclude name="org/apache/commons/lang/**" />
<exclude name="org/apache/commons/collections/**" />
<exclude name="org/apache/commons/logging/**" />
<!-- apache mime4j -->
<exclude name="org/apache/james/mime4j/**" />

<!-- client-compiler-deps -->
<exclude name="com/gargoylesoftware/" />
<exclude name="com/google/common/" />
<exclude name="com/google/debugging/" />
<exclude name="com/google/gwt/dev/protobuf/" />
<exclude name="com/google/gwt/thirdparty/debugging/" />
<exclude name="com/google/gwt/thirdparty/javascript/" />
<exclude name="com/google/gwt/thirdparty/mozilla/" />
<exclude name="com/ibm/" />
<exclude name="externs.zip" />
<exclude name="java_cup/" />
<exclude name="javax/annotation/" />
<exclude name="net/sourceforge/htmlunit/" />
<exclude name="org/apache/bcel/" />
<exclude name="org/apache/html/" />
<exclude name="org/apache/http/" />
<exclude name="org/apache/NOTICE" />
<exclude name="org/apache/regexp/" />
<exclude name="org/apache/tapestry/" />
<exclude name="org/apache/wml/" />
<exclude name="org/apache/xalan/" />
<exclude name="org/apache/xerces/" />
<exclude name="org/apache/xml/" />
<exclude name="org/apache/xmlcommons/" />
<exclude name="org/apache/xpath/" />
<exclude name="org/cyberneko/" />
<exclude name="org/eclipse/" />
<exclude name="org/kohsuke/" />
<exclude name="org/w3c/" />
<exclude name="org/xml/" />
<exclude name="rhino_ast/" />
<exclude name="rhinoDiff.txt" />
<exclude name="trax/" />
<exclude name="unicode-license.txt" />
<exclude name="org/json" />

<exclude name="license/NOTICE" />
<exclude name="license/LICENSE.dom-documentation.txt" />
<exclude name="license/LICENSE.dom-software.txt" />
<exclude name="license/LICENSE" />
<exclude name="license/README.dom.txt" />
<exclude name="license/README.sax.txt" />

<!-- Overridden in Vaadin -->
<exclude name="com/google/gwt/dev/About.properties" />

</fileset>

<!-- GWT SuperDevMode -->
<fileset dir="${gwt.codeserver.jar.files}">
<exclude name="META-INF/**" />
</fileset>
</union>

<union id="client-compiled-cache.gwt.includes">
<!-- Precompiled GWT modules (.gwtar file) -->
<fileset dir="${gwt.user.jar.files}">
<exclude name="META-INF/**" />

<!-- precompiled GWT modules (.gwtar) -->
<include name="**/*.gwtar" />
<!-- external dependencies -->
<exclude name="javax/servlet/**" />
<exclude name="org/w3c/css/sac/**" />

</fileset>
</union>

<union id="client.gwt.includes">
<fileset dir="${gwt.user.jar.files}">
<exclude name="META-INF/**" />
<!-- precompiled GWT modules (.gwtar) goes into client-compiled -->
<exclude name="**/*.gwtar" />
<!-- These go into server -->
<exclude name="com/google/gwt/*/server/**" />
<!-- These go into shared -->
<exclude name="com/google/gwt/*/shared/**" />
<exclude name="com/google/gwt/*/*/shared/**" />
<exclude name="com/google/web/bindery/*/shared/**" />

<!-- Used by the server, in wrong package in GWT -->
<exclude name="com/google/gwt/user/client/rpc/IsSerializable.*" />

<!-- These are in vaadin-shared-deps -->
<exclude name="com/google/gwt/thirdparty/streamhtmlparser/**" />
<exclude name="org/w3c/flute/**" />

<!-- external dependencies -->
<exclude name="javax/servlet/**" />
<exclude name="org/w3c/css/sac/**" />
</fileset>
<!-- GWT Elemental -->
<fileset dir="${gwt.elemental.jar.files}">
<exclude name="META-INF/**" />
</fileset>
</union>

<union id="shared.gwt.includes">
<fileset dir="${gwt.user.jar.files}">
<!-- Shared files from user -->
<include name="com/google/gwt/*/shared/**" />
<include name="com/google/gwt/*/*/shared/**" />
<include name="com/google/web/bindery/*/shared/**" />
<include name="com/google/gwt/user/client/rpc/IsSerializable.*" />

</fileset>
</union>

<union id="server.gwt.includes">
<fileset dir="${gwt.user.jar.files}">
<!-- Server files from gwt-user -->
<include name="com/google/gwt/*/server/**" />
</fileset>
</union>
<fileset dir="${gwt.dev.jar.files}">
<exclude name="META-INF/**" />
<exclude name="license*" />
<exclude name="LICENSE*" />

<!-- Packages in vaadin-shared-deps.jar or declared as dependencies -->
<exclude name="com/google/gwt/thirdparty/guava/**" />
<exclude name="javax/servlet/**" />
<exclude name="javax/xml/**" />
<!-- cssparser -->
<exclude name="com/steadystate/css/**" />
<!-- Ant & AntLauncher -->
<exclude name="org/apache/tools/**" />
<!-- Jetty & jetty-util -->
<exclude name="org/mortbay/**" />
<!-- Swing Worker -->
<exclude name="org/jdesktop/swingworker/**" />
<!-- Apache commons codec & io & lang & collections & logging -->
<exclude name="org/apache/commons/codec/**" />
<exclude name="org/apache/commons/io/**" />
<exclude name="org/apache/commons/lang/**" />
<exclude name="org/apache/commons/collections/**" />
<exclude name="org/apache/commons/logging/**" />
<!-- apache mime4j -->
<exclude name="org/apache/james/mime4j/**" />

<!-- client-compiler-deps -->
<exclude name="com/gargoylesoftware/" />
<exclude name="com/google/common/" />
<exclude name="com/google/debugging/" />
<exclude name="com/google/gwt/dev/protobuf/" />
<exclude name="com/google/gwt/thirdparty/debugging/" />
<exclude name="com/google/gwt/thirdparty/javascript/" />
<exclude name="com/google/gwt/thirdparty/mozilla/" />
<exclude name="com/ibm/" />
<exclude name="externs.zip" />
<exclude name="java_cup/" />
<exclude name="javax/annotation/" />
<exclude name="net/sourceforge/htmlunit/" />
<exclude name="org/apache/bcel/" />
<exclude name="org/apache/html/" />
<exclude name="org/apache/http/" />
<exclude name="org/apache/NOTICE" />
<exclude name="org/apache/regexp/" />
<exclude name="org/apache/tapestry/" />
<exclude name="org/apache/wml/" />
<exclude name="org/apache/xalan/" />
<exclude name="org/apache/xerces/" />
<exclude name="org/apache/xml/" />
<exclude name="org/apache/xmlcommons/" />
<exclude name="org/apache/xpath/" />
<exclude name="org/cyberneko/" />
<exclude name="org/eclipse/" />
<exclude name="org/kohsuke/" />
<exclude name="org/w3c/" />
<exclude name="org/xml/" />
<exclude name="rhino_ast/" />
<exclude name="rhinoDiff.txt" />
<exclude name="trax/" />
<exclude name="unicode-license.txt" />
<exclude name="org/json" />

<exclude name="license/NOTICE" />
<exclude name="license/LICENSE.dom-documentation.txt" />
<exclude name="license/LICENSE.dom-software.txt" />
<exclude name="license/LICENSE" />
<exclude name="license/README.dom.txt" />
<exclude name="license/README.sax.txt" />

<!-- Overridden in Vaadin -->
<exclude name="com/google/gwt/dev/About.properties" />

</fileset>

<!-- GWT SuperDevMode -->
<fileset dir="${gwt.codeserver.jar.files}">
<exclude name="META-INF/**" />
</fileset>
</union>

<union id="client-compiled-cache.gwt.includes">
<!-- Precompiled GWT modules (.gwtar file) -->
<fileset dir="${gwt.user.jar.files}">
<exclude name="META-INF/**" />

<!-- precompiled GWT modules (.gwtar) -->
<include name="**/*.gwtar" />
<!-- external dependencies -->
<exclude name="javax/servlet/**" />
<exclude name="org/w3c/css/sac/**" />

</fileset>
</union>

<union id="client.gwt.includes">
<fileset dir="${gwt.user.jar.files}">
<exclude name="META-INF/**" />
<!-- precompiled GWT modules (.gwtar) goes into client-compiled -->
<exclude name="**/*.gwtar" />
<!-- These go into server -->
<exclude name="com/google/gwt/*/server/**" />
<!-- These go into shared -->
<exclude name="com/google/gwt/*/shared/**" />
<exclude name="com/google/gwt/*/*/shared/**" />
<exclude name="com/google/web/bindery/*/shared/**" />

<!-- Used by the server, in wrong package in GWT -->
<exclude name="com/google/gwt/user/client/rpc/IsSerializable.*" />

<!-- These are in vaadin-shared-deps -->
<exclude name="com/google/gwt/thirdparty/streamhtmlparser/**" />
<exclude name="org/w3c/flute/**" />

<!-- external dependencies -->
<exclude name="javax/servlet/**" />
<exclude name="org/w3c/css/sac/**" />
</fileset>
<!-- GWT Elemental -->
<fileset dir="${gwt.elemental.jar.files}">
<exclude name="META-INF/**" />
</fileset>
</union>

<union id="shared.gwt.includes">
<fileset dir="${gwt.user.jar.files}">
<!-- Shared files from user -->
<include name="com/google/gwt/*/shared/**" />
<include name="com/google/gwt/*/*/shared/**" />
<include name="com/google/web/bindery/*/shared/**" />
<include name="com/google/gwt/user/client/rpc/IsSerializable.*" />

</fileset>
</union>

<union id="server.gwt.includes">
<fileset dir="${gwt.user.jar.files}">
<!-- Server files from gwt-user -->
<include name="com/google/gwt/*/server/**" />
</fileset>
</union>
</project>

+ 19
- 19
ivy-taskdefs.xml View File

@@ -1,24 +1,24 @@

<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
xmlns: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="taskdefs" description="Ant task definitions"
visibility="private" />
</configurations>
<publications />
<dependencies>
<!-- 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" />
<dependency org="com.puppycrawl.tools" name="checkstyle"
rev="5.6" />
</dependencies>
<info organisation="com.vaadin" module="vaadin" />
<configurations>
<conf name="taskdefs" description="Ant task definitions"
visibility="private" />
</configurations>
<publications />
<dependencies>
<!-- 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" />
<dependency org="com.puppycrawl.tools" name="checkstyle"
rev="5.6" />
</dependencies>

</ivy-module>

+ 2
- 1
ivysettings.xml View File

@@ -17,7 +17,8 @@
</filesystem>
<dual name="custom-smartsprites">
<url name="smartsprites-ivy">
<ivy pattern="http://vaadin.com/download/external/[module]-ivy-[revision].xml" />
<ivy
pattern="http://vaadin.com/download/external/[module]-ivy-[revision].xml" />
</url>
<url name="smartsprites-artifact">
<artifact

+ 70
- 57
publish.xml View File

@@ -1,74 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="publish" basedir="." default="" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<include file="common.xml" as="common" />
<include file="build.xml" as="vaadin" />
<project name="publish" basedir="." default=""
xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib"
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<include file="common.xml" as="common" />
<include file="build.xml" as="vaadin" />

<!-- Dummy value as ivysettings-publish require a value -->
<property name="publish.sftp.keyfile" value="/dummy" />
<property name="publish.sftp.ivy.pattern" value="dummy" />
<!-- Dummy value as ivysettings-publish require a value -->
<property name="publish.sftp.keyfile" value="/dummy" />
<property name="publish.sftp.ivy.pattern" value="dummy" />

<ivy:settings file="ivysettings.xml" />
<ivy:settings file="ivysettings-publish.xml" id="publish.settings" />
<property file="publish.properties" />
<ivy:settings file="ivysettings.xml" />
<ivy:settings file="ivysettings-publish.xml" id="publish.settings" />
<property file="publish.properties" />

<available property="ant-jsch.present" file="${ant.home}/lib/ant-jsch.jar" />
<available property="jsch.present" file="${ant.home}/lib/jsch-0.1.48.jar" />
<fail unless="ant-jsch.present" message="Please install ant-jsch.jar into ANT_HOME/lib" />
<fail unless="jsch.present" message="Please install jsch.jar into ANT_HOME/lib" />
<available property="ant-jsch.present" file="${ant.home}/lib/ant-jsch.jar" />
<available property="jsch.present" file="${ant.home}/lib/jsch-0.1.48.jar" />
<fail unless="ant-jsch.present" message="Please install ant-jsch.jar into ANT_HOME/lib" />
<fail unless="jsch.present" message="Please install jsch.jar into ANT_HOME/lib" />

<target name="nightly.publish" depends="nightly.download.publish, nightly.maven.publish">
<target name="nightly.publish"
depends="nightly.download.publish, nightly.maven.publish">

</target>
</target>

<!-- Copies the nightly build artifacts to the download server. -->
<target name="nightly.tests.publish" if="nightly.tests.publish">
<property name="file.war" location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${version}.war" />
<property name="target" value="${nightly.tests.publish}/${vaadin.version.major}.${vaadin.version.minor}-${build.tag}.war" />
<!-- Copies the nightly build artifacts to the download server. -->
<target name="nightly.tests.publish" if="nightly.tests.publish">
<property name="file.war"
location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${version}.war" />
<property name="target"
value="${nightly.tests.publish}/${vaadin.version.major}.${vaadin.version.minor}-${build.tag}.war" />

<echo>Installing ${src} to ${target}</echo>
<echo>Installing ${src} to ${target}</echo>

<scp todir="${nightly.tests.publish}" file="${file.war}">
</scp>
</target>
<scp todir="${nightly.tests.publish}" file="${file.war}">
</scp>
</target>

<target name="nightly.download.publish">
<antcontrib:foreach list="${modules.to.publish.to.download}" target="publish.module.to.download.site" param="module" />
</target>
<target name="nightly.download.publish">
<antcontrib:foreach list="${modules.to.publish.to.download}"
target="publish.module.to.download.site" param="module" />
</target>

<target name="nightly.maven.publish">
<antcontrib:foreach list="${modules.to.publish.to.maven}" target="publish.module.to.maven" param="module" />
</target>
<target name="nightly.maven.publish">
<antcontrib:foreach list="${modules.to.publish.to.maven}"
target="publish.module.to.maven" param="module" />
</target>

<target name="publish.module.to.download.site">
<fail unless="module" message="No module to publish defined" />
<ivy:resolve file="${module}/ivy.xml" />
<ivy:publish publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sftp-publish">
<artifacts pattern="${ivy.settings.dir}/result/artifacts/[revision]/[module]/[artifact]-[revision](-[classifier]).[ext]" />
</ivy:publish>
</target>
<target name="publish.module.to.download.site">
<fail unless="module" message="No module to publish defined" />
<ivy:resolve file="${module}/ivy.xml" />
<ivy:publish publishivy="false" settingsref="publish.settings"
conf="*(public)" resolver="sftp-publish">
<artifacts
pattern="${ivy.settings.dir}/result/artifacts/[revision]/[module]/[artifact]-[revision](-[classifier]).[ext]" />
</ivy:publish>
</target>

<target name="publish.module.to.maven">
<fail unless="module" message="No module to publish defined" />
<property file="${gpg.passphrase.file}" />
<target name="publish.module.to.maven">
<fail unless="module" message="No module to publish defined" />
<property file="${gpg.passphrase.file}" />

<!-- Ivy should be able to handle this but this does not work at the moment
<ivy:resolve file="${module}/ivy.xml" />
<ivy:publish pubrevision="7.0-SNAPSHOT" publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sonatype">
<artifacts pattern="${ivy.settings.dir}/result/artifacts/${vaadin.version}/[module]/[artifact]-${vaadin.version}(-[classifier]).[ext]" />
</ivy:publish>
-->
<property name="jar.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.jar" />
<property name="pom.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.pom" />
<!-- Ivy should be able to handle this but this does not work at
the moment <ivy:resolve file="${module}/ivy.xml" /> <ivy:publish pubrevision="7.0-SNAPSHOT"
publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sonatype">
<artifacts pattern="${ivy.settings.dir}/result/artifacts/${vaadin.version}/[module]/[artifact]-${vaadin.version}(-[classifier]).[ext]"
/> </ivy:publish> -->
<property name="jar.file"
location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.jar" />
<property name="pom.file"
location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.pom" />

<artifact:mvn failonerror="true">
<arg value="gpg:sign-and-deploy-file" />
<sysproperty key="file" value="${jar.file}" />
<sysproperty key="pomFile" value="${pom.file}" />
<sysproperty key="repositoryId" value="${maven.snapshot.repository.id}" />
<sysproperty key="url" value="${maven.snapshot.repository.url}" />
<sysproperty key="gpg.passphrase" value="${gpg.passphrase}" />
<sysproperty key="retryFailedDeploymentCount" value="10" />
</artifact:mvn>
</target>
<artifact:mvn failonerror="true">
<arg value="gpg:sign-and-deploy-file" />
<sysproperty key="file" value="${jar.file}" />
<sysproperty key="pomFile" value="${pom.file}" />
<sysproperty key="repositoryId"
value="${maven.snapshot.repository.id}" />
<sysproperty key="url"
value="${maven.snapshot.repository.url}" />
<sysproperty key="gpg.passphrase" value="${gpg.passphrase}" />
<sysproperty key="retryFailedDeploymentCount"
value="10" />
</artifact:mvn>
</target>

</project>

+ 71
- 60
push/build.xml View File

@@ -1,73 +1,84 @@
<?xml version="1.0"?>

<project name="vaadin-push" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Meta package which defines dependencies needed for push
</description>
<include file="../build.xml" as="vaadin" />
<include file="../common.xml" as="common" />
<project name="vaadin-push" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Meta package which defines dependencies needed for push
</description>
<include file="../build.xml" as="vaadin" />
<include file="../common.xml" as="common" />

<property name="module.name" value="vaadin-push" />
<property name="module.symbolic" value="com.vaadin.push" />
<property name="result.dir" location="result" />
<property name="vaadinPush.js" location="${result.dir}/js/VAADIN/vaadinPush.js" />
<property name="module.name" value="vaadin-push" />
<property name="module.symbolic" value="com.vaadin.push" />
<property name="result.dir" location="result" />
<property name="vaadinPush.js" location="${result.dir}/js/VAADIN/vaadinPush.js" />

<!-- Keep the version number in sync with ivy.xml -->
<property name="atmosphere.version" value="1.0.13" />
<property name="jquery.version" value="1.7.2" />
<!-- Keep the version number in sync with ivy.xml -->
<property name="atmosphere.version" value="1.0.13" />
<property name="jquery.version" value="1.7.2" />

<path id="classpath.compile.custom" />
<path id="classpath.compile.custom" />

<union id="jar.includes">
<fileset dir="${result.dir}/js">
<include name="VAADIN/vaadinPush.js" />
</fileset>
</union>
<union id="jar.includes">
<fileset dir="${result.dir}/js">
<include name="VAADIN/vaadinPush.js" />
</fileset>
</union>

<target name="vaadinPush.js">
<mkdir dir="${result.dir}/js/VAADIN" />
<property name="vaadinPush.js.output" location="${result.dir}/js/VAADIN/vaadinPush.js" />
<property name="vaadinPush.js.combined.output" location="${result.dir}/js/VAADIN/push.combined.js" />
<target name="vaadinPush.js">
<mkdir dir="${result.dir}/js/VAADIN" />
<property name="vaadinPush.js.output" location="${result.dir}/js/VAADIN/vaadinPush.js" />
<property name="vaadinPush.js.combined.output"
location="${result.dir}/js/VAADIN/push.combined.js" />

<loadfile srcfile="${vaadin.basedir}/WebContent/VAADIN/jquery-${jquery.version}.js" property="jquery.js.contents" />
<loadfile srcfile="${vaadin.basedir}/WebContent/VAADIN/jquery.atmosphere.js" property="jquery.atmosphere.js.contents" />
<loadfile srcfile="${vaadin.basedir}/WebContent/VAADIN/vaadinPush.js.tpl" property="vaadinPush.js.contents">
<filterchain>
<replacetokens begintoken="@" endtoken="@">
<token key="jquery.js" value="${jquery.js.contents}" />
<token key="jquery.atmosphere.js" value="${jquery.atmosphere.js.contents}" />
</replacetokens>
</filterchain>
</loadfile>
<echo file="${vaadinPush.js.combined.output}">${vaadinPush.js.contents}</echo>
<loadfile
srcfile="${vaadin.basedir}/WebContent/VAADIN/jquery-${jquery.version}.js"
property="jquery.js.contents" />
<loadfile
srcfile="${vaadin.basedir}/WebContent/VAADIN/jquery.atmosphere.js"
property="jquery.atmosphere.js.contents" />
<loadfile
srcfile="${vaadin.basedir}/WebContent/VAADIN/vaadinPush.js.tpl"
property="vaadinPush.js.contents">
<filterchain>
<replacetokens begintoken="@" endtoken="@">
<token key="jquery.js" value="${jquery.js.contents}" />
<token key="jquery.atmosphere.js" value="${jquery.atmosphere.js.contents}" />
</replacetokens>
</filterchain>
</loadfile>
<echo file="${vaadinPush.js.combined.output}">${vaadinPush.js.contents}</echo>

<!-- Minify -->
<ivy:retrieve organisation="com.yahoo.platform.yui" module="yuicompressor" revision="2.4.7" inline="true" type="jar" pattern="${result.dir}/compressor.jar" />
<java jar="${result.dir}/compressor.jar" fork="true">
<arg value="-v"/>
<arg value="-o"/>
<arg file="${vaadinPush.js.output}"/>
<arg file="${vaadinPush.js.combined.output}"/>
</java>
</target>
<target name="jar" depends="vaadinPush.js">
<antcall target="common.jar">
<param name="require-bundle" value="org.atmosphere.atmosphere-runtime;bundle-version=&quot;${atmosphere.version}&quot;;visibility:=reexport" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>
<!-- Minify -->
<ivy:retrieve organisation="com.yahoo.platform.yui"
module="yuicompressor" revision="2.4.7" inline="true" type="jar"
pattern="${result.dir}/compressor.jar" />
<java jar="${result.dir}/compressor.jar" fork="true">
<arg value="-v" />
<arg value="-o" />
<arg file="${vaadinPush.js.output}" />
<arg file="${vaadinPush.js.combined.output}" />
</java>
</target>

<target name="publish-local" depends="jar">
<antcall target="common.publish-local" />
</target>
<target name="jar" depends="vaadinPush.js">
<antcall target="common.jar">
<param name="require-bundle"
value="org.atmosphere.atmosphere-runtime;bundle-version=&quot;${atmosphere.version}&quot;;visibility:=reexport" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>

<target name="clean">
<antcall target="common.clean" />
</target>
<target name="checkstyle">
</target>
<target name="publish-local" depends="jar">
<antcall target="common.publish-local" />
</target>

<target name="test" depends="checkstyle">
</target>
<target name="clean">
<antcall target="common.clean" />
</target>
<target name="checkstyle">
</target>

<target name="test" depends="checkstyle">
</target>
</project>

+ 7
- 10
push/ivy.xml View File

@@ -4,8 +4,7 @@
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
xmlns:m="http://ant.apache.org/ivy/maven">

<info organisation="com.vaadin" module="vaadin-push"
revision="${vaadin.version}" />
<info organisation="com.vaadin" module="vaadin-push" revision="${vaadin.version}" />

<configurations>
<conf name="build" />
@@ -15,23 +14,21 @@
</configurations>
<publications>
<artifact type="jar" ext="jar" />
<!--
<artifact type="source" ext="jar" m:classifier="sources" />
<artifact type="javadoc" ext="jar" m:classifier="javadoc" />
-->
<!-- <artifact type="source" ext="jar" m:classifier="sources" />
<artifact type="javadoc" ext="jar" m:classifier="javadoc" /> -->
<artifact type="pom" ext="pom" />
</publications>
<dependencies>
<!-- API DEPENDENCIES -->
<!--Servlet API version 2.4 -->
<dependency org="javax.servlet" name="servlet-api"
rev="2.4" conf="build-provided,ide,test -> default" />
<!-- Atmosphere -->
<!-- Keep the version number in sync with build.xml -->
<dependency org="org.atmosphere" name="atmosphere-runtime" rev="1.0.13"
conf="build,ide,test -> default">
<dependency org="org.atmosphere" name="atmosphere-runtime"
rev="1.0.13" conf="build,ide,test -> default">
</dependency>
</dependencies>


+ 58
- 55
server/build.xml View File

@@ -1,60 +1,63 @@
<?xml version="1.0"?>

<project name="vaadin-server" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-server" />
<property name="module.symbolic" value="com.vaadin.server" />
<property name="result.dir" value="result" />
<path id="classpath.compile.custom" />
<path id="classpath.test.custom" />

<union id="jar.includes">
<union refid="server.gwt.includes" />
<fileset dir="${vaadin.basedir}/WebContent">
<include name="VAADIN/vaadinBootstrap.js" />
</fileset>
</union>

<target name="jar">
<property name="server.osgi.import" value="javax.servlet;version=&quot;2.4.0&quot;,javax.servlet.http;version=&quot;2.4.0&quot;,org.jsoup;version=&quot;1.6.3&quot;,org.jsoup.parser;version=&quot;1.6.3&quot;,org.jsoup.nodes;version=&quot;1.6.3&quot;,org.jsoup.helper;version=&quot;1.6.3&quot;,org.jsoup.safety;version=&quot;1.6.3&quot;,org.json;version=&quot;0.0.20080701&quot;" />
<property name="server.osgi.require" value="com.vaadin.shared;bundle-version=&quot;${vaadin.version}&quot;,com.vaadin.push;bundle-version=&quot;${vaadin.version}&quot;;resolution:=optional" />
<antcall target="common.jar">
<param name="require-bundle" value="${server.osgi.require}" />
<param name="import-package" value="${server.osgi.import}" />
<param name="osgi.extra.package.prefixes" value="VAADIN" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>

<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="server.gwt.includes" />
</antcall>
<antcall target="common.javadoc.jar" />

<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>

<target name="test" depends="checkstyle">
<antcall target="common.test.run" />
</target>
<project name="vaadin-server" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-server" />
<property name="module.symbolic" value="com.vaadin.server" />
<property name="result.dir" value="result" />
<path id="classpath.compile.custom" />
<path id="classpath.test.custom" />

<union id="jar.includes">
<union refid="server.gwt.includes" />
<fileset dir="${vaadin.basedir}/WebContent">
<include name="VAADIN/vaadinBootstrap.js" />
</fileset>
</union>

<target name="jar">
<property name="server.osgi.import"
value="javax.servlet;version=&quot;2.4.0&quot;,javax.servlet.http;version=&quot;2.4.0&quot;,org.jsoup;version=&quot;1.6.3&quot;,org.jsoup.parser;version=&quot;1.6.3&quot;,org.jsoup.nodes;version=&quot;1.6.3&quot;,org.jsoup.helper;version=&quot;1.6.3&quot;,org.jsoup.safety;version=&quot;1.6.3&quot;,org.json;version=&quot;0.0.20080701&quot;" />
<property name="server.osgi.require"
value="com.vaadin.shared;bundle-version=&quot;${vaadin.version}&quot;,com.vaadin.push;bundle-version=&quot;${vaadin.version}&quot;;resolution:=optional" />
<antcall target="common.jar">
<param name="require-bundle" value="${server.osgi.require}" />
<param name="import-package" value="${server.osgi.import}" />
<param name="osgi.extra.package.prefixes" value="VAADIN" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>

<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="server.gwt.includes" />
</antcall>
<antcall target="common.javadoc.jar" />

<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>

<target name="test" depends="checkstyle">
<antcall target="common.test.run" />
</target>


</project>

+ 5
- 7
server/ivy.xml View File

@@ -45,8 +45,8 @@
rev="${vaadin.version}" conf="build,test->build" />
<dependency org="com.vaadin" name="vaadin-theme-compiler"
rev="${vaadin.version}" conf="build,test->build" />
<dependency org="com.vaadin" name="vaadin-push"
rev="${vaadin.version}" conf="build-provided,test->build" />
<dependency org="com.vaadin" name="vaadin-push" rev="${vaadin.version}"
conf="build-provided,test->build" />

<!-- Jsoup for BootstrapHandler -->
<dependency org="org.jsoup" name="jsoup" rev="1.6.3"
@@ -70,12 +70,10 @@
conf="test -> default" />
<dependency org="org.hibernate" name="hibernate-validator"
rev="4.2.0.Final" conf="test -> default" />
<!-- For manual testing with PostgreSQL (see SQLTestConstants) -->
<!--
<dependency org="postgresql" name="postgresql"
rev="9.1-901.jdbc3" conf="test,ide->default" />
-->
<!-- <dependency org="postgresql" name="postgresql" rev="9.1-901.jdbc3"
conf="test,ide->default" /> -->

</dependencies>


+ 54
- 52
shared/build.xml View File

@@ -1,64 +1,66 @@
<?xml version="1.0"?>

<project name="vaadin-shared" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />
<project name="vaadin-shared" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-shared" />
<property name="module.symbolic" value="com.vaadin.shared" />
<property name="result.dir" location="result" />
<property name="src.filtered" location="${result.dir}/filtered-src" />
<property name="src" location="${src.filtered}" />
<path id="classpath.compile.custom" />
<!-- global properties -->
<property name="module.name" value="vaadin-shared" />
<property name="module.symbolic" value="com.vaadin.shared" />
<property name="result.dir" location="result" />
<property name="src.filtered" location="${result.dir}/filtered-src" />
<property name="src" location="${src.filtered}" />
<path id="classpath.compile.custom" />


<target name="jar">
<property name="shared.osgi.import" value="org.json;version=&quot;0.0.20080701&quot;, com.google.gwt.thirdparty.guava.common.annotations;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.base;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.base.internal;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.cache;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.collect;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.eventbus;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.io;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.net;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.primitives;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.util.concurrent;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.streamhtmlparser;version=&quot;0.1.5.r10-rebased&quot;, com.google.gwt.thirdparty.streamhtmlparser.impl;version=&quot;0.1.5.r10-rebased&quot;, com.google.gwt.thirdparty.streamhtmlparser.util;version=&quot;0.1.5.r10-rebased&quot;, org.w3c.flute.parser;version=&quot;1.3.0.gg2&quot;, org.w3c.flute.parser.selectors;version=&quot;1.3.0.gg2&quot;, org.w3c.flute.util;version=&quot;1.3.0.gg2&quot;" />
<delete dir="${src.filtered}" />
<!-- Update version in Version.java -->
<copy todir="${src.filtered}">
<fileset dir="src">
</fileset>
<filterchain>
<replacetokens begintoken="@" endtoken="@">
<token key="VERSION" value="${vaadin.version}" />
</replacetokens>
</filterchain>
</copy>
<target name="jar">
<property name="shared.osgi.import"
value="org.json;version=&quot;0.0.20080701&quot;, com.google.gwt.thirdparty.guava.common.annotations;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.base;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.base.internal;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.cache;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.collect;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.eventbus;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.io;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.net;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.primitives;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.guava.common.util.concurrent;version=&quot;10.0.1.rebased&quot;, com.google.gwt.thirdparty.streamhtmlparser;version=&quot;0.1.5.r10-rebased&quot;, com.google.gwt.thirdparty.streamhtmlparser.impl;version=&quot;0.1.5.r10-rebased&quot;, com.google.gwt.thirdparty.streamhtmlparser.util;version=&quot;0.1.5.r10-rebased&quot;, org.w3c.flute.parser;version=&quot;1.3.0.gg2&quot;, org.w3c.flute.parser.selectors;version=&quot;1.3.0.gg2&quot;, org.w3c.flute.util;version=&quot;1.3.0.gg2&quot;" />
<delete dir="${src.filtered}" />
<!-- Update version in Version.java -->
<copy todir="${src.filtered}">
<fileset dir="src">
</fileset>
<filterchain>
<replacetokens begintoken="@" endtoken="@">
<token key="VERSION" value="${vaadin.version}" />
</replacetokens>
</filterchain>
</copy>

<antcall target="common.jar">
<param name="import-package" value="${shared.osgi.import}" />
<reference refid="shared.gwt.includes" torefid="extra.jar.includes" />
</antcall>
</target>
<antcall target="common.jar">
<param name="import-package" value="${shared.osgi.import}" />
<reference refid="shared.gwt.includes" torefid="extra.jar.includes" />
</antcall>
</target>

<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="shared.gwt.includes" />
</antcall>
<antcall target="common.javadoc.jar" />
<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="shared.gwt.includes" />
</antcall>
<antcall target="common.javadoc.jar" />

<antcall target="common.publish-local" />
</target>
<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>
<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>
<target name="clean">
<antcall target="common.clean" />
</target>

<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" />-->
<echo>WHAT? No tests for ${module.name}!</echo>
</target>
<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>

<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" /> -->
<echo>WHAT? No tests for ${module.name}!</echo>
</target>

</project>

+ 60
- 54
theme-compiler/build.xml View File

@@ -1,58 +1,64 @@
<?xml version="1.0"?>

<project name="vaadin-theme-compiler" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-theme-compiler" />
<property name="module.symbolic" value="com.vaadin.theme-compiler" />
<property name="result.dir" value="result" />
<property name="sass.parser.jj" location="src/com/vaadin/sass/internal/parser/Parser.jj" />
<path id="classpath.compile.custom">
</path>
<path id="classpath.test.custom" />

<!--<property name="classes.exclude" value="com/vaadin/buildhelpers/**" />-->

<target name="parser">
<!-- Copy javacc-5.0.jar to ${result.dir}/javacc/javacc.jar as the javacc task requires the jar to be named javacc.jar -->
<property name="javacc.home" location="${result.dir}/javacc" />
<ivy:retrieve organisation="net.java.dev.javacc" module="javacc" revision="5.0" inline="true" type="jar" pattern="${javacc.home}/[artifact].[ext]" />
<javacc target="${sass.parser.jj}" javacchome="${javacc.home}">
</javacc>
</target>

<target name="jar" depends="parser">
<antcall target="common.jar">
<reference torefid="extra.jar.includes" refid="empty.reference" />
</antcall>
</target>
<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="empty.reference" />
</antcall>
<antcall target="common.javadoc.jar" />

<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>

<target name="test" depends="checkstyle">
<antcall target="common.test.run" />
</target>
<project name="vaadin-theme-compiler" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiles build helpers used when building other modules.
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-theme-compiler" />
<property name="module.symbolic" value="com.vaadin.theme-compiler" />
<property name="result.dir" value="result" />
<property name="sass.parser.jj"
location="src/com/vaadin/sass/internal/parser/Parser.jj" />
<path id="classpath.compile.custom">
</path>
<path id="classpath.test.custom" />

<!--<property name="classes.exclude" value="com/vaadin/buildhelpers/**"
/> -->

<target name="parser">
<!-- Copy javacc-5.0.jar to ${result.dir}/javacc/javacc.jar as the
javacc task requires the jar to be named javacc.jar -->
<property name="javacc.home" location="${result.dir}/javacc" />
<ivy:retrieve organisation="net.java.dev.javacc"
module="javacc" revision="5.0" inline="true" type="jar"
pattern="${javacc.home}/[artifact].[ext]" />
<javacc target="${sass.parser.jj}" javacchome="${javacc.home}">
</javacc>
</target>

<target name="jar" depends="parser">
<antcall target="common.jar">
<reference torefid="extra.jar.includes" refid="empty.reference" />
</antcall>
</target>
<target name="publish-local" depends="jar">
<antcall target="common.sources.jar">
<reference torefid="extra.jar.includes" refid="empty.reference" />
</antcall>
<antcall target="common.javadoc.jar" />

<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<antcall target="common.checkstyle">
<param name="cs.src" location="src" />
</antcall>
</target>

<target name="test" depends="checkstyle">
<antcall target="common.test.run" />
</target>

</project>

+ 111
- 103
themes/build.xml View File

@@ -1,107 +1,115 @@
<?xml version="1.0"?>

<project name="vaadin-themes" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Themes compiled to CSS
</description>

<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-themes" />
<property name="module.symbolic" value="com.vaadin.themes" />
<property name="result.dir" value="result" />
<property name="theme.result.dir" value="${result.dir}/VAADIN/themes/" />

<union id="jar.includes">
<fileset dir="${result.dir}">
<include name="VAADIN/themes/**" />
</fileset>
</union>

<target name="compile-themes">
<ivy:resolve resolveid="common" conf="build" />
<ivy:cachepath pathid="classpath.compile.theme" conf="build" />

<antcall target="compile-theme">
<param name="theme" value="base" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="runo" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="reindeer" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="chameleon" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="liferay" />
</antcall>
</target>
<target name="jar" depends="compile-themes">
<antcall target="common.jar">
<param name="osgi.extra.package.prefixes" value="VAADIN/themes" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>

<target name="copy-theme">
<fail unless="theme" message="You must give the theme name to copy n the 'theme' parameter" />
<property name="theme.source.dir" location="../WebContent/VAADIN/themes" />

<copy todir="${theme.result.dir}">
<fileset dir="${theme.source.dir}">
<include name="${theme}/**" />
</fileset>
</copy>
</target>

<target name="compile-theme" depends="copy-theme">
<fail unless="theme" message="You must give the theme name to compile in the 'theme' parameter" />

<ivy:resolve resolveid="common" conf="compile-theme" />
<ivy:cachepath pathid="classpath.compile.theme" conf="compile-theme" />
<ivy:cachepath pathid="classpath.runtime.theme" conf="build" />

<echo>Compiling ${theme}</echo>
<mkdir dir="${theme.result.dir}" />

<!-- compile the theme -->
<java classname="com.vaadin.buildhelpers.CompileTheme" classpathref="classpath.compile.theme" failonerror="yes" fork="yes" maxmemory="512m">
<arg value="--theme" />
<arg value="${theme}" />
<arg value="--theme-folder" />
<arg value="${theme.result.dir}" />
<arg value="--theme-version" />
<arg value="${vaadin.version}" />
<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
</java>

</target>


<target name="publish-local" depends="jar">
<antcall target="common.publish-local">

</antcall>
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<echo>No java files in module</echo>
</target>
<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" />-->
<echo>WHAT? No tests for ${module.name}!</echo>
</target>
<project name="vaadin-themes" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Themes compiled to CSS
</description>

<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-themes" />
<property name="module.symbolic" value="com.vaadin.themes" />
<property name="result.dir" value="result" />
<property name="theme.result.dir" value="${result.dir}/VAADIN/themes/" />

<union id="jar.includes">
<fileset dir="${result.dir}">
<include name="VAADIN/themes/**" />
</fileset>
</union>

<target name="compile-themes">
<ivy:resolve resolveid="common" conf="build" />
<ivy:cachepath pathid="classpath.compile.theme"
conf="build" />

<antcall target="compile-theme">
<param name="theme" value="base" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="runo" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="reindeer" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="chameleon" />
</antcall>
<antcall target="compile-theme">
<param name="theme" value="liferay" />
</antcall>
</target>

<target name="jar" depends="compile-themes">
<antcall target="common.jar">
<param name="osgi.extra.package.prefixes" value="VAADIN/themes" />
<reference torefid="extra.jar.includes" refid="jar.includes" />
</antcall>
</target>

<target name="copy-theme">
<fail unless="theme"
message="You must give the theme name to copy n the 'theme' parameter" />
<property name="theme.source.dir" location="../WebContent/VAADIN/themes" />

<copy todir="${theme.result.dir}">
<fileset dir="${theme.source.dir}">
<include name="${theme}/**" />
</fileset>
</copy>
</target>

<target name="compile-theme" depends="copy-theme">
<fail unless="theme"
message="You must give the theme name to compile in the 'theme' parameter" />

<ivy:resolve resolveid="common" conf="compile-theme" />
<ivy:cachepath pathid="classpath.compile.theme"
conf="compile-theme" />
<ivy:cachepath pathid="classpath.runtime.theme"
conf="build" />

<echo>Compiling ${theme}</echo>
<mkdir dir="${theme.result.dir}" />

<!-- compile the theme -->
<java classname="com.vaadin.buildhelpers.CompileTheme"
classpathref="classpath.compile.theme" failonerror="yes"
fork="yes" maxmemory="512m">
<arg value="--theme" />
<arg value="${theme}" />
<arg value="--theme-folder" />
<arg value="${theme.result.dir}" />
<arg value="--theme-version" />
<arg value="${vaadin.version}" />
<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
</java>

</target>


<target name="publish-local" depends="jar">
<antcall target="common.publish-local">

</antcall>
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="checkstyle">
<echo>No java files in module</echo>
</target>
<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" /> -->
<echo>WHAT? No tests for ${module.name}!</echo>
</target>

</project>

+ 2
- 2
themes/ivy.xml View File

@@ -14,8 +14,8 @@
</configurations>
<publications>
<artifact type="jar" ext="jar" />
<!-- <artifact type="source" ext="jar" m:classifier="sources" /> -->
<!-- <artifact type="javadoc" ext="jar" m:classifier="javadoc" /> -->
<!-- <artifact type="source" ext="jar" m:classifier="sources" /> -->
<!-- <artifact type="javadoc" ext="jar" m:classifier="javadoc" /> -->
<artifact type="pom" ext="pom" />
</publications>
<dependencies>

+ 157
- 144
uitest/build.xml View File

@@ -1,148 +1,161 @@
<?xml version="1.0"?>

<project name="vaadin-uitest" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Provides a uitest WAR containing Vaadin UI tests
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />

<!-- global properties -->
<property name="module.name" value="vaadin-uitest" />
<property name="result.dir" value="result" />
<property name="result.war" location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />

<path id="classpath.compile.custom">
</path>

<target name="dependencies">
<!-- This is copied from common.xml to be able to add server.test.source to the source path -->

<ivy:resolve resolveid="common" conf="build, build-provided" />
<ivy:cachepath pathid="classpath.compile.dependencies" conf="build, build-provided" />
</target>

<target name="compile" description="Compiles the module" depends="dependencies">

<fail unless="module.name" message="No module name given" />
<property name="result.dir" location="result" />
<property name="src" location="${result.dir}/../src" />
<property name="classes" location="${result.dir}/classes" />
<property name="server.test.sources" location="${result.dir}/../../server/tests/src" />
<mkdir dir="${classes}" />

<!-- TODO: Get rid of this -->
<javac destdir="${classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
<src path="${server.test.sources}" />
<include name="com/vaadin/tests/data/bean/**" />
<include name="com/vaadin/tests/VaadinClasses.java" />
<include name="com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java" />
<classpath refid="classpath.compile.dependencies" />
<classpath refid="classpath.compile.custom" />
</javac>

<javac destdir="${classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
<src path="${src}" />
<classpath location="${classes}" />
<classpath refid="classpath.compile.dependencies" />
<classpath refid="classpath.compile.custom" />
</javac>
</target>

<target name="testing-widgetset" depends="dependencies,compile">
<property name="module" value="com.vaadin.tests.widgetset.TestingWidgetSet" />
<property name="style" value="OBF" />
<property name="localWorkers" value="2" />
<property name="extraParams" value="" />
<property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
<property name="work.dir" location="${result.dir}/work" />

<mkdir dir="${module.output.dir}" />

<echo>Compiling ${module} to ${module.output.dir}</echo>

<!-- compile the module -->
<java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.dependencies" failonerror="yes" fork="yes" maxmemory="512m">
<classpath location="src" />
<classpath location="${classes}" />
<arg value="-workDir" />
<arg value="${work.dir}" />
<arg value="-logLevel" />
<arg value="TRACE" />
<arg value="-war" />
<arg value="${module.output.dir}" />
<arg value="-style" />
<arg value="${style}" />

<arg value="-localWorkers" />
<arg value="${localWorkers}" />
<arg value="-strict" />
<arg line="${extraParams}" />
<arg value="${module}" />

<sysproperty key="vFailIfNotSerializable" value="true" />

<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
</java>

</target>

<target name="war" depends="dependencies, compile, testing-widgetset">
<property name="result.dir" location="result" />
<property name="classes" location="${result.dir}/classes" />
<property name="WebContent.dir" location="${vaadin.basedir}/WebContent" />
<property name="deps.dir" location="${result.dir}/deps" />
<property name="src" location="${result.dir}/../src" />

<ivy:resolve resolveid="common" conf="build" />
<ivy:cachepath pathid="classpath.runtime.dependencies" conf="build" />

<delete dir="${deps.dir}" />
<mkdir dir="${deps.dir}" />

<copy todir="${deps.dir}" flatten="true">
<path refid="classpath.runtime.dependencies" />
</copy>


<!-- Ensure filtered webcontent files are available -->
<antcall target="common.filter.webcontent" />

<war destfile="${result.war}" duplicate="fail" index="true">
<fileset refid="common.files.for.all.jars" />
<fileset dir="${result.dir}">
<include name="VAADIN/widgetsets/**/*"/>
</fileset>
<fileset dir="${WebContent.dir}">
<include name="statictestfiles/**" />
<include name="VAADIN/themes/tests-*/**" />
<include name="VAADIN/themes/reindeer-tests/**" />
<include name="WEB-INF/*.xml" />
</fileset>
<classes dir="${classes}" />
<classes dir="${src}" />
<lib dir="${deps.dir}" />
</war>

</target>

<target name="publish-local" depends="war">
<antcall target="common.publish-local">
<param name="conf" value="build" />
</antcall>
</target>

<target name="clean">
<antcall target="common.clean" />
</target>
<target name="checkstyle">
<echo>Checkstyle is disabled for uitest for now</echo>
</target>
<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" />-->
<echo>WHAT? No JUnit tests for ${module.name}!</echo>
</target>
<project name="vaadin-uitest" basedir="." default="publish-local"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Provides a uitest WAR containing Vaadin UI tests
</description>
<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />

<!-- global properties -->
<property name="module.name" value="vaadin-uitest" />
<property name="result.dir" value="result" />
<property name="result.war"
location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />

<path id="classpath.compile.custom">
</path>

<target name="dependencies">
<!-- This is copied from common.xml to be able to add server.test.source
to the source path -->

<ivy:resolve resolveid="common" conf="build, build-provided" />
<ivy:cachepath pathid="classpath.compile.dependencies"
conf="build, build-provided" />
</target>

<target name="compile" description="Compiles the module"
depends="dependencies">

<fail unless="module.name" message="No module name given" />
<property name="result.dir" location="result" />
<property name="src" location="${result.dir}/../src" />
<property name="classes" location="${result.dir}/classes" />
<property name="server.test.sources" location="${result.dir}/../../server/tests/src" />
<mkdir dir="${classes}" />

<!-- TODO: Get rid of this -->
<javac destdir="${classes}" source="${vaadin.java.version}"
target="${vaadin.java.version}" debug="true" encoding="UTF-8"
includeantruntime="false">
<src path="${server.test.sources}" />
<include name="com/vaadin/tests/data/bean/**" />
<include name="com/vaadin/tests/VaadinClasses.java" />
<include
name="com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java" />
<classpath refid="classpath.compile.dependencies" />
<classpath refid="classpath.compile.custom" />
</javac>

<javac destdir="${classes}" source="${vaadin.java.version}"
target="${vaadin.java.version}" debug="true" encoding="UTF-8"
includeantruntime="false">
<src path="${src}" />
<classpath location="${classes}" />
<classpath refid="classpath.compile.dependencies" />
<classpath refid="classpath.compile.custom" />
</javac>
</target>

<target name="testing-widgetset" depends="dependencies,compile">
<property name="module"
value="com.vaadin.tests.widgetset.TestingWidgetSet" />
<property name="style" value="OBF" />
<property name="localWorkers" value="2" />
<property name="extraParams" value="" />
<property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
<property name="work.dir" location="${result.dir}/work" />

<mkdir dir="${module.output.dir}" />

<echo>Compiling ${module} to ${module.output.dir}</echo>

<!-- compile the module -->
<java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.dependencies"
failonerror="yes" fork="yes" maxmemory="512m">
<classpath location="src" />
<classpath location="${classes}" />
<arg value="-workDir" />
<arg value="${work.dir}" />
<arg value="-logLevel" />
<arg value="TRACE" />
<arg value="-war" />
<arg value="${module.output.dir}" />
<arg value="-style" />
<arg value="${style}" />

<arg value="-localWorkers" />
<arg value="${localWorkers}" />
<arg value="-strict" />
<arg line="${extraParams}" />
<arg value="${module}" />

<sysproperty key="vFailIfNotSerializable" value="true" />

<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
</java>

</target>

<target name="war" depends="dependencies, compile, testing-widgetset">
<property name="result.dir" location="result" />
<property name="classes" location="${result.dir}/classes" />
<property name="WebContent.dir" location="${vaadin.basedir}/WebContent" />
<property name="deps.dir" location="${result.dir}/deps" />
<property name="src" location="${result.dir}/../src" />

<ivy:resolve resolveid="common" conf="build" />
<ivy:cachepath pathid="classpath.runtime.dependencies"
conf="build" />

<delete dir="${deps.dir}" />
<mkdir dir="${deps.dir}" />

<copy todir="${deps.dir}" flatten="true">
<path refid="classpath.runtime.dependencies" />
</copy>


<!-- Ensure filtered webcontent files are available -->
<antcall target="common.filter.webcontent" />

<war destfile="${result.war}" duplicate="fail" index="true">
<fileset refid="common.files.for.all.jars" />
<fileset dir="${result.dir}">
<include name="VAADIN/widgetsets/**/*" />
</fileset>
<fileset dir="${WebContent.dir}">
<include name="statictestfiles/**" />
<include name="VAADIN/themes/tests-*/**" />
<include name="VAADIN/themes/reindeer-tests/**" />
<include name="WEB-INF/*.xml" />
</fileset>
<classes dir="${classes}" />
<classes dir="${src}" />
<lib dir="${deps.dir}" />
</war>

</target>

<target name="publish-local" depends="war">
<antcall target="common.publish-local">
<param name="conf" value="build" />
</antcall>
</target>

<target name="clean">
<antcall target="common.clean" />
</target>
<target name="checkstyle">
<echo>Checkstyle is disabled for uitest for now</echo>
</target>
<target name="test" depends="checkstyle">
<!--<antcall target="common.test.run" /> -->
<echo>WHAT? No JUnit tests for ${module.name}!</echo>
</target>

</project>

+ 129
- 124
uitest/integration_base_files/base.xml View File

@@ -1,138 +1,143 @@
<?xml version="1.0"?>
<project name="test" basedir=".">
<property file="deploy.properties" />
<property file="deploy.properties" />
<property name="lock" value="deploy/lock.file" />
<property name="deployDir" value="deploy/${server}" />
<property name="serverPort" value="8080" />
<property name="war" value="demo.war" />
<property name="startupSpawn" value="false" />
<property name="JAVA_HOME" value="/usr/lib/jvm/default-java" />
<property name="waitMinutes" value="3" />
<property name="waitUrl" value="http://localhost:${serverPort}/demo/VAADIN/themes/reindeer/styles.css" />
<property name="shutdownWait" value="10" />
<property name="waitMinutes" value="3" />
<property name="waitUrl"
value="http://localhost:${serverPort}/demo/VAADIN/themes/reindeer/styles.css" />
<property name="shutdownWait" value="10" />


<target name="afterDeploy">
<!-- Empty default -->
<!-- Empty default -->
</target>
<target name="beforeDeploy">
<!-- Empty default -->
<!-- Empty default -->
</target>

<target name="deploy">
<antcall target="beforeDeploy" />
<echo
message="${server}: Deploying ${war} to ${deployDir}/${autodeployDir}" />
<copy file="${war}" todir="${deployDir}/${autodeployDir}" />
<antcall target="afterDeploy" />
</target>

<target name="deployStatic">
<unzip src="${war}" dest="${staticDeployDir}/tmp-unpack-jar/">
<patternset>
<include name="WEB-INF/lib/*.jar" />
</patternset>
</unzip>
<unzip dest="${staticDeployDir}">
<fileset dir="${staticDeployDir}/tmp-unpack-jar/WEB-INF/lib"
includes="*.jar" />

<patternset>
<include name="VAADIN/**" />
</patternset>
</unzip>
<delete dir="${staticDeployDir}/tmp-unpack-jar/" />

<unzip src="${war}" dest="${staticDeployDir}">
<patternset>
<include name="VAADIN/**" />
</patternset>
</unzip>
</target>

<target name="unpack-server">
<echo message="${server}: Unpacking ${server}.tar.gz" />
<delete dir="${server}" />
<exec executable="tar">
<arg value="-xf" />
<arg value="${server}.tar.gz" />
</exec>
<move file="${server}" tofile="${deployDir}" />
<echo message="Done." />
</target>

<target name="doStartup">
<exec executable="./run.sh" spawn="${startupSpawn}">
<env key="JAVA_HOME" value="${JAVA_HOME}" />
</exec>
</target>

<target name="startup">
<antcall target="doStartup" />
<echo message="${server}: Waiting for ${waitUrl} to become available." />
<waitfor maxwait="${waitMinutes}" maxwaitunit="minute"
checkevery="10000" timeoutproperty="timeout">
<http url="${waitUrl}" />
</waitfor>
<!-- Print load averages to get an indicator on whether the server
still attempts to start up -->
<exec executable="uptime" />
<fail if="timeout" message="${server} failed to deploy" />

<echo message="${server}: Demo deployed successfully." />
</target>

<target name="shutdown">
<exec executable="./stop.sh">
<env key="JAVA_HOME" value="${JAVA_HOME}" />
</exec>
<sleep seconds="${shutdownWait}" />
</target>

<target name="force-shutdown">
<exec executable="./cleanup.sh" />
</target>

<target name="check-port">
<fail
message="${server}: Something is still listening on port ${serverPort}">
<condition>
<socket server="localhost" port="${serverPort}" />
</condition>
</fail>
</target>

<target name="check-lock">
<available file="${lock}" property="lockAvailable" />
<fail unless="lockAvailable" message="Instance is not locked!" />
</target>

<target name="get-lock">
<mkdir dir="deploy" />
<echo>${server}: Getting the lock</echo>
<exec executable="lockfile" failonerror="true">
<!-- Check every 10 seconds -->
<arg value="-10" />
<!-- Retry for 55 minutes (build server gives up after 60 minutes) -->
<arg value="-r330" />
<arg value="${lock}" />
</exec>
<echo>${server}: Got the lock</echo>
</target>

<target name="clean">
<delete dir="${deployDir}" failonerror="false" />
</target>

<target name="release-lock">
<!-- <exec executable="rm"> <arg value="-f" /> <arg value="${lock}"
/> </exec> -->
<delete>
<fileset dir="." includes="${lock}" />
</delete>
<echo>${server}: Released the lock</echo>
</target>
<target name="deploy">
<antcall target="beforeDeploy" />
<echo message="${server}: Deploying ${war} to ${deployDir}/${autodeployDir}" />
<copy file="${war}" todir="${deployDir}/${autodeployDir}"/>
<antcall target="afterDeploy" />
</target>

<target name="deployStatic">
<unzip src="${war}" dest="${staticDeployDir}/tmp-unpack-jar/">
<patternset>
<include name="WEB-INF/lib/*.jar" />
</patternset>
</unzip>
<unzip dest="${staticDeployDir}">
<fileset dir="${staticDeployDir}/tmp-unpack-jar/WEB-INF/lib" includes="*.jar" />

<patternset>
<include name="VAADIN/**" />
</patternset>
</unzip>
<delete dir="${staticDeployDir}/tmp-unpack-jar/" />

<unzip src="${war}" dest="${staticDeployDir}">
<patternset>
<include name="VAADIN/**" />
</patternset>
</unzip>
</target>
<target name="unpack-server">
<echo message="${server}: Unpacking ${server}.tar.gz" />
<delete dir="${server}" />
<exec executable="tar">
<arg value="-xf"/>
<arg value="${server}.tar.gz"/>
</exec>
<move file="${server}" tofile="${deployDir}" />
<echo message="Done." />
</target>
<target name="doStartup">
<exec executable="./run.sh" spawn="${startupSpawn}">
<env key="JAVA_HOME" value="${JAVA_HOME}" />
</exec>
</target>
<target name="startup">
<antcall target="doStartup" />
<echo message="${server}: Waiting for ${waitUrl} to become available." />
<waitfor maxwait="${waitMinutes}" maxwaitunit="minute" checkevery="10000" timeoutproperty="timeout">
<http url="${waitUrl}" />
</waitfor>
<!-- Print load averages to get an indicator on whether the server still attempts to start up -->
<exec executable="uptime" />
<fail if="timeout" message="${server} failed to deploy" />

<echo message="${server}: Demo deployed successfully." />
</target>
<target name="shutdown">
<exec executable="./stop.sh" >
<env key="JAVA_HOME" value="${JAVA_HOME}" />
</exec>
<sleep seconds="${shutdownWait}" />
</target>
<target name="force-shutdown">
<exec executable="./cleanup.sh" />
</target>
<target name="check-port">
<fail message="${server}: Something is still listening on port ${serverPort}">
<condition>
<socket server="localhost" port="${serverPort}" />
</condition>
</fail>
</target>
<target name="check-lock">
<available file="${lock}" property="lockAvailable" />
<fail unless="lockAvailable" message="Instance is not locked!" />
</target>
<target name="get-lock">
<mkdir dir="deploy" />
<echo>${server}: Getting the lock</echo>
<exec executable="lockfile" failonerror="true">
<!-- Check every 10 seconds -->
<arg value="-10" />
<!-- Retry for 55 minutes (build server gives up after 60 minutes) -->
<arg value="-r330" />
<arg value="${lock}" />
</exec>
<echo>${server}: Got the lock</echo>
</target>
<target name="clean">
<delete dir="${deployDir}" failonerror="false" />
</target>
<target name="release-lock">
<!-- <exec executable="rm">
<arg value="-f" />
<arg value="${lock}" />
</exec> -->
<delete>
<fileset dir="." includes="${lock}" />
</delete>
<echo>${server}: Released the lock</echo>
</target>
<target name="startup-and-deploy" depends="check-lock,check-port,unpack-server,deploy,startup" />
<target name="shutdown-and-cleanup" depends="shutdown,clean,release-lock,force-shutdown" />

<target name="startup-and-deploy"
depends="check-lock,check-port,unpack-server,deploy,startup" />

<target name="shutdown-and-cleanup" depends="shutdown,clean,release-lock,force-shutdown" />

</project>

+ 631
- 538
uitest/integration_tests.xml
File diff suppressed because it is too large
View File


+ 5
- 5
uitest/ivy.xml View File

@@ -14,8 +14,8 @@
<conf name="jetty-run" extends="build" visibility="private" />
</configurations>
<publications>
<artifact type="war" ext="war"/>
</publications>
<artifact type="war" ext="war" />
</publications>
<dependencies defaultconf="build" defaultconfmapping="build,ide->default">
<!-- API DEPENDENCIES -->
<dependency org="javax.portlet" name="portlet-api"
@@ -40,9 +40,9 @@
rev="${vaadin.version}" conf="build->build"></dependency>
<dependency org="com.vaadin" name="vaadin-themes"
rev="${vaadin.version}" conf="build->build"></dependency>
<dependency org="com.vaadin" name="vaadin-push"
rev="${vaadin.version}" conf="build->build"></dependency>
<dependency org="com.vaadin" name="vaadin-push" rev="${vaadin.version}"
conf="build->build"></dependency>
<!-- For compiling TestingWidgetSet -->
<dependency org="com.vaadin" name="vaadin-client-compiler"
rev="${vaadin.version}" conf="build-provided-> build"></dependency>

+ 8
- 7
uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml View File

@@ -1,15 +1,16 @@
<module>
<!-- WS Compiler: manually edited -->
<!-- WS Compiler: manually edited -->

<!-- Inherit the DefaultWidgetSet -->
<inherits name="com.vaadin.DefaultWidgetSet" />

<!-- Inherit the DefaultWidgetSet -->
<inherits name="com.vaadin.DefaultWidgetSet" />
<replace-with class="com.vaadin.tests.widgetset.client.CustomUIConnector">
<when-type-is class="com.vaadin.client.ui.ui.UIConnector" />
</replace-with>
<replace-with class="com.vaadin.tests.widgetset.client.TestingPushConnection">

<replace-with
class="com.vaadin.tests.widgetset.client.TestingPushConnection">
<when-type-is class="com.vaadin.client.communication.PushConnection" />
</replace-with>
</module>

+ 225
- 187
uitest/test.xml View File

@@ -1,189 +1,227 @@
<?xml version="1.0"?>
<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant" name="Run Vaadin Testbench Tests" basedir="." default="run-and-clean-up">

<include file="../common.xml" />
<dirname property="test.xml.dir" file="${ant.file.Run Vaadin Testbench Tests}" />

<!-- ================================================================== -->
<!-- Configuration -->
<!-- ================================================================== -->
<!-- Browsers to use for testing -->
<property name="browsers-windows" value="winxp-ie8,win7-ie9,win7-ie10,winxp-firefox17-esr,winxp-safari5,winxp-googlechrome21,winxp-opera12" />
<property name="browsers-linux" value="linux-firefox3,linux-opera10,linux-googlechrome8" />
<property name="browsers-mac" value="osx-firefox3,osx-opera10,osx-googlechrome8,osx-safari4,osx-safari5" />

<property name="browsers" value="${browsers-windows}" />

<!-- Number of times to retry a test if it fails -->
<property name="retries" value="2" />

<!-- Screen shot base directory -->
<fail unless="com.vaadin.testbench.screenshot.directory" message="The 'com.vaadin.testbench.screenshot.directory' property must be defined." />

<!-- Screen shot resolution -->
<property name="com.vaadin.testbench.screenshot.resolution" value="1500x850" />

<!-- Host running Testbench Hub -->
<property name="com.vaadin.testbench.tester.host" value="testbench-hub.intra.itmill.com" />

<property name="com.vaadin.testbench.screenshot.block.error" value="0.025" />
<property name="com.vaadin.testbench.debug" value="false" />


<target name="initialize">
<!-- classpath must include test bench jar and its dependencies -->
<path id="classpath">
<fileset dir="${com.vaadin.testbench.lib.dir}" includes="**/*.jar" />
</path>
</target>

<!-- fileset containing all TestBench tests to run -->
<fileset dir="${test.xml.dir}" id="html-test-files">
<include name="src/**/*.html" />
<exclude name="integration-testscripts/**/*.html" />
</fileset>

<!-- This target converts HTML tests files to java junit tests. One test file for each browser is created. -->
<target name="create-tests" depends="initialize, remove-temp-testclasses">
<!-- Temporary output directory, created and removed by this script -->
<fail unless="test-output-dir" message="The 'test-output-dir' property must be defined." />
<property name="class-dir" value="${test-output-dir}/classes" />

<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />

<java classname="com.vaadin.testbench.util.TestConverter" classpathref="classpath" fork="true">
<sysproperty key="com.vaadin.testbench.test.retries" value="${retries}" />
<jvmarg value="-Duser.language=en" />
<jvmarg value="-Duser.country=US" />
<arg value="${test-output-dir}" />
<arg value="${browsers}" />
<arg line="${testfiles}" />
</java>
</target>


<!-- This target complies the generated java junit tests. -->
<target name="compile-tests" depends="create-tests">
<mkdir dir="${class-dir}" />
<javac includeantruntime="false" srcdir="${test-output-dir}" destdir="${class-dir}" debug="on" fork="yes" failonerror="false" encoding="UTF8">
<classpath>
<path refid="classpath" />
</classpath>
</javac>
</target>

<!-- ================================================================== -->
<!-- Running Tests -->
<!-- ================================================================== -->

<target name="check-parameters">
<fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined." />
<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." />
</target>

<target name="run-tests" depends="compile-tests">
<fileset dir="${test-output-dir}" id="tests-fileset">
<include name="**/**.java" />
</fileset>

<antcontrib:for threadCount="30" parallel="true" keepgoing="true" param="target">
<path>
<fileset refid="tests-fileset" />
</path>
<sequential>
<antcall target="execute-tests">
<param name="target" value="@{target}" />
<reference refid="classpath" />
</antcall>
</sequential>
</antcontrib:for>
</target>

<!-- This target runs the generated and compiled junit tests -->
<target name="execute-tests">
<junit fork="yes" printsummary="withOutAndErr" maxmemory="96m">
<classpath>
<path refid="classpath" />
<pathelement path="${class-dir}" />
</classpath>

<formatter usefile="false" type="plain" />

<jvmarg value="-Dcom.vaadin.testbench.tester.host=${com.vaadin.testbench.tester.host}" />
<jvmarg value="-Dcom.vaadin.testbench.deployment.url=${com.vaadin.testbench.deployment.url}" />
<!-- Define where the reference screenshots and diff files are saved -->
<jvmarg value="-Dcom.vaadin.testbench.screenshot.directory=${com.vaadin.testbench.screenshot.directory}" />
<!-- Resolution for screenshots -->
<jvmarg value="-Dcom.vaadin.testbench.screenshot.resolution=${com.vaadin.testbench.screenshot.resolution}" />
<jvmarg value="-Dcom.vaadin.testbench.debug=${com.vaadin.testbench.debug}" />
<jvmarg value="-Dcom.vaadin.testbench.screenshot.block.error=${com.vaadin.testbench.screenshot.block.error}" />


<jvmarg value="-Djava.awt.headless=true" />

<!-- true/false system arguments -->
<jvmarg value="-Dcom.vaadin.testbench.screenshot.softfail=${com.vaadin.testbench.screenshot.softfail}" />
<jvmarg value="-Dcom.vaadin.testbench.screenshot.reference.debug=${com.vaadin.testbench.screenshot.reference.debug}" />
<jvmarg value="-Dcom.vaadin.testbench.screenshot.cursor=${com.vaadin.testbench.screenshot.cursor}" />

<batchtest>
<filelist dir="${test-output-dir}" files="${target}" />
</batchtest>
</junit>

</target>

<!-- Remove temporary source and compiled java files -->
<target name="remove-temp-testclasses">
<delete failonerror="false">
<fileset dir="${test-output-dir}">
<include name="**/**.java" />
<include name="**/**.class" />
</fileset>
</delete>
</target>

<!-- Remove old error screenshots -->
<target name="remove-error-screens">
<mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" />
<delete>
<fileset dir="${com.vaadin.testbench.screenshot.directory}/errors">
<include name="**/**.*" />
</fileset>
</delete>
</target>

<!-- ================================================================== -->
<!-- Main Targets -->
<!-- ================================================================== -->

<!-- The default target. -->
<target name="run-and-clean-up" depends="check-parameters,remove-error-screens,run-tests" />


<!-- Starts the server and runs all TestBench tests -->
<target name="test-package">
<fail unless="war.file" message="No 'war.file' parameter given." />
<property name="test-output-dir" location="${test.xml.dir}/result/testbench-junit-classes" />
<property name="retries" value="2" />

<!-- 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" />

<parallel>
<daemons>
<ant antfile="${test.xml.dir}/vaadin-server.xml" inheritall="true" inheritrefs="true" target="deploy-and-start" />
</daemons>
<sequential>
<ant antfile="${test.xml.dir}/vaadin-server.xml" target="wait-for-startup" />
<antcall inheritall="true" inheritrefs="true" target="run-and-clean-up" />
<echo message="All TestBench tests have been run" />
</sequential>
</parallel>
</target>
<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant"
name="Run Vaadin Testbench Tests" basedir="." default="run-and-clean-up">

<include file="../common.xml" />
<dirname property="test.xml.dir" file="${ant.file.Run Vaadin Testbench Tests}" />

<!-- ================================================================== -->
<!-- Configuration -->
<!-- ================================================================== -->
<!-- Browsers to use for testing -->
<property name="browsers-windows"
value="winxp-ie8,win7-ie9,win7-ie10,winxp-firefox17-esr,winxp-safari5,winxp-googlechrome21,winxp-opera12" />
<property name="browsers-linux"
value="linux-firefox3,linux-opera10,linux-googlechrome8" />
<property name="browsers-mac"
value="osx-firefox3,osx-opera10,osx-googlechrome8,osx-safari4,osx-safari5" />

<property name="browsers" value="${browsers-windows}" />

<!-- Number of times to retry a test if it fails -->
<property name="retries" value="2" />

<!-- Screen shot base directory -->
<fail unless="com.vaadin.testbench.screenshot.directory"
message="The 'com.vaadin.testbench.screenshot.directory' property must be defined." />

<!-- Screen shot resolution -->
<property name="com.vaadin.testbench.screenshot.resolution"
value="1500x850" />

<!-- Host running Testbench Hub -->
<property name="com.vaadin.testbench.tester.host" value="testbench-hub.intra.itmill.com" />

<property name="com.vaadin.testbench.screenshot.block.error"
value="0.025" />
<property name="com.vaadin.testbench.debug" value="false" />


<target name="initialize">
<!-- classpath must include test bench jar and its dependencies -->
<path id="classpath">
<fileset dir="${com.vaadin.testbench.lib.dir}"
includes="**/*.jar" />
</path>
</target>

<!-- fileset containing all TestBench tests to run -->
<fileset dir="${test.xml.dir}" id="html-test-files">
<include name="src/**/*.html" />
<exclude name="integration-testscripts/**/*.html" />
</fileset>

<!-- This target converts HTML tests files to java junit tests. One test
file for each browser is created. -->
<target name="create-tests" depends="initialize, remove-temp-testclasses">
<!-- Temporary output directory, created and removed by this script -->
<fail unless="test-output-dir"
message="The 'test-output-dir' property must be defined." />
<property name="class-dir" value="${test-output-dir}/classes" />

<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />

<java classname="com.vaadin.testbench.util.TestConverter"
classpathref="classpath" fork="true">
<sysproperty key="com.vaadin.testbench.test.retries"
value="${retries}" />
<jvmarg value="-Duser.language=en" />
<jvmarg value="-Duser.country=US" />
<arg value="${test-output-dir}" />
<arg value="${browsers}" />
<arg line="${testfiles}" />
</java>
</target>


<!-- This target complies the generated java junit tests. -->
<target name="compile-tests" depends="create-tests">
<mkdir dir="${class-dir}" />
<javac includeantruntime="false" srcdir="${test-output-dir}"
destdir="${class-dir}" debug="on" fork="yes" failonerror="false"
encoding="UTF8">
<classpath>
<path refid="classpath" />
</classpath>
</javac>
</target>

<!-- ================================================================== -->
<!-- Running Tests -->
<!-- ================================================================== -->

<target name="check-parameters">
<fail unless="com.vaadin.testbench.lib.dir"
message="The 'com.vaadin.testbench.lib.dir' property must be defined." />
<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." />
</target>

<target name="run-tests" depends="compile-tests">
<fileset dir="${test-output-dir}" id="tests-fileset">
<include name="**/**.java" />
</fileset>

<antcontrib:for threadCount="30" parallel="true"
keepgoing="true" param="target">
<path>
<fileset refid="tests-fileset" />
</path>
<sequential>
<antcall target="execute-tests">
<param name="target" value="@{target}" />
<reference refid="classpath" />
</antcall>
</sequential>
</antcontrib:for>
</target>

<!-- This target runs the generated and compiled junit tests -->
<target name="execute-tests">
<junit fork="yes" printsummary="withOutAndErr" maxmemory="96m">
<classpath>
<path refid="classpath" />
<pathelement path="${class-dir}" />
</classpath>

<formatter usefile="false" type="plain" />

<jvmarg
value="-Dcom.vaadin.testbench.tester.host=${com.vaadin.testbench.tester.host}" />
<jvmarg
value="-Dcom.vaadin.testbench.deployment.url=${com.vaadin.testbench.deployment.url}" />
<!-- Define where the reference screenshots and diff files are
saved -->
<jvmarg
value="-Dcom.vaadin.testbench.screenshot.directory=${com.vaadin.testbench.screenshot.directory}" />
<!-- Resolution for screenshots -->
<jvmarg
value="-Dcom.vaadin.testbench.screenshot.resolution=${com.vaadin.testbench.screenshot.resolution}" />
<jvmarg
value="-Dcom.vaadin.testbench.debug=${com.vaadin.testbench.debug}" />
<jvmarg
value="-Dcom.vaadin.testbench.screenshot.block.error=${com.vaadin.testbench.screenshot.block.error}" />


<jvmarg value="-Djava.awt.headless=true" />

<!-- true/false system arguments -->
<jvmarg
value="-Dcom.vaadin.testbench.screenshot.softfail=${com.vaadin.testbench.screenshot.softfail}" />
<jvmarg
value="-Dcom.vaadin.testbench.screenshot.reference.debug=${com.vaadin.testbench.screenshot.reference.debug}" />
<jvmarg
value="-Dcom.vaadin.testbench.screenshot.cursor=${com.vaadin.testbench.screenshot.cursor}" />

<batchtest>
<filelist dir="${test-output-dir}" files="${target}" />
</batchtest>
</junit>

</target>

<!-- Remove temporary source and compiled java files -->
<target name="remove-temp-testclasses">
<delete failonerror="false">
<fileset dir="${test-output-dir}">
<include name="**/**.java" />
<include name="**/**.class" />
</fileset>
</delete>
</target>

<!-- Remove old error screenshots -->
<target name="remove-error-screens">
<mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" />
<delete>
<fileset
dir="${com.vaadin.testbench.screenshot.directory}/errors">
<include name="**/**.*" />
</fileset>
</delete>
</target>

<!-- ================================================================== -->
<!-- Main Targets -->
<!-- ================================================================== -->

<!-- The default target. -->
<target name="run-and-clean-up"
depends="check-parameters,remove-error-screens,run-tests" />


<!-- Starts the server and runs all TestBench tests -->
<target name="test-package">
<fail unless="war.file" message="No 'war.file' parameter given." />
<property name="test-output-dir"
location="${test.xml.dir}/result/testbench-junit-classes" />
<property name="retries" value="2" />

<!-- 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" />

<parallel>
<daemons>
<ant antfile="${test.xml.dir}/vaadin-server.xml"
inheritall="true" inheritrefs="true" target="deploy-and-start" />
</daemons>
<sequential>
<ant antfile="${test.xml.dir}/vaadin-server.xml"
target="wait-for-startup" />
<antcall inheritall="true" inheritrefs="true"
target="run-and-clean-up" />
<echo message="All TestBench tests have been run" />
</sequential>
</parallel>
</target>
</project>

+ 31
- 27
uitest/vaadin-server.xml View File

@@ -1,34 +1,38 @@
<?xml version="1.0"?>
<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant" name="vaadin-server" default="deploy-and-start" basedir=".">
<include file="../common.xml" />
<dirname property="dir" file="${ant.file.vaadin-server}" />
<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant"
name="vaadin-server" default="deploy-and-start" basedir=".">
<include file="../common.xml" />
<dirname property="dir" file="${ant.file.vaadin-server}" />

<target name="deploy-and-start">
<fail unless="war.file" message="No war file given in 'war.file'" />
<target name="deploy-and-start">
<fail unless="war.file" message="No war file given in 'war.file'" />

<ivy:resolve file="${dir}/ivy.xml" />
<ivy:cachepath pathid="classpath.jetty" conf="jetty-run" />
<java classname="org.mortbay.jetty.runner.Runner" fork="yes" output="${vaadin.basedir}/result/jetty.java.out" resultproperty="resultCode">
<arg value="--port" />
<arg value="8888" />
<arg value="--out" />
<arg value="${vaadin.basedir}/result/jetty.out" />
<arg value="--log" />
<arg value="${vaadin.basedir}/result/jetty.log" />
<arg value="${war.file}" />
<classpath refid="classpath.jetty" />
<jvmarg value="-ea" />
</java>
<echo message="Jetty process ended with result code ${resultCode}" />
<ivy:resolve file="${dir}/ivy.xml" />
<ivy:cachepath pathid="classpath.jetty" conf="jetty-run" />
<java classname="org.mortbay.jetty.runner.Runner" fork="yes"
output="${vaadin.basedir}/result/jetty.java.out"
resultproperty="resultCode">
<arg value="--port" />
<arg value="8888" />
<arg value="--out" />
<arg value="${vaadin.basedir}/result/jetty.out" />
<arg value="--log" />
<arg value="${vaadin.basedir}/result/jetty.log" />
<arg value="${war.file}" />
<classpath refid="classpath.jetty" />
<jvmarg value="-ea" />
</java>
<echo message="Jetty process ended with result code ${resultCode}" />

</target>
</target>

<target name="wait-for-startup">
<echo>Waiting for Servlet Container to start up.</echo>
<waitfor maxwait="60" maxwaitunit="second" checkevery="5" checkeveryunit="second" timeoutproperty="server.start.failed">
<http url="http://localhost:8888" />
</waitfor>
<fail if="server.start.failed" message="Server startup failed" />
</target>
<target name="wait-for-startup">
<echo>Waiting for Servlet Container to start up.</echo>
<waitfor maxwait="60" maxwaitunit="second" checkevery="5"
checkeveryunit="second" timeoutproperty="server.start.failed">
<http url="http://localhost:8888" />
</waitfor>
<fail if="server.start.failed" message="Server startup failed" />
</target>

</project>

Loading…
Cancel
Save