问题
Related question: Ivy cached a dependency file, but not copy to my lib
My situation is nearly identical, except that this has been working for quite a while until recently.
Ivy retrieves other jars: transitive dependencies like com.google.code.findbugs, and specified artifacts like junit.
It does not copy the guava jar to my lib.
ivy.xml:
<ivy-module version="2.0">
<info organisation="mine" module="external-deps"/>
<dependencies>
<dependency org="com.google.guava" name="guava" rev="14.0.1"/>
<dependency org="junit" name="junit" rev="4.11"/>
</dependencies>
</ivy-module>
Ant retrieve task:
<target name="_ivy_retrieve" depends="init-ivy">
<ivy:retrieve type="jar" pattern="${lib.dir}/ivy/[conf]/[organisation]/[artifact]-[type]-[revision].[ext]" log="quiet"/>
<ivy:artifactproperty conf="default" name="lib.[artifact].[type]" value="ivy/[conf]/[organisation]/[artifact]-[type]-[revision].[ext]"/>
</target>
Is my ivy.xml specified incorrectly? Is my retrieve task broken? Or, did something break for the 14.0.1 distribution for Guava?
回答1:
It appears that Ivy's type attribute strongly corresponds to Maven's packaging attribute. Google Guava uses package type bundle instead of jar which is used by most open source projects.
Ref: http://search.maven.org/#artifactdetails%7Ccom.google.guava%7Cguava%7C17.0%7Cbundle
回答2:
The
type="jar"
attribute was causing the issue. Removing this corrects the problem.
来源:https://stackoverflow.com/questions/16526937/ivy-used-to-retrieve-guava-now-it-does-not