-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml.mm
143 lines (122 loc) · 4.76 KB
/
build.xml.mm
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
<project name="Javagulp" default="jar-for-danse" basedir=".">
<macrodef name="unsignjar">
<attribute name="jar" />
<sequential>
<!-- Remove any existing signatures from a JAR file. -->
<tempfile prefix="usignjar-" destdir="${java.io.tmpdir}" property="temp.file" />
<echo message="Removing signatures from JAR: @{jar}" />
<mkdir dir="${temp.file}" />
<unjar src="@{jar}" dest="${temp.file}">
<patternset>
<include name="**" />
<exclude name="META-INF/*.SF" />
<exclude name="META-INF/*.DSA" />
<exclude name="META-INF/*.RSA" />
</patternset>
</unjar>
<delete file="@{jar}" failonerror="true" />
<!-- Touch it in case the file didn't have a manifest.
Otherwise the JAR task below will fail if the manifest
file doesn't exist. -->
<mkdir dir="${temp.file}/META-INF" />
<touch file="${temp.file}/META-INF/MANIFEST.MF" />
<jar destfile="@{jar}" basedir="${temp.file}" includes="**" manifest="${temp.file}/META-INF/MANIFEST.MF" />
<delete dir="${temp.file}" failonerror="true" />
</sequential>
</macrodef>
<description>GULP</description>
<property environment="env" />
<property name="src" location="src" />
<property name="trueblueDeploy" location="/var/www/java"/>
<property name="lib" value="lib" />
<property name="app-name" value="GULP" />
<property name="username" value="jbk" />
<property name="build" location="${env.EXPORT_ROOT}/java/javagulp/" />
<property name="vnfDeploy" location="${env.EXPORT_ROOT}/vnf/html/java"/>
<property name="keystore" location="${env.EXPORT_ROOT}/vnf/html/java/vnfKeys" />
<path id="classpath" path="${classpath}">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init">
<tstamp>
<format property="now" pattern="MMMM d, yyyy hh:mm aa" />
<format property="webappnow" pattern="h:mm a EEE, MMM d, ''yy" />
</tstamp>
</target>
<target name="jar-potentials" description="puts potentials in a jar" depends="init">
<jar destfile="lib/potentials.jar">
<fileset dir="resources"/>
</jar>
<!-- sign jar -->
<signjar jar="lib/potentials.jar" keystore="${keystore}" alias="vnf" storepass="purpl3" keypass="purpl3" />
<copy file="lib/potentials.jar" todir="deployable"/>
</target>
<target name="sign-libraries" description="sign all the libraries gulp is dependent on" depends="init">
<unsignjar jar="deployable/commons-logging.jar" />
<unsignjar jar="deployable/j2ssh.jar" />
<unsignjar jar="deployable/pg74.216.jdbc3.jar" />
<signjar jar="deployable/commons-logging.jar" keystore="${keystore}" alias="vnf" storepass="purpl3" keypass="purpl3" />
<signjar jar="deployable/j2ssh.jar" keystore="${keystore}" alias="vnf" storepass="purpl3" keypass="purpl3" />
<signjar jar="deployable/pg74.216.jdbc3.jar" keystore="${keystore}" alias="vnf" storepass="purpl3" keypass="purpl3" />
</target>
<target name="jar-for-danse" description="build jars for vnf" depends="init">
<!-- jar up the source and create the manifest
<jar jarfile="deployable/${app-name}.jar">
<manifest file="jee/MANIFEST.MF" />
<fileset dir="${build}">
<include name="javagulp/**" />
</fileset>
</jar>-->
<delete file="deployable/${app-name}.jar"/>
<delete file="MANIFEST.MF"/>
<manifest file="MANIFEST.MF">
<attribute name="Main-Class" value="javagulp.controller.LaunchAtomSim"/>
</manifest>
<jar destfile="deployable/${app-name}.jar" manifest="MANIFEST.MF">
<fileset dir="${build}"/>
</jar>
<!-- sign all jars -->
<signjar jar="deployable/${app-name}.jar" keystore="${keystore}" alias="vnf" storepass="purpl3" keypass="purpl3" />
<!-- copy the libraries to deployable -->
<copy file="lib/commons-logging.jar" todir="deployable"/>
<copy file="lib/j2ssh.jar" todir="deployable"/>
<copy file="lib/pg74.216.jdbc3.jar" todir="deployable"/>
<copy todir="${vnfDeploy}">
<fileset dir="deployable"/>
</copy>
</target>
<target name="copyToTrueblue" depends="jar-for-danse">
<copy todir="${trueblueDeploy}">
<fileset dir="deployable"/>
</copy>
</target>
<!--<project name="Deploy From Eclipse to Tomcat" basedir=".">
<property name="warfile" value="sanfran"/>-->
<target name="unpack">
<unwar src="${warfile}.war" dest="${warfile}" />
</target>
<target name="create">
<war destfile="${warfile}.war" webxml="WebContent/WEB-INF/web.xml" update="true">
<classes dir="build\classes" />
<fileset dir="WebContent">
<exclude name="WEB-INF/web.xml" />
</fileset>
</war>
</target>
<target name="copy">
<copy todir="c:\tomcat5517\webapps" overwrite="true">
<fileset dir=".">
<include name="*.war" />
</fileset>
</copy>
</target>
<target name="deploy">
<antcall target="create" />
<antcall target="copy" />
</target>
<target name="clean">
<delete dir="bin" />
</target>
</project>