forked from nuxeo/nuxeo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
162 lines (149 loc) · 5.42 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?xml version="1.0"?>
<project name="Nuxeo EP" default="install" basedir=".">
<property environment="env" />
<property file="build.properties" />
<property name="mvn.opts" value="" />
<property name="branch" value="" />
<property name="jboss.dir" value="/opt/jboss" />
<property name="jboss.config" value="default" />
<property name="jboss.server" value="${jboss.dir}/server/${jboss.config}" />
<property name="jboss.deploy" value="${jboss.server}/deploy" />
<property name="jboss.lib" value="${jboss.server}/lib" />
<property name="jboss.nuxeo.ear" value="${jboss.deploy}/nuxeo.ear" />
<property name="jboss.bundles.dir" value="${jboss.nuxeo.ear}/bundles" />
<property name="jboss.nuxeo.war.dir" value="${jboss.nuxeo.ear}/nuxeo.war" />
<property name="jboss.seam.hotdeploy.dir"
value="${jboss.nuxeo.war.dir}/WEB-INF/dev" />
<property name="tomcat.dir" value="/opt/tomcat" />
<property name="tomcat.nuxeo.ear" value="${tomcat.dir}/nxserver" />
<property name="tomcat.bundles.dir" value="${tomcat.nuxeo.ear}/bundles" />
<property name="tomcat.nuxeo.war.dir"
value="${tomcat.dir}/nxserver/nuxeo.war" />
<property name="tomcat.seam.hotdeploy.dir"
value="${tomcat.nuxeo.war.dir}/WEB-INF/dev" />
<condition property="osfamily-unix">
<os family="unix" />
</condition>
<condition property="osfamily-windows">
<os family="windows" />
</condition>
<target name="clone" description="Launch the clone.py command">
<exec executable="python" failonerror="true">
<env key="PATH" path="${env.PATH}" />
<arg value="clone.py" />
<arg value="${branch}" />
</exec>
</target>
<target name="clean"
depends="clean-unix,clean-windows"
description="Delete target directories" />
<target name="clean-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="clean" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="clean-windows" if="osfamily-windows">
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="clean" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="install"
depends="clean,install-unix,install-windows"
description="Run mvn install" />
<target name="install-unix" if="osfamily-unix">
<exec executable="env" />
<exec executable="mvn" failonerror="true">
<arg value="install" />
<arg value="-Dmaven.test.skip=true" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="install-windows" if="osfamily-windows">
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="install" />
<arg value="-Dmaven.test.skip=true" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="test"
depends="test-unix,test-windows"
description="Run tests" />
<target name="test-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="test" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="test-windows" if="osfamily-windows">
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="test" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="idea"
depends="idea-unix,idea-windows"
description="Generate IntelliJ IDEA files" />
<target name="idea-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="idea:idea" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="idea-windows" if="osfamily-windows">
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="idea:idea" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="eclipse"
depends="eclipse-unix,eclipse-windows"
description="Generate Eclipse files" />
<target name="eclipse-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="eclipse:clean" />
<arg value="eclipse:eclipse" />
<arg value="${mvn.opts}" />
</exec>
<exec executable="fixeclipse" failonerror="true" />
</target>
<target name="eclipse-windows" if="osfamily-windows">
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="eclipse:clean" />
<arg value="eclipse:eclipse" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="web-jboss"
description="Deploy Web components to the live JBoss server">
<copy todir="${jboss.nuxeo.war.dir}">
<fileset dir="${basedir}/src/main/resources/web/nuxeo.war" />
</copy>
</target>
<target name="web-tomcat"
description="Deploy Web components to the live Tomcat server">
<copy todir="${tomcat.nuxeo.war.dir}">
<fileset dir="${basedir}/src/main/resources/web/nuxeo.war" />
</copy>
</target>
<target name="deploy" depends="install" description="Deploy Nuxeo on JBoss">
<echo>
WARNING: this ant task is here for developers who find it handy: use to
your own risk, and refer to nuxeo-distribution scripts for better
deployment strategies
</echo>
<ant target="package" dir="nuxeo-distribution" />
<ant target="copy" dir="nuxeo-distribution" />
</target>
</project>