-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
executable file
·105 lines (87 loc) · 4.86 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="default" name="demoall">
<target name="default" depends="clean, update-dependencies, war"/>
<target name="dependency" depends="default"/>
<property name="appname" value="${ant.project.name}"/>
<property name="org" value="EnterMediaSoftware.com"/>
<property name="lib" location="${basedir}/lib"/>
<property name="etc" location="${basedir}/etc"/>
<property name="build" location="${basedir}/build"/>
<property name="wardir" location="${build}/wartmp"/>
<property name="webapp" location="${basedir}/webapp"/>
<property name="webinf" location="${webapp}/WEB-INF"/>
<property name="branch" value="" />
<property name="majorversion" value="7" />
<!--
========================================================================
Anthill build server properties. These properties will be passed in
by anthill when this script is executed on the build server.
- "version" is set by the version adapter
- "deployDir" is set by anthill.publish.dir
========================================================================
-->
<property environment="env" />
<property name="version" value="${majorversion}.${env.BUILD_NUMBER}"/>
<property name="deployDir" value="deploy"/>
<property name="report" value="${deployDir}"/>
<!-- A convenience variable for documentation output -->
<property name="versionedApp" value="${appname}-${version}"/>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${wardir}"/>
</target>
<target name="update-dependencies" depends="clean">
<mkdir dir="${wardir}/WEB-INF/" />
<get dest="${build}/install.xml" src="http://dev.entermediasoftware.com/jenkins/job/${branch}entermedia-server/lastSuccessfulBuild/artifact/deploy/install.xml"/>
<ant antfile="${build}/install.xml" inheritAll="false" dir="${wardir}/WEB-INF/" target="default"/>
<!--
<get dest="${build}/install.xml" src="http://dev.entermediasoftware.com/jenkins/job/${branch}app-eml/lastSuccessfulBuild/artifact/deploy/install.xml"/>
<ant antfile="${build}/install.xml" inheritAll="false" dir="${wardir}/WEB-INF/" target="default"/>
-->
<get dest="${build}/install.xml" src="http://dev.entermediasoftware.com/jenkins/job/${branch}app-emshare/lastSuccessfulBuild/artifact/deploy/install.xml"/>
<ant antfile="${build}/install.xml" inheritAll="false" dir="${wardir}/WEB-INF/" target="default"/>
<get dest="${build}/install.xml" src="http://dev.entermediasoftware.com/jenkins/job/${branch}em-mobile/lastSuccessfulBuild/artifact/deploy/install.xml"/>
<ant antfile="${build}/install.xml" inheritAll="false" dir="${wardir}/WEB-INF/" target="default"/>
<get dest="${build}/install.xml" src="http://dev.entermediasoftware.com/jenkins/job/${branch}extension-ooffice/lastSuccessfulBuild/artifact/deploy/install.xml"/>
<ant antfile="${build}/install.xml" inheritAll="false" dir="${wardir}/WEB-INF/" target="default"/>
<get dest="${build}/install.xml" src="http://dev.entermediasoftware.com/jenkins/job/${branch}extension-openedit/lastSuccessfulBuild/artifact/deploy/install.xml"/>
<ant antfile="${build}/install.xml" inheritAll="false" dir="${wardir}/WEB-INF/" target="default"/>
<get dest="${build}/install.xml" src="http://dev.entermediasoftware.com/jenkins/job/${branch}extension-elasticsearch/lastSuccessfulBuild/artifact/deploy/install.xml"/>
<ant antfile="${build}/install.xml" inheritAll="false" dir="${wardir}/WEB-INF/" target="default"/>
<!-- Add tracker, loudmouth moneymaker etc -->
<copy todir="${wardir}" preservelastmodified="true" >
<fileset dir="${webapp}" followsymlinks="false">
<include name="WEB-INF/base/**" />
<include name="WEB-INF/bin/**" />
<include name="WEB-INF/data/system/**" />
<include name="WEB-INF/*.*" />
<include name="media/**" />
<include name="qa/**" />
<include name="openinstitute/**" />
<include name="emshare/**" />
<include name="theme/**" />
<include name="entermedia/_site.xconf" />
<include name="*.*" />
</fileset>
</copy>
</target>
<!--
========================================================================
Create WAR
========================================================================
-->
<target name="war" >
<mkdir dir="${deployDir}/builds" />
<war warfile="${deployDir}/builds/${versionedApp}.war" webxml="${webinf}/web.xml" basedir="${wardir}"
excludes="WEB-INF/base/archive/**,WEB-INF/base/store/**,WEB-INF/base/search/**,entermedia/catalogs/**">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${appname}"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="${org}"/>
</manifest>
</war>
<move overwrite="true" file="${deployDir}/builds/${versionedApp}.war"
tofile="${deployDir}/ROOT.war"/>
</target>
</project>