Skip to content

Instantly share code, notes, and snippets.

@siguremon
Created May 28, 2013 10:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siguremon/5661773 to your computer and use it in GitHub Desktop.
Save siguremon/5661773 to your computer and use it in GitHub Desktop.
Antのプロパティの指定方法(タスク、プロパティファイル、コマンドライン引数) ref: http://qiita.com/items/e26a13f73bc8e3b7a6db
<?xml version="1.0"?>
<project name="SimpleAnt" default="compile">
<property file="file.properties" />
<property name="msg" value="Hello world" />
<target name="compile">
<echo>${msg}</echo>
</target>
<target name="test" depends="compile">
<echo>testだけど表示するだけで何もしない</echo>
</target>
</project>
msg=hello from properties file
> ant compile
compile:
[echo] hello world
> ant compile
compile:
[echo] hello from properties file
> ant compile -Dmsg="hello from argument"
compile:
[echo] hello from argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment