-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
55 lines (47 loc) · 2.35 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
<?xml version="1.0"?>
<project name="wcron" default="complete" basedir=".">
<property name="doc.packages" value="org.dew.wcron.api" />
<property name="src.dir" value="src/main" />
<property name="ext.dir" value="${user.home}/.m2/repository" />
<property name="dst.dir" value="target" />
<property name="doc.dir" value="doc" />
<property name="javadoc.dir" value="doc/javadoc" />
<property name="out.dir" value="out" />
<property name="backend.arc" value="${ant.project.name}_BackEnd.jar" />
<property name="web.arc" value="${ant.project.name}.war" />
<property name="app.arc" value="${ant.project.name}.ear" />
<target name="complete" depends="compilation, documentation, assembly, autodeploy" />
<target name="normal" depends="compilation" />
<target name="docs" depends="documentation" />
<target name="clean">
<delete dir="${out.dir}" includeEmptyDirs="true" />
<delete dir="${doc.dir}" includeEmptyDirs="true" />
<delete dir="${dst.dir}" includeEmptyDirs="true" />
</target>
<target name="compilation">
<echo>ant java version: ${ant.java.version}</echo>
<echo>jvm java version: ${java.version}</echo>
<delete dir="${out.dir}" includeEmptyDirs="true" />
<mkdir dir="${out.dir}" />
<javac debug="true" debuglevel="lines,vars,source" srcdir="${src.dir}/java" destdir="${out.dir}" includeantruntime="false">
<classpath path="${ext.dir}/javax/javaee-api/7.0/javaee-api-7.0.jar" />
</javac>
</target>
<target name="assembly">
<jar jarfile="${dst.dir}/${backend.arc}">
<fileset dir="${out.dir}" includes="**/*.class" />
<fileset dir="${src.dir}/resources" includes="logger.cfg, **/*.sql, **/*.xml"/>
</jar>
<war destfile="${dst.dir}/${web.arc}" webxml="${src.dir}/webapp/WEB-INF/web.xml" basedir="${src.dir}/webapp" excludes="**/.svn">
<lib dir="${dst.dir}" includes="${backend.arc}" />
</war>
</target>
<target name="documentation">
<delete dir="${javadoc.dir}" includeEmptyDirs="true" />
<mkdir dir="${javadoc.dir}" />
<javadoc sourcepath="${src.dir}/java" destdir="${javadoc.dir}" extdirs="${ext.dir}/javax/javaee-api/7.0" packagenames="${doc.packages}" />
<jar jarfile="${dst.dir}/${ant.project.name}_javadoc.jar" basedir="${javadoc.dir}" />
</target>
<target name="autodeploy">
</target>
</project>