解决ant编译中出现“includeantruntime was not set”警告的问题
2013-03-08 14:03
609 查看
http://hi.baidu.com/xiboliya/item/599753c34b7a517ccfd4f847
执行ant编译时,总会出现如下的警告:
[javac] D:\SnowPad\build.xml:26: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
虽然不影响编译,但还是解决才安心。其实解决方法也很简单,只需要根据提示在javac任务中添加includeAntRuntime="false"属性即可。例如:
修改前:
<javac srcdir="${srcDir}" destdir="${binDir}" />
修改后:
<javac srcdir="${srcDir}" destdir="${binDir}" includeAntRuntime="false" />
注:
1.对于includeAntRuntime属性,官方的解释如下:
Whether to include the Ant run-time libraries in the classpath; defaults to yes, unless build.sysclasspath is set. It is usually best to set this to false so the script's behavior is not sensitive to the environment in which it is run.
2.此警告在较早的ant版本中可能不会出现,当前用的版本是:Apache Ant(TM) version 1.8.2 compiled on December 20 2010。所以此问题跟ant版本有关。
执行ant编译时,总会出现如下的警告:
[javac] D:\SnowPad\build.xml:26: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
虽然不影响编译,但还是解决才安心。其实解决方法也很简单,只需要根据提示在javac任务中添加includeAntRuntime="false"属性即可。例如:
修改前:
<javac srcdir="${srcDir}" destdir="${binDir}" />
修改后:
<javac srcdir="${srcDir}" destdir="${binDir}" includeAntRuntime="false" />
注:
1.对于includeAntRuntime属性,官方的解释如下:
Whether to include the Ant run-time libraries in the classpath; defaults to yes, unless build.sysclasspath is set. It is usually best to set this to false so the script's behavior is not sensitive to the environment in which it is run.
2.此警告在较早的ant版本中可能不会出现,当前用的版本是:Apache Ant(TM) version 1.8.2 compiled on December 20 2010。所以此问题跟ant版本有关。
相关文章推荐
- 解决ant编译中出现“includeantruntime was not set”警告的问题
- 解决ant编译中出现“includeantruntime was not set”警告的问题
- 解决ant编译中出现“includeantruntime was not set”警告的问题
- 解决ant编译中出现“includeantruntime was not set”警告的问题
- 解决ant编译中出现“includeantruntime was not set”警告的问题
- 解决ant编译中出现“includeantruntime was not set”警告的问题
- 解决ant编译中出现“includeantruntime was not set”警告的问题
- 解决ant编译中出现“ warning: 'includeantruntime' was not set,”警告的问题执行ant编译时,
- apache-ant编译中出现“includeantruntime was not set”警告的问题?
- Ant编译中出现“includeantruntime was not set”警告
- ant警告 “warning: 'includeantruntime' was not set”解决方法
- ant警告 “warning: 'includeantruntime' was not set”解决方法
- Ant问题:warning: 'includeantruntime' was not set
- Ant问题:warning: 'includeantruntime' was not set
- Ant问题:warning: 'includeantruntime' was not set
- 解决maven打包编译出现File encoding has not been set问题
- 编译hadoop-0.20.2源码时执行ant eclipse-files出现.eclipse.templates does not exist问题解决方案
- ant警告 “warning: 'includeantruntime' was not set”解决方法
- 编译时出现set but not used [-Werror=unused-but-set-variable]问题的解决办法
- ant编译时warning: ‘includeantruntime’ was not set