summaryrefslogtreecommitdiffstats
path: root/client-compiler/build.xml
blob: cff8057274554208c500694de6194517b62f346b (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
<?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" />

	<!-- global properties -->
	<property name="module.name" value="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>

	<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>

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

		<!-- 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;
			      &lt;scope&gt;compile&lt;/scope&gt;
			      &lt;classifier&gt;sources&lt;/classifier&gt;
			    &lt;/dependency&gt;
  &lt;/dependencies&gt;" />
			</filterchain>
		</copy>
		<move file="${temp.pom}" tofile="${pom.xml}" />
	</target>

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

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

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

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

</project>