| |
打印出帮助信息 |
|
<?xml version="1.0"?>
<!-- You can document the buildfile using XML comments -->
<project name="My Big Project" default="help" basedir=".">
<description>Shows how to provide help in an Ant buildfile.</description>
<property name="dir.src" value="src"/>
<target name="help">
<echo message="This buildfile shows how to get help."/>
<echo>(Type 'ant -projecthelp' for more info)</echo>
<echo>
Here is a block of text
that you want to format
in a very specific way!</echo>
</target>
<!-- Here is an example of a subtarget -->
<target name="prepare">
<mkdir dir="${dir.build}"/>
<mkdir dir="${dir.dist}"/>
</target>
<!-- Here is an example of a main target -->
<target name="clean"
description="Remove all generated files.">
<delete dir="${dir.build}"/>
<delete dir="${dir.dist}"/>
</target>
<target name="compile" depends="prepare"
description="Compile all source code.">
<javac srcdir="${dir.src}" destdir="${dir.build}"/>
</target>
</project>
|
|
|
Related examples in the same category |
|