-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
121 lines (104 loc) · 4.79 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
<?xml version="1.0"?>
<project name="rm-parent" basedir=".">
<!-- The properties 'app.war.artifactId' and 'app.tomcat' are defined in the modules -->
<property file="build.local.properties" />
<property file="build.properties" />
<property environment="env" />
<target name="fetchWarFile">
<xmlproperty file="../pom.xml" keepRoot="false"/>
<exec executable="${mvn.exec}" failonerror="true">
<arg value="dependency:get" />
<arg value="-DgroupId=${groupId}" />
<arg value="-DartifactId=${app.war.artifactId}" />
<arg value="-Dversion=${properties.alfresco.base.version}" />
<arg value="-Dpackaging=${app.war.packaging}" />
<arg value="-Ddest=${ant.build.directory}/${app.package}" />
</exec>
</target>
<target name="fetchEntpriseWarFile">
<xmlproperty file="../pom.xml" keepRoot="false"/>
<exec executable="${mvn.exec}" failonerror="true">
<arg value="dependency:get" />
<arg value="-DgroupId=${groupId}" />
<arg value="-DartifactId=${app.war.artifactId}-enterprise" />
<arg value="-Dversion=${properties.alfresco.base.version}" />
<arg value="-Dpackaging=${app.war.packaging}" />
<arg value="-Ddest=${ant.build.directory}/${app.war.artifactId}.${app.war.packaging}" />
</exec>
</target>
<target name="deleteWarFile">
<delete file="${app.package.path}" failonerror="true" />
</target>
<target name="deleteExplodedWar">
<delete dir="${app.folder}" failonerror="true" />
</target>
<target name="alfresco:amp" depends="unitTest">
<exec executable="${mvn.exec}" failonerror="true">
<arg value="clean" />
<arg value="install" />
<arg value="-DskipTests" />
<arg value="-Dminifyjs=${minifyjs}" />
<arg value="-PfullBuild" />
<arg value="alfresco:amp" />
</exec>
</target>
<target name="alfresco:install" depends="deleteWarFile, deleteExplodedWar, alfresco:amp, fetchWarFile">
<exec executable="${mvn.exec}" failonerror="true">
<arg value="alfresco:install" />
</exec>
</target>
<target name="alfresco:installEnterprise" depends="deleteWarFile, deleteExplodedWar, alfresco:amp, fetchEntpriseWarFile">
<exec executable="${mvn.exec}" failonerror="true">
<arg value="alfresco:install" />
<arg value="-Penterprise" />
</exec>
</target>
<target name="copyWarFileToTomcat">
<copy file="${ant.build.directory}/${app.package}" todir="${app.tomcat.webapps}" failonerror="true" />
</target>
<target name="fullBuildCommunity" depends="alfresco:install, copyWarFileToTomcat" description=""/>
<target name="fullBuildEnterprise" depends="alfresco:installEnterprise, copyWarFileToTomcat" description=""/>
<target name="copyWebDirectory" if="${web.directory.exists}">
<copy todir="${app.folder}" failonerror="true">
<fileset dir="${ant.source.web.directory}" />
</copy>
<xmlproperty file="../pom.xml" keepRoot="false"/>
<exec executable="${mvn.exec}" failonerror="true">
<arg value="dependency:get" />
<arg value="-DgroupId=${groupId}" />
<arg value="-DartifactId=aikau" />
<arg value="-Dversion=${alfresco.aikau.version}" />
<arg value="-Dpackaging=jar" />
<arg value="-Ddest=${app.folder}/WEB-INF/lib/" />
</exec>
</target>
<target name="package">
<fail message="Exploded webapp directory '${app.war.artifactId}' does not exist.">
<condition>
<not>
<available file="${app.folder}" type="dir"/>
</not>
</condition>
</fail>
<exec executable="${mvn.exec}" failonerror="true">
<arg value="package" />
<arg value="-DskipTests" />
</exec>
</target>
<target name="incrementalBuild" depends="package, unitTest" description="">
<xmlproperty file="pom.xml" keepRoot="false"/>
<copy file="${ant.build.directory}/${artifactId}.jar" tofile="${ant.build.directory}/${artifactId}-amp.jar" failonerror="true" />
<move file="${ant.build.directory}/${artifactId}-amp.jar" todir="${app.folder}/WEB-INF/lib" failonerror="true" />
<copy todir="${app.folder}/WEB-INF/classes" failonerror="true">
<fileset dir="${ant.config.directory}">
<exclude name="**/module.properties" />
<exclude name="**/file-mapping.properties" />
</fileset>
</copy>
<condition property="web.directory.exists">
<available file="${ant.source.web.directory}" type="dir" />
</condition>
<antcall target="copyWebDirectory"></antcall>
</target>
<target name="unitTest" />
</project>