錯誤現象:java
工程依賴了common-cli包this
<dependency org="commons-cli" name="commons-cli" rev="1.0"/>
retrieve配置:spa
<ivy:retrieve pattern="${lib.dir}/[artifact].[ext]"/>
在publish的時候出現以下錯誤:code
java.lang.RuntimeException: Multiple artifacts xxx are retrieved to the same file! Update the retrieve pattern to fix this error.xml
解決方法:token
修改retrieve pattern以下:
ip
<ivy:retrieve pattern="${lib.dir}/[artifact].(-[classifier])[ext]"/>
the usual mistake is assuming that modules only publish library jars. If you're resolving a module like commons-lang that publishes other jars (source jars, javadoc jars, etc) then you need to incorporate the [classifier] token in your retrieve pattern. Here's an example: pattern="${lib.dir}/[conf]/[artifact](-[classifier]).[ext]"io