-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.xml
145 lines (134 loc) · 5.27 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Governance Install From Source" default="install" basedir=".">
<macrodef name = "git">
<attribute name = "command" />
<attribute name = "dir" default = "" />
<element name = "args" optional = "true" />
<sequential>
<echo message = "git @{command}" />
<exec executable = "git" dir = "@{dir}">
<arg value = "@{command}" />
<args/>
</exec>
</sequential>
</macrodef>
<macrodef name = "git-clone-pull">
<attribute name = "repository" />
<attribute name = "dest" />
<sequential>
<git command = "clone">
<args>
<arg value = "@{repository}" />
<arg value = "@{dest}" />
</args>
</git>
<git command = "pull" dir = "@{dest}" />
</sequential>
</macrodef>
<property file="build.properties" />
<property name="appserver.id" value="jboss-eap-6" />
<property name="maven.executable" value="mvn" />
<!-- Check which app server we're installing into -->
<target name="appserver-check">
<!-- Set some properties based on the value of appserver.id -->
<condition property="jboss-eap-6">
<equals arg1="${appserver.id}" arg2="jboss-eap-6" />
</condition>
<condition property="jboss-as-7.1.1.Final">
<equals arg1="${appserver.id}" arg2="jboss-as-7.1.1.Final" />
</condition>
</target>
<target name="clone">
<git command = "clone">
<args>
<arg value = "${git.governance.overlord-commons}" />
<arg value = "src/overlord-commons" />
</args>
</git>
<git command = "clone">
<args>
<arg value = "${git.governance.s-ramp}" />
<arg value = "src/s-ramp" />
</args>
</git>
<git command = "clone">
<args>
<arg value = "${git.governance.dtgov}" />
<arg value = "src/dtgov" />
</args>
</git>
</target>
<target name="pull">
<git command = "pull" dir = "src/overlord-commons" />
<git command = "pull" dir = "src/s-ramp" />
<git command = "pull" dir = "src/dtgov" />
</target>
<target name="install">
<exec executable="${maven.executable}">
<arg value="-f" />
<arg value="src/overlord-commons/pom.xml" />
<arg value="clean" />
<arg value="install" />
<arg value="-DskipTests=true"/>
</exec>
<exec executable="${maven.executable}">
<arg value="-f" />
<arg value="src/s-ramp/pom.xml" />
<arg value="clean" />
<arg value="install" />
<arg value="-DskipTests=true"/>
</exec>
<exec executable="${maven.executable}">
<arg value="-f" />
<arg value="src/dtgov/pom.xml" />
<arg value="clean" />
<arg value="install" />
<arg value="-DskipTests=true"/>
</exec>
</target>
<target name="deploy-eap">
<delete dir="target"/>
<mkdir dir="target"/>
<unzip src="${jbosseap}.zip" dest="target"/>
<unzip src="src/s-ramp/s-ramp-distro/s-ramp-distro-assembly/target/s-ramp-${sramp.version}.zip" dest="target"/>
<ant antfile="build.xml" target="install-jboss-eap-6" inheritrefs="false" dir="target/s-ramp-${sramp.version}">
<property name="s-ramp-distro.choices.platform.jboss-eap-6.path" value="${basedir}/target/jboss-eap-6"/>
</ant>
<unzip src="src/dtgov/dtgov-distro/target/dtgov-${dtgov.version}.zip" dest="target"/>
<ant antfile="build.xml" target="install-jboss-eap-6" dir="target/dtgov-${dtgov.version}">
<property name="dtgov-distro.choices.platform.jboss-eap-6.path" value="${basedir}/target/jboss-eap-6"/>
</ant>
</target>
<target name="deploy-tomcat">
<delete dir="target"/>
<mkdir dir="target"/>
<unzip src="src/s-ramp/s-ramp-distro/s-ramp-distro-assembly/target/s-ramp-${sramp.version}.zip" dest="target"/>
<ant antfile="build.xml" target="install-tomcat-7" inheritrefs="false" dir="target/s-ramp-${sramp.version}">
<property name="s-ramp-distro.choices.platform.tomcat-7.path" value=""/>
</ant>
<move todir="target/apache-tomcat-${tomcat.version}">
<fileset dir="target/s-ramp-${sramp.version}/apache-tomcat-${tomcat.version}"/>
</move>
<unzip src="src/dtgov/dtgov-distro/target/dtgov-${dtgov.version}.zip" dest="target"/>
<ant antfile="build.xml" target="install-tomcat-7" dir="target/dtgov-${dtgov.version}">
<property name="dtgov-distro.choices.platform.tomcat-7.path" value="${basedir}/target/apache-tomcat-${tomcat.version}"/>
</ant>
</target>
<target name="seed">
<input message="Please supply the password for the admin user:" addproperty="admin.password" >
<handler classname="org.apache.tools.ant.input.SecureInputHandler" />
</input>
<echo file="target/dtgov-${dtgov.version}/.temp/dtgov-installer/cli-commands.txt" append="false">
connect http://localhost:8080/s-ramp-server admin ${admin.password}
ontology:upload dtgov-data/deployment-status.owl
ontology:upload dtgov-data/project-review-status.owl
</echo>
<ant antfile="build.xml" target="seed" dir="target/dtgov-${dtgov.version}"/>
<exec executable="${maven.executable}">
<arg value="-f" />
<arg value="target/dtgov-${dtgov.version}/dtgov-data/pom.xml" />
<arg value="clean" />
<arg value="deploy" />
</exec>
</target>
</project>