Created
May 28, 2013 10:08
-
-
Save siguremon/5661773 to your computer and use it in GitHub Desktop.
Antのプロパティの指定方法(タスク、プロパティファイル、コマンドライン引数) ref: http://qiita.com/items/e26a13f73bc8e3b7a6db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
msg=hello from properties file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> ant compile | |
compile: | |
[echo] hello world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> ant compile | |
compile: | |
[echo] hello from properties file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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