-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
61 lines (52 loc) · 2.25 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
<project name="interview" default="deploy">
<property environment="env"/>
<property name="tomcat.home.dir" location="${env.CATALINA_HOME}" />
<path id="compile.classpath">
<fileset dir="${basedir}/lib/"/>
<fileset dir="${basedir}/webapp"/>
<fileset dir="${basedir}/src/ua"/>
</path>
<target name="init">
<mkdir dir="${basedir}/dist/${ant.project.name}" />
</target>
<target name="clean">
<delete dir="${basedir}/dist/${ant.project.name}" />
</target>
<target name="compile" depends="init">
<mkdir dir="${basedir}/dist/${ant.project.name}/WEB-INF/classes" />
<mkdir dir="${basedir}/dist/${ant.project.name}/WEB-INF/lib" />
<javac destdir="${basedir}/dist/${ant.project.name}/WEB-INF/classes" debug="true" srcdir="src">
<classpath refid="compile.classpath"/>
</javac>
<copy todir="${basedir}/dist/${ant.project.name}">
<fileset dir="${basedir}/webapp"/>
</copy>
<copy todir="${basedir}/dist/${ant.project.name}/WEB-INF/lib">
<fileset dir="${basedir}/lib/"></fileset>
</copy>
<copy todir="${basedir}/dist/${ant.project.name}/WEB-INF/classes">
<fileset file="${basedir}/hibernate.cfg.xml"></fileset>
<fileset file="${basedir}/log4j.properties"></fileset>
<fileset file="${basedir}/Logotip.png"></fileset>
<fileset file="${basedir}/interview.log"></fileset>
</copy>
</target>
<target name="war" depends="compile">
<war destfile="${tomcat.home.dir}/webapps/${ant.project.name}.war" webxml="${basedir}/webapp/WEB-INF/web.xml">
<fileset dir="${basedir}/dist/interview"/>
</war>
</target>
<target name="tomcat-start">
<java jar="${tomcat.home.dir}/bin/bootstrap.jar" fork="true">
<jvmarg value="-Dcatalina.home=${tomcat.home.dir}"/>
</java>
</target>
<target name="tomcat-stop">
<java jar="${tomcat.home.dir}/bin/bootstrap.jar" fork="true">
<jvmarg value="-Dcatalina.home=${tomcat.home.dir}"/>
<arg line="stop"/>
</java>
</target>
<target name="deploy" depends="tomcat-stop, clean, war, tomcat-start" >
</target>
</project>