-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
167 lines (148 loc) · 5.67 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
<?xml version="1.0" encoding="utf-8" ?>
<project name="smlmor" default="war" basedir=".">
<property file="version.properties" />
<property file="build.properties" />
<property name="build.dir" value="_generated"/>
<!-- set classpath -->
<path id="project.class.path">
<fileset dir="${appserver.lib}">
<include name="servlet*.jar" />
</fileset>
<pathelement path="${java.class.path}/"/>
<pathelement path="${GWT_HOME}/gwt-user.jar"/>
<!-- you have one of the following three: -->
<pathelement path="${GWT_HOME}/gwt-dev-linux.jar"/>
<pathelement path="${GWT_HOME}/gwt-dev-mac.jar"/>
<pathelement path="${GWT_HOME}/gwt-dev-win.jar"/>
<fileset dir="base_war/WEB-INF/lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init">
<tstamp>
<format property="smlmor.app.build" pattern="yyyyMMddHHmmss" />
</tstamp>
</target>
<target name="gwt-compiler-help">
<java classname="com.google.gwt.dev.GWTCompiler" fork="false">
<classpath>
<pathelement path="${GWT_HOME}/gwt-user.jar"/>
<pathelement path="${GWT_HOME}/gwt-dev-linux.jar"/>
<pathelement path="${GWT_HOME}/gwt-dev-mac.jar"/>
<pathelement path="${GWT_HOME}/gwt-dev-win.jar"/>
</classpath>
<arg value="-help"/>
</java>
</target>
<target name="gwt-compile" description="Compile gwt stuff">
<java classname="com.google.gwt.dev.GWTCompiler" fork="true">
<classpath>
<pathelement path="src"/>
<pathelement path="base_war/WEB-INF/lib/org.oostethys.smlmor.gwt.jar"/>
<pathelement path="${GWT_HOME}/gwt-user.jar"/>
<!-- you have one of the following three: -->
<pathelement path="${GWT_HOME}/gwt-dev-linux.jar"/>
<pathelement path="${GWT_HOME}/gwt-dev-mac.jar"/>
<pathelement path="${GWT_HOME}/gwt-dev-win.jar"/>
</classpath>
<classpath refid="project.class.path"/>
<jvmarg value="-Xmx512m"/>
<jvmarg value="-Xms256m"/>
<jvmarg value="-XX:PermSize=64M"/>
<jvmarg value="-XX:MaxPermSize=128M"/>
<arg value="-logLevel"/>
<arg value="INFO"/>
<arg value="-style"/>
<arg value="DETAILED"/>
<arg value="-out"/>
<arg value="www"/>
<arg value="org.oostethys.smlmor.gwt.Main"/>
</java>
</target>
<target name="compile" depends="init">
<mkdir dir="bin"/>
<mkdir dir="${build.dir}/classes"/>
<javac srcdir="src" destdir="${build.dir}/classes"
includes="**" debug="on" debuglevel="lines,vars,source">
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="jar" depends="compile" description="Package up the project as a jar">
<jar destfile="base_war/WEB-INF/lib/org.oostethys.smlmor.gwt.jar">
<fileset dir="${build.dir}/classes">
<include name="**/*.class"/>
</fileset>
<fileset dir="src">
<include name="**/*.xml"/>
<include name="**/*.css"/>
<include name="**/*.java"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
</fileset>
</jar>
</target>
<target name="war" depends="jar, gwt-compile">
<!-- prepare tmp.WebContent -->
<copy todir="${build.dir}/tmp.WebContent">
<fileset dir="base_war">
<exclude name="WEB-INF/web.xml" />
<exclude name="WEB-INF/lib**" />
<exclude name="WEB-INF/classes/log4j.xml" />
</fileset>
</copy>
<copy file="base_war/WEB-INF/web.xml"
tofile="${build.dir}/tmp.WebContent/WEB-INF/web.xml" overwrite="true">
<filterset>
<filter token="smlmor.app.version" value="${smlmor.app.version}" />
<filter token="smlmor.app.build" value="${smlmor.app.build}" />
<filter token="ont.service.url" value="${ont.service.url}" />
<filter token="bioportal.rest.url" value="${bioportal.rest.url}" />
</filterset>
</copy>
<copy file="base_war/WEB-INF/classes/log4j.xml"
tofile="${build.dir}/tmp.WebContent/WEB-INF/classes/log4j.xml" overwrite="true">
<filterset>
<filter token="smlmor.app.logfilepath" value="${smlmor.app.logfilepath}" />
<filter token="smlmor.app.maxlogfilesize" value="${smlmor.app.maxlogfilesize}" />
<filter token="smlmor.app.maxlogbackupindex" value="${smlmor.app.maxlogbackupindex}" />
<filter token="smlmor.app.log.deflevel" value="${smlmor.app.log.deflevel}" />
<filter token="smlmor.app.log.smlmorlevel" value="${smlmor.app.log.smlmorlevel}" />
</filterset>
</copy>
<war warfile="${build.dir}/smlmor.war" webxml="${build.dir}/tmp.WebContent/WEB-INF/web.xml">
<fileset dir="www/org.oostethys.smlmor.gwt.Main" />
<fileset dir="${build.dir}/tmp.WebContent" />
<lib dir="base_war/WEB-INF/lib" />
</war>
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${build.dir}/tmp.WebContent" />
</delete>
</target>
<target name="clean">
<delete file="base_war/WEB-INF/lib/org.oostethys.smlmor.gwt.jar"/>
<delete>
<fileset dir="${build.dir}" includes="**/*.class"/>
</delete>
</target>
<target name="shell" depends="jar">
<java classname="com.google.gwt.dev.GWTShell" fork="true">
<classpath>
<pathelement path="src"/>
<pathelement path="base_war/WEB-INF/lib/org.oostethys.smlmor.gwt.jar"/>
<pathelement path="${GWT_HOME}/gwt-user.jar"/>
<!-- you have one of the following three: -->
<pathelement path="${GWT_HOME}/gwt-dev-linux.jar"/>
<pathelement path="${GWT_HOME}/gwt-dev-mac.jar"/>
<pathelement path="${GWT_HOME}/gwt-dev-win.jar"/>
</classpath>
<classpath refid="project.class.path"/>
<jvmarg value="-XstartOnFirstThread"/>
<jvmarg value="-Xmx256M"/>
<arg value="-port"/>
<arg value="9999"/>
<arg value="-out"/>
<arg value="www"/>
<arg value="org.oostethys.smlmor.gwt.Main/index.html"/>
</java>
</target>
</project>