forked from Activiti/Activiti
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
190 lines (173 loc) · 6.61 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?xml version="1.0" encoding="UTF-8"?>
<project name="activiti.distro" default="distro">
<property file="${user.home}/.activiti/build.properties" />
<property name="activiti.version" value="5.17.0-SNAPSHOT" />
<property name="target.distro.root" value="target/zip/activiti-${activiti.version}" />
<property name="activiti.website" value="../../activiti-website" />
<condition property="mvn.executable" value="mvn.bat" else="mvn">
<os family="windows" />
</condition>
<target name="clean">
<delete dir="target" />
</target>
<target name="distro" depends="clean,
build.modules,
copy.static.resources,
copy.dependencies,
copy.webapps,
copy.docs,
copy.sql">
<zip destfile="${target.distro.root}.zip">
<fileset dir="target/zip">
<include name="activiti-${activiti.version}/**" />
</fileset>
</zip>
</target>
<target name="build.modules">
<condition property="nodocs.profile" value=",nodocs -Dskiptests" else="">
<equals arg1="${nodocs}" arg2="true" />
</condition>
<exec executable="${mvn.executable}" dir=".." failonerror="true">
<env key="MAVEN_OPTS" value="-Xmx1024m -Xms512m -XX:MaxPermSize=256M" />
<arg line="-Pdistro${nodocs.profile} clean install -Dmaven.test.skip=true" />
</exec>
</target>
<target name="copy.static.resources">
<copy todir="${target.distro.root}">
<fileset dir="src" />
</copy>
</target>
<target name="copy.dependencies">
<!-- MOVE ALL LIBS TO libs -->
<mkdir dir="${target.distro.root}/libs" />
<copy todir="${target.distro.root}/libs">
<fileset dir="../modules/activiti-engine/target">
<include name="activiti-engine-*.jar" />
</fileset>
<fileset dir="../modules/activiti-spring/target">
<include name="activiti-spring-*.jar" />
</fileset>
<fileset dir="../modules/activiti-bpmn-model/target">
<include name="activiti-bpmn-model-*.jar" />
</fileset>
<fileset dir="../modules/activiti-bpmn-converter/target">
<include name="activiti-bpmn-converter-*.jar" />
</fileset>
<fileset dir="../modules/activiti-process-validation/target">
<include name="activiti-process-validation-*.jar" />
</fileset>
<fileset dir="../modules/activiti-bpmn-layout/target">
<include name="activiti-bpmn-layout-*.jar" />
</fileset>
<fileset dir="../modules/activiti-image-generator/target">
<include name="activiti-image-generator-*.jar" />
</fileset>
<fileset dir="../modules/activiti-json-converter/target">
<include name="activiti-json-converter-*.jar" />
</fileset>
<fileset dir="../modules/activiti-simple-workflow/target">
<include name="activiti-simple-workflow-*.jar" />
</fileset>
<fileset dir="../modules/activiti-ldap/target">
<include name="activiti-ldap*.jar" />
</fileset>
<fileset dir="../modules/activiti-explorer/target">
<include name="activiti-explorer-*.jar" />
</fileset>
<fileset dir="../modules/activiti-common-rest/target">
<include name="activiti-common-rest-*.jar" />
</fileset>
<fileset dir="../modules/activiti-modeler/target">
<include name="activiti-modeler-*.jar" />
</fileset>
<fileset dir="../modules/activiti-diagram-rest/target">
<include name="activiti-diagram-rest-*.jar" />
</fileset>
<fileset dir="../modules/activiti-rest/target">
<include name="activiti-rest-*.jar" />
</fileset>
<fileset dir="../modules/activiti-camel/target">
<include name="activiti-camel-*.jar" />
</fileset>
<fileset dir="../modules/activiti-cdi/target">
<include name="activiti-cdi*.jar" />
</fileset>
<fileset dir="../modules/activiti-cxf/target">
<include name="activiti-cxf-*.jar" />
</fileset>
<fileset dir="../modules/activiti-mule/target">
<include name="activiti-mule-*.jar" />
</fileset>
<fileset dir="../modules/activiti-osgi/target">
<include name="activiti-osgi-*.jar" />
</fileset>
<fileset dir="../modules/activiti-crystalball/target">
<include name="activiti-crystalball-*.jar" />
</fileset>
</copy>
</target>
<target name="copy.webapps">
<mkdir dir="${target.distro.root}/wars" />
<copy todir="${target.distro.root}/wars">
<fileset dir="../modules/activiti-webapp-explorer2/target">
<include name="activiti-webapp-explorer*.war" />
</fileset>
<fileset dir="../modules/activiti-webapp-rest2/target">
<include name="activiti-webapp-rest*.war" />
</fileset>
</copy>
<move file="${target.distro.root}/wars/activiti-webapp-explorer2-${activiti.version}.war" tofile="${target.distro.root}/wars/activiti-explorer.war"/>
<move file="${target.distro.root}/wars/activiti-webapp-rest2-${activiti.version}.war" tofile="${target.distro.root}/wars/activiti-rest.war"/>
</target>
<target name="build.docs" unless="nodocs">
<!-- JAVADOCS -->
<exec executable="${mvn.executable}" dir="../modules/activiti-engine">
<arg line="-DexcludePackageNames=org.activiti.engine.impl* javadoc:javadoc" />
</exec>
<mkdir dir="${target.distro.root}/docs/javadocs" />
<copy todir="${target.distro.root}/docs/javadocs">
<fileset dir="../modules/activiti-engine/target/site/apidocs" />
</copy>
<!-- USERGUIDE -->
<echo message="On failure, make sure that you have installed the Xalan libs by executing the 'install.xalan.libs' target in the 'userguide' folder.">
</echo>
<ant antfile="../userguide/build.xml" inheritall="false" />
<mkdir dir="${target.distro.root}/docs/userguide" />
<copy todir="${target.distro.root}/docs/userguide">
<fileset dir="../userguide/target/html/en" />
</copy>
</target>
<target name="copy.docs" depends="build.docs" unless="nodocs">
<!-- COPY XSD -->
<copy todir="${target.distro.root}/docs/xsd">
<fileset dir="../modules/activiti-bpmn-converter/src/main/resources/org/activiti/impl/bpmn/parser">
<include name="*.xsd" />
</fileset>
</copy>
</target>
<target name="publish.docs" depends="build.docs">
<mkdir dir="${activiti.website}/javadocs" />
<copy todir="${activiti.website}/javadocs" overwrite="true">
<fileset dir="../modules/activiti-engine/target/site/apidocs" />
</copy>
<mkdir dir="${activiti.website}/userguide" />
<copy todir="${activiti.website}/userguide" overwrite="true">
<fileset dir="../userguide/target/html/en" />
</copy>
<copy todir="${activiti.website}" overwrite="true">
<fileset dir="src">
<include name="readme.html" />
</fileset>
</copy>
</target>
<target name="copy.sql">
<!-- COPY SQL -->
<copy todir="${target.distro.root}/database">
<fileset dir="../modules/activiti-engine/src/main/resources/org/activiti/db">
<include name="create/**" />
<include name="drop/**" />
<include name="upgrade/**" />
</fileset>
</copy>
</target>
</project>