-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
72 lines (59 loc) · 1.8 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
<?xml version="1.0"?>
<!--是吗
<project name="helloWorld" basedir="E:\GAME">
<target name="sayHelloWorld">
<echo message="The base dir is: ${basedir}"/>
</target>
</project>
是吗
<project name="javaTest" default ="print" basedir="." >
<target name="clean">
<delete dir="build"/>
</target>
<target name="copy" >
<copy file="file2.txt" tofile="copy222.txt"/>
</target>
<target name="print" >
<echo message="Hello,Amigo"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes"/>
</target>
<target name="run" depends="compile">
<java classname="HelloWorld">
<classpath>
<pathelement path="build/classes"/>
</classpath>
</java>
</target>
<target name="jar" depends="run">
<jar destfile="helloworld.jar" basedir="build/classes">
<manifest>
<attribute name="Main-class" value="HelloWorld"/>
</manifest>
</jar>
</target>
</project>
-->
<!--生成jar包-->
<project name="helloWorld" default="makejar" basedir="D:\java_test">
<target name="makejar" depends = "targetA">
<description>
a depend and a jar example!
</description>
<!--destfile 生成文件,basedir 需要生成的class-->
<jar destfile="java_test.jar" basedir="bin">
<manifest>
<attribute name="Main-class" value="LambdaLearn.lambdaTest" />
</manifest>
</jar>
</target>
<!--生成目录-->
<target name="makedir">
<mkdir dir="build/classes"/>
</target>
<target name="targetA" if="ant.java.version">
<echo message="Java Version: ${ant.java.version}"/>
</target>
</project>