I would like to extract the jar to a specific folder (e.g. lib) using ivy, below is the extraction definition in the build.xml file:
<ivy:retrieve pattern="lib/[artifact].[ext]" conf="webInfLib" />
And the definition of my ivy.xml as below:
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" xmlns:m="http://ant.apache.org/ivy/maven"> <info organisation="xxxx" module="xxxx" status="integration"/> <configurations> <conf name="webInfLib" description="add jar to web-inf/lib folder"/> </configurations> <dependencies> <dependency org="org.springframework" name="spring-beans" rev="2.5.5" transitive="false" conf="webInfLib -> default"/> <dependency org="net.sf.json-lib" name="json-lib" rev="2.3"> <artifact name="json-lib" type="jar" m:classifier="jdk15"/> </dependency> </dependencies> </ivy-module>
But he always throws:
impossible to ivy retrieve: java.lang.RuntimeException: Multiple artifacts of the module xxxxxx are retrieved to the same file! Update the retrieve pattern to fix this error.
I read some similar question, and they suggest changing the extraction pattern to a more complex one. I try something like "[artifact] -revision. [Ext]" but it doesnβt help. And when I execute "ivy.resolve", it works fine. Are there any suggestions on this issue?
source share