summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/vaadin/build.xml33
-rw-r--r--java/vaadin/ivy.xml4
-rw-r--r--java/vaadin/src/main/WebContent/VAADIN/widgetsets/mywidgetset.gwt.xml3
-rw-r--r--java/vaadin/src/main/java/ch/asynk/HelloWorldUI.java2
4 files changed, 40 insertions, 2 deletions
diff --git a/java/vaadin/build.xml b/java/vaadin/build.xml
index 712034f..bcac04b 100644
--- a/java/vaadin/build.xml
+++ b/java/vaadin/build.xml
@@ -46,6 +46,7 @@
<ivy:resolve file="ivy.xml" log="download-only"/>
<ivy:cachepath pathid="ivy.deps.server-side" conf="server-side" />
<ivy:cachepath pathid="ivy.deps.themes" conf="themes" />
+ <ivy:cachepath pathid="ivy.deps.widgetsets" conf="widgetsets" />
<ivy:cachepath pathid="ivy.deps.run" conf="run" />
<ivy:cachefileset setid="ivy.deps.run.fileset" conf="run" />
<ivy:cachefileset setid="ivy.deps.server-side.fileset" conf="server-side"/>
@@ -97,6 +98,33 @@
</antcall>
</target>
+ <target name="-compile.widgetset">
+ <property name="widgetset.dir" value="${build.dir}/VAADIN/widgetsets/${widgetset}" />
+ <delete dir="${widgetset.dir}"/>
+ <mkdir dir="${widgetset.dir}"/>
+ <java classname="com.google.gwt.dev.Compiler" failonerror="yes" fork="true">
+ <classpath refid="ivy.deps.widgetsets"/>
+ <classpath>
+ <dirset dir="${web.dir}/VAADIN/widgetsets"/>
+ </classpath>
+ <jvmarg value="-Djava.awt.headless=true"/>
+ <arg value="-war"/>
+ <arg value="${build.dir}/VAADIN/widgetsets"/>
+ <arg value="${widgetset}"/>
+ <arg value="-logLevel"/>
+ <arg value="ERROR"/>
+ <arg value="-strict"/>
+ <arg value="-optimize"/>
+ <arg value="9"/>
+ </java>
+ </target>
+
+ <target name="compile.widgetsets" description="compile application's widgetsets" depends="configure,resolve">
+ <antcall target="-compile.widgetset" inheritRefs="true">
+ <param name="widgetset" value="mywidgetset"/>
+ </antcall>
+ </target>
+
<target name="compile.app" description="compile server side components" depends="configure,resolve,ctags">
<record name="build.log" loglevel="verbose" action="start" />
<mkdir dir="${classes.dir}" />
@@ -121,7 +149,7 @@
</copy>
</target>
- <target name="compile.all" description="compile everything" depends="compile.app,compile.themes"/>
+ <target name="compile.all" description="compile everything" depends="compile.app,compile.themes,compile.widgetsets"/>
<target name="war" description="build war package" depends="configure,resolve">
<mkdir dir="${lib.dir}"/>
@@ -141,6 +169,7 @@
<zipfileset dir="${resources.dir}" prefix="WEB-INF/classes"/>
<classes dir="${classes.dir}" includes="**" />
<zipfileset dir="${build.dir}/VAADIN/themes" prefix="VAADIN/themes"/>
+ <zipfileset dir="${build.dir}/VAADIN/widgetsets" prefix="VAADIN/widgetsets"/>
<fileset dir="${web.dir}">
<patternset>
<include name="*.html" />
@@ -180,6 +209,7 @@
<dirset dir="${build.dir}/run" />
<dirset dir="${resources.dir}" />
<dirset dir="${run.dir}/resources" />
+ <dirset dir="${build.dir}" />
</classpath>
<classpath refid="cp.build"/>
<classpath refid="ivy.deps.run"/>
@@ -209,6 +239,7 @@
<fileset dir="${classes.dir}"/>
<fileset dir="${build.dir}/run"/>
<zipfileset dir="${build.dir}/VAADIN/themes" prefix="VAADIN/themes"/>
+ <zipfileset dir="${build.dir}/VAADIN/widgetsets" prefix="VAADIN/widgetsets"/>
<fileset dir="${web.dir}">
<patternset>
<include name="WEB-INF/*.xml" />
diff --git a/java/vaadin/ivy.xml b/java/vaadin/ivy.xml
index 81ca70d..eef7a32 100644
--- a/java/vaadin/ivy.xml
+++ b/java/vaadin/ivy.xml
@@ -10,7 +10,8 @@
<configurations>
<conf name="server-side" description="only needed for server side classes compilation"/>
- <conf name="themes" extends="server-side" description="needed for theme compilation"/>
+ <conf name="themes" extends="server-side" description="needed for themes compilation"/>
+ <conf name="widgetsets" extends="server-side" description="needed for widgetsets compilation"/>
<conf name="run" extends="server-side" description="to run locally using jetty"/>
</configurations>
@@ -18,6 +19,7 @@
<dependency org="com.vaadin" name="vaadin-server" rev="&vaadin.version;"/>
<dependency org="com.vaadin" name="vaadin-themes" rev="&vaadin.version;"/>
<dependency org="com.vaadin" name="vaadin-client-compiled" rev="&vaadin.version;"/>
+ <dependency org="com.vaadin" name="vaadin-client-compiler" rev="&vaadin.version;" conf="widgetsets->default"/>
<dependency org="ch.qos.logback" name="logback-classic" rev="1.2.1"/>
<dependency org="org.codehaus.janino" name="janino" rev="3.0.6"/>
<dependency org="com.yahoo.platform.yui" name="yuicompressor" rev="2.4.8" conf="themes->default"/>
diff --git a/java/vaadin/src/main/WebContent/VAADIN/widgetsets/mywidgetset.gwt.xml b/java/vaadin/src/main/WebContent/VAADIN/widgetsets/mywidgetset.gwt.xml
new file mode 100644
index 0000000..3c11cb9
--- /dev/null
+++ b/java/vaadin/src/main/WebContent/VAADIN/widgetsets/mywidgetset.gwt.xml
@@ -0,0 +1,3 @@
+<module>
+ <inherits name="com.vaadin.DefaultWidgetSet" />
+</module>
diff --git a/java/vaadin/src/main/java/ch/asynk/HelloWorldUI.java b/java/vaadin/src/main/java/ch/asynk/HelloWorldUI.java
index be65387..bcfa571 100644
--- a/java/vaadin/src/main/java/ch/asynk/HelloWorldUI.java
+++ b/java/vaadin/src/main/java/ch/asynk/HelloWorldUI.java
@@ -3,6 +3,7 @@ package ch.asynk;
import com.vaadin.annotations.PreserveOnRefresh;
import com.vaadin.annotations.Theme;
import com.vaadin.annotations.Title;
+import com.vaadin.annotations.Widgetset;
import com.vaadin.navigator.Navigator;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
@@ -24,6 +25,7 @@ import ch.asynk.ui.ViewMain;
@PreserveOnRefresh
@Theme("mytheme")
@Title("Hello!!")
+@Widgetset("mywidgetset")
public class HelloWorldUI extends UI
{
private static final long serialVersionUID = 1L;