summaryrefslogtreecommitdiffstats
path: root/build/ide.xml
blob: a095e9265c1d49d1cee50a02fa4113b0fdbe8757 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?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">
	<!-- FIXME, should use 7.0-SNAPSHOT of client compiler -->
	<property name="work.dir" location="work" />
	<property name="gwt.root" location="${basedir}/../trunk" />
	<property name="gwt.lib.dir" location="${gwt.root}/build/lib" />
	<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="theme-version" location="9.9.9.INTERNAL-DEBUG-BUILD" />
	<echo>Using gwt-dev.jar from ${gwt.dev.jar}</echo>

	<ivy:resolve file="build/ivy-ide.xml" />
	<ivy:cachepath pathid="ivy.deps" conf="default" />

	<path id="classpath">
		<path location="bin" />
		<path location="build/classes" />
		<pathelement location="${gwt.user.jar}" />
		<pathelement location="${gwt.dev.jar}" />
		<path refid="ivy.deps" />
		<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">
	</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">
		<property name="module" value="com.vaadin.DefaultWidgetSet" />
		<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" />
		</java>

	</target>
</project>