java

位置:IT落伍者 >> java >> 浏览文章

Ant的配置使用入门[3]


发布日期:2018年04月01日
 
Ant的配置使用入门[3]

建立工程资源文件buildproperties

文件内容是下面一行内容

classpath=build\\classes

建立java源文件helloantHelloAntjava

package helloant;

public class HelloAnt {

public static void main(String[] args) {

Systemoutprintln(hello ant the first time using ant it is great);

}

}

编译

C:\workspace\anttest>ant buildfile buildxml

Buildfile: buildxml

[echo] pulling in property files

init:

[echo] init delete the old class files and create the new folds

[delete] Deleting directory C:\workspace\anttest\build\classes

[mkdir] Created dir: C:\workspace\anttest\build\classes

compile:

[echo] compile the java source files

[javac] Compiling source file to C:\workspace\anttest\build\classes

main:

[echo] calling java to run this java project

[java] hello ant the first time using ant it is great

BUILD SUCCESSFUL

Total time: milliseconds

C:\workspace\anttest>

[] [] []

               

上一篇:Ant的配置使用入门[1]

下一篇:Ant的配置使用入门[2]