forked from nuxeo-archives/nuxeo-opensocial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
76 lines (67 loc) · 2.77 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
71
72
73
74
75
76
<?xml version="1.0" encoding="UTF-8"?>
<project name="nuxeo-opensocial" default="usage" 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"/>
<property name="tomcat.webengine.module.dir" location="${tomcat.dir}/nxserver/web/root.war/modules/org.nuxeo.webengine.mobile"/>
<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|web]" />
<echo message="ant build => Build Nuxeo OpenSocial" />
<echo message="ant build-with-tests => Build and Test Nuxeo OpenSocial" />
<echo message="ant deploy-tomcat => Build Nuxeo OpenSocial and deploy it on a Tomcat instance" />
<echo message="ant web-tomcat => Copy web files to a live Tomcat" />
</target>
<target name="build" depends="build-unix,build-windows" description="Build Nuxeo OpenSocial"/>
<target name="build-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg line="clean install -Dmaven.test.skip=true ${mvn.opts}" />
</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="-Dmaven.test.skip=true" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="build-with-tests" depends="build-with-tests-unix,build-with-tests-windows" description="Build Nuxeo OpenSocial"/>
<target name="build-with-tests-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg line="clean install ${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-tomcat" depends="build" description="Deploy project on a Tomcat instance">
<copy todir="${tomcat.bundles.dir}" overwrite="true" flatten="true">
<fileset dir="${basedir}">
<include name="**/target/*.jar" />
<exclude name="**/target/*-sources.jar" />
</fileset>
</copy>
</target>
<target name="web-tomcat">
<copy todir="${tomcat.nuxeo.war.dir}" overwrite="true">
<fileset dir="${basedir}">
<include name="**/src/main/**nuxeo.war/**" />
</fileset>
</copy>
</target>
</project>