forked from daemonchen/redis-monitor
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.xml
74 lines (58 loc) · 2.45 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
<project name="redis-monitor" basedir="." default="deploy" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<property file="build.properties" />
<property name="resources.dir" value="${basedir}/src/main/resources" />
<property name="deploy.home" value="${basedir}/src/main/webapp"/>
<property name="messages.dir" value="${basedir}/messages"/>
<property name="classes.dir" value="${basedir}/target/classes" />
<path id="maven-ant-tasks.classpath" path="${basedir}/lib/ant/maven-ant-tasks-2.0.10.jar" />
<path id="ant-contrib.classpath" path="${basedir}/lib/ant/ant-contrib-1.0b3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" />
<taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="ant-contrib.classpath" />
<target name="compile">
<artifact:dependencies pathid="mavenclasspath" useScope="runtime">
<pom file="pom.xml" />
</artifact:dependencies>
<mkdir dir="${basedir}/src/main/webapp/WEB-INF/classes"/>
<javac srcdir="${basedir}/src/main/java"
destdir="${basedir}/src/main/webapp/WEB-INF/classes"
classpathref="mavenclasspath">
<compilerarg value="-Xlint"/>
</javac>
</target>
<target name="copyResources">
<copy todir="${deploy.home}/WEB-INF/classes">
<fileset dir="${resources.dir}" />
</copy>
</target>
<target name="copyClass">
<mkdir dir="${deploy.home}/WEB-INF/classes" />
<copy todir="${deploy.home}/WEB-INF/classes">
<fileset dir="${classes.dir}" />
</copy>
</target>
<target name="copyLib">
<artifact:dependencies filesetId="project.dep.fileset" useScope="runtime">
<pom file="pom.xml" />
</artifact:dependencies>
<mkdir dir="${deploy.home}/WEB-INF/lib" />
<copy todir="${deploy.home}/WEB-INF/lib">
<fileset refid="project.dep.fileset" />
<mapper type="flatten" />
</copy>
</target>
<target name="deploy" depends="" >
<ant target="copyResources"></ant>
<ant target="copyLib"></ant>
</target>
<target name="create-jar">
<echo>start create jar...</echo>
<jar destfile="${basedir}/target/redis-monitor.jar" basedir="${classes.dir}" includes="com/**"></jar>
<echo>end create jar...</echo>
</target>
<target name="dist" depends="compile,deploy">
<copy todir="${basedir}/dist">
<fileset dir="${basedir}/src/main/webapp">
</fileset>
</copy>
</target>
</project>