forked from vdutat/nuxeo-custom-thumbnail-factory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
70 lines (62 loc) · 2.35 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="nuxeo-custom-thumbnail-factory" default="deploy" basedir=".">
<property file="build.properties"/>
<property name="mvn.opts" value="" />
<property name="tomcat.bundles.dir" location="${tomcat.dir}/nxserver/bundles"/>
<property name="tomcat.nuxeo.war.dir" location="${tomcat.dir}/nxserver/nuxeo.war"/>
<condition property="osfamily-unix">
<os family="unix" />
</condition>
<condition property="osfamily-windows">
<os family="windows" />
</condition>
<target name="usage">
<echo message="usage: ant [build|deploy]" />
<echo message="ant build => Build" />
<echo message="ant build-with-tests => Build and Test" />
<echo message="ant deploy-tomcat => Build and deploy it in a Tomcat instance" />
</target>
<target name="build" depends="build-unix,build-windows" description="Build"/>
<target name="build-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="clean" />
<arg value="install" />
<arg value="-DskipTests" />
</exec>
</target>
<target name="build-windows" if="osfamily-windows">
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="clean" />
<arg value="install" />
<arg value="-DskipTests" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="build-with-tests" depends="build-with-tests-unix,build-with-tests-windows" description="Build and test"/>
<target name="build-with-tests-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="clean" />
<arg value="install" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="build-with-tests-windows" if="osfamily-windows">
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="clean" />
<arg value="install" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="deploy" depends="build" description="Deploy project in a Tomcat instance">
<copy todir="${tomcat.bundles.dir}" verbose="true" overwrite="true" flatten="true">
<fileset dir="${basedir}">
<include name="**/target/*.jar" />
<exclude name="**/target/*-sources.jar" />
</fileset>
</copy>
</target>
</project>