今天發現了一個BUG,在引用其他的包的的時候報錯:
ERROR - Undefined placeholders found in template: - Template: META-INF/autoconf/xxx.xml - Descriptor: META-INF/autoconf/xxx.xml - Base URL: jar:jar:file:/Users/liqiu/git/fmp/service/target/xxx.war!/WEB-INF/lib/123456.jar!/ --------------------------------------------------------------- -> undifined_version --------------------------------------------------------------- <jar:file:/Users/liqiu/git/fmp/service/target/xxx.war!/> Generating log file: META-INF/autoconf/auto-config.xml.log ERROR: undefined placeholders [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Autoconfig failed
1、這個時候,發現123456.jar是外部載入的包,需要解壓這個包
jar -xvf 123456.jar
2、然后查看文件:autoconf/xxx.xml,會發現確實存在這些變量沒有被定義:${undifined_version}
3、在如下文件內添加這個變量
antx.properties、auto-config.xml