2012-08-23 09:43:24 +02:00
<?xml version="1.0"?>
2013-06-10 19:15:35 +02:00
<project name= "vaadin" basedir= "." default= "package" xmlns:ivy= "antlib:org.apache.ivy.ant" >
2013-05-30 16:06:30 +02:00
<include file= "common.xml" as= "common" />
2012-08-23 09:43:24 +02:00
2013-05-30 16:06:30 +02:00
<path id= "vaadin.buildhelpers.classpath" location= "${vaadin.basedir}/buildhelpers/result/classes" />
2012-08-23 09:43:24 +02:00
2013-05-30 16:06:30 +02:00
<!-- ================================= target: all ================================= -->
<!-- <target name="all" description="Compiles all parts of the project"
depends="buildhelpers,theme-compiler,shared,server,client"> -->
2013-06-10 19:15:35 +02:00
<target name= "package" description= "Compiles and packages all modules in the project" depends= "buildorder" >
2013-05-30 16:06:30 +02:00
<subant buildpathref= "build-path" target= "publish-local" >
</subant>
</target>
2012-08-23 09:43:24 +02:00
2013-05-30 16:06:30 +02:00
<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/**" />
2014-01-28 16:30:09 +01:00
<exclude name= "bin/**" />
2013-05-30 16:06:30 +02:00
<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" />
2012-08-30 08:35:58 +02:00
2013-05-30 16:06:30 +02:00
</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>
2013-09-16 13:31:37 +02:00
2013-05-30 16:06:30 +02:00
<target name= "test-all" depends= "buildorder" >
<parallel >
2013-09-16 13:31:37 +02:00
<!-- JUnit tests, can be run without a server -->
2013-05-30 16:06:30 +02:00
<subant buildpathref= "build-path" target= "test" />
2013-09-16 13:31:37 +02:00
<!-- Server deployment + TestBench tests -->
2014-03-03 07:40:54 +01:00
<antcall target= "integration-test" />
2013-05-30 16:06:30 +02:00
</parallel>
</target>
2012-08-31 12:54:26 +02:00
2014-03-03 07:40:54 +01:00
<target name= "integration-test" depends= "buildorder" >
<property name= "war.file" location= "result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${vaadin.version}.war" />
<ant antfile= "uitest/build.xml" target= "test-testbench" >
<property name= "war.file" location= "${war.file}" />
</ant>
</target>
2013-05-30 16:06:30 +02:00
<target name= "official.build.checks" if= "build.release" >
<condition property= "java.version.matches" >
<equals arg1= "${ant.java.version}" arg2= "${vaadin.java.version}" />
</condition>
2013-06-10 19:15:35 +02:00
<fail unless= "java.version.matches" message= "Java version is ${ant.java.version}, but Vaadin must be compiled with genuine Java ${vaadin.java.version} compiler." />
2013-05-30 16:06:30 +02:00
<echo > Java version is ${ant.java.version} as required.</echo>
</target>
2012-09-04 15:42:25 +02:00
2012-08-23 09:43:24 +02:00
</project>