Xu Wenhao

View on GitHub
15 January 2008

ant版本兼容性的问题

by Xu Wenhao

折腾了大半天,跑ADI的时候,到一半就抛错

unknown argument: -cp
-usage ant [options] [target [target2]

google了一把,一般都说啥cmd和bat脚本不对啦,删掉/etc/下的config文件啦,最后发现是,ant1.6.3以下版本不支持-cp参数而只有-lib参数。我在copy项目依赖的ant相关的jar的时候,用1.6.2的jar覆盖了1.6.5版本的,导致cmd和bat脚本都是1.6.5的,而实际用的jar是1.6.2的。

tags: