You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Nick Cross <iv...@goots.org> on 2012/05/16 12:21:02 UTC
Inline Retrieve Task
Hi,
I have been experimenting with Ivy/Ant and have a question about the
retrieve task.
While specifying in my build.xml
<ivy:resolve transitive="false"/>
and having an ivy.xml containing e.g.
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" >
<info organisation="org.myorganisation" module="foo-5.3.0.ER2"/>
<dependencies>
<dependency org="org.myorganisation" name="foo" rev="5.3.0.ER2">
<artifact name="foo" ext="zip"/>
</dependency>
</dependencies>
</ivy-module>
However, what I really would like to do is in the build.xml have
<ivy:retrieve keep="true" inline="true"
organisation="org.myorganisation" module="foo" revision="5.3.0.ER2"
type="zip"/>
However, I cannot get it to recognise the zip extension it keeps
attempting to download foo-version.jar.
I have tried variations of patterns in my ivysettings but that seems to
have no effect. Currently it has:
<resolvers>
<chain name="default" returnFirst="true">
<url name="SOA-BRMS-5.2" m2compatible="true">
<ivy
pattern="http://download.myrepo.com/mypath/maven/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
Does anyone know how to get inline working with a zip extension?
Thanks!
Nick
Re: Inline Retrieve Task
Posted by Nick Cross <ni...@goots.org>.
I realise its the metadata much akin to the maven repository cache - I
guess I am wondering why it is not downloading into e.g. a jars
directory. Its a rather strange name to use.
Thanks
Nick
On 16/05/12 15:37, Nicolas Lalevée wrote:
> These files contains metadata which helps Ivy for later resolve. For
> instance it can try to avoid a network connection thanks to that
> metadata.
>
> Nicolas
>
> Le 16 mai 2012 à 16:32, Nick Cross a écrit :
>
>>
>> Thanks very much for the reply - that fixes it!
>>
>> One further question - looking at the ivy cache it appears to
>> have:
>>
>> ls -l foo/ -rw-rw-r--. 1 rnc rnc 6341 May 1 22:00
>> ivy-5.3.0.ER2.xml -rw-rw-r--. 1 rnc rnc 719 May 16 15:20
>> ivydata-5.3.0.ER2.properties drwxrwxr-x. 2 rnc rnc 4096 May 16
>> 15:28 *s/
>>
>> Why are the artifacts being downloaded into the *s folder? What
>> controls this?
>>
>> Thanks!
>>
>> Nick
>>
>>
>>
>> On 16/05/12 11:52, Nicolas Lalevée wrote:
>>> If you happen to use Ivy 2.3, you could try:
>>>
>>> <ivy:retrieve> <dependency org="org.myorganisation" name="foo"
>>> rev="5.3.0.ER2"> <artifact name="foo" ext="zip"/> </dependency>
>>> </ivy:resolve>
>>>
>>> See "Child elements" in
>>> http://ant.apache.org/ivy/history/latest-milestone/use/postresolvetask.html
>>>
>>>
>>>
Nicolas
>>>
>>> Le 16 mai 2012 à 12:21, Nick Cross a écrit :
>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I have been experimenting with Ivy/Ant and have a question
>>>> about the retrieve task.
>>>>
>>>>
>>>> While specifying in my build.xml
>>>>
>>>> <ivy:resolve transitive="false"/>
>>>>
>>>> and having an ivy.xml containing e.g.
>>>>
>>>> <ivy-module version="2.0"
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
>>>>
>>>>
<info organisation="org.myorganisation" module="foo-5.3.0.ER2"/>
>>>> <dependencies> <dependency org="org.myorganisation" name="foo"
>>>> rev="5.3.0.ER2"> <artifact name="foo" ext="zip"/>
>>>> </dependency> </dependencies> </ivy-module>
>>>>
>>>>
>>>> However, what I really would like to do is in the build.xml
>>>> have
>>>>
>>>> <ivy:retrieve keep="true" inline="true"
>>>> organisation="org.myorganisation" module="foo"
>>>> revision="5.3.0.ER2" type="zip"/>
>>>>
>>>> However, I cannot get it to recognise the zip extension it
>>>> keeps attempting to download foo-version.jar.
>>>>
>>>> I have tried variations of patterns in my ivysettings but that
>>>> seems to have no effect. Currently it has:
>>>>
>>>> <resolvers> <chain name="default" returnFirst="true"> <url
>>>> name="SOA-BRMS-5.2" m2compatible="true"> <ivy
>>>> pattern="http://download.myrepo.com/mypath/maven/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
>>>> />
>>>>
>>>>
>>>>
>>>> Does anyone know how to get inline working with a zip
>>>> extension?
>>>>
>>>> Thanks!
>>>>
>>>> Nick
>>>
>>
>
Re: Inline Retrieve Task
Posted by Nicolas Lalevée <ni...@hibnet.org>.
These files contains metadata which helps Ivy for later resolve. For instance it can try to avoid a network connection thanks to that metadata.
Nicolas
Le 16 mai 2012 à 16:32, Nick Cross a écrit :
>
> Thanks very much for the reply - that fixes it!
>
> One further question - looking at the ivy cache it appears to have:
>
> ls -l
> foo/
> -rw-rw-r--. 1 rnc rnc 6341 May 1 22:00 ivy-5.3.0.ER2.xml
> -rw-rw-r--. 1 rnc rnc 719 May 16 15:20 ivydata-5.3.0.ER2.properties
> drwxrwxr-x. 2 rnc rnc 4096 May 16 15:28 *s/
>
> Why are the artifacts being downloaded into the *s folder? What controls this?
>
> Thanks!
>
> Nick
>
>
>
> On 16/05/12 11:52, Nicolas Lalevée wrote:
>> If you happen to use Ivy 2.3, you could try:
>>
>> <ivy:retrieve>
>> <dependency org="org.myorganisation" name="foo" rev="5.3.0.ER2">
>> <artifact name="foo" ext="zip"/>
>> </dependency>
>> </ivy:resolve>
>>
>> See "Child elements" in http://ant.apache.org/ivy/history/latest-milestone/use/postresolvetask.html
>>
>> Nicolas
>>
>> Le 16 mai 2012 à 12:21, Nick Cross a écrit :
>>
>>>
>>>
>>> Hi,
>>>
>>> I have been experimenting with Ivy/Ant and have a question about the retrieve task.
>>>
>>>
>>> While specifying in my build.xml
>>>
>>> <ivy:resolve transitive="false"/>
>>>
>>> and having an ivy.xml containing e.g.
>>>
>>> <ivy-module version="2.0"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
>>> <info organisation="org.myorganisation" module="foo-5.3.0.ER2"/>
>>> <dependencies>
>>> <dependency org="org.myorganisation" name="foo" rev="5.3.0.ER2">
>>> <artifact name="foo" ext="zip"/>
>>> </dependency>
>>> </dependencies>
>>> </ivy-module>
>>>
>>>
>>> However, what I really would like to do is in the build.xml have
>>>
>>> <ivy:retrieve keep="true" inline="true" organisation="org.myorganisation" module="foo" revision="5.3.0.ER2" type="zip"/>
>>>
>>> However, I cannot get it to recognise the zip extension it keeps attempting to download foo-version.jar.
>>>
>>> I have tried variations of patterns in my ivysettings but that seems to have no effect. Currently it has:
>>>
>>> <resolvers>
>>> <chain name="default" returnFirst="true">
>>> <url name="SOA-BRMS-5.2" m2compatible="true">
>>> <ivy pattern="http://download.myrepo.com/mypath/maven/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
>>>
>>>
>>>
>>> Does anyone know how to get inline working with a zip extension?
>>>
>>> Thanks!
>>>
>>> Nick
>>
>
Re: Inline Retrieve Task
Posted by Nick Cross <iv...@goots.org>.
Thanks very much for the reply - that fixes it!
One further question - looking at the ivy cache it appears to have:
ls -l
foo/
-rw-rw-r--. 1 rnc rnc 6341 May 1 22:00 ivy-5.3.0.ER2.xml
-rw-rw-r--. 1 rnc rnc 719 May 16 15:20 ivydata-5.3.0.ER2.properties
drwxrwxr-x. 2 rnc rnc 4096 May 16 15:28 *s/
Why are the artifacts being downloaded into the *s folder? What controls
this?
Thanks!
Nick
On 16/05/12 11:52, Nicolas Lalevée wrote:
> If you happen to use Ivy 2.3, you could try:
>
> <ivy:retrieve>
> <dependency org="org.myorganisation" name="foo" rev="5.3.0.ER2">
> <artifact name="foo" ext="zip"/>
> </dependency>
> </ivy:resolve>
>
> See "Child elements" in http://ant.apache.org/ivy/history/latest-milestone/use/postresolvetask.html
>
> Nicolas
>
> Le 16 mai 2012 à 12:21, Nick Cross a écrit :
>
>>
>>
>> Hi,
>>
>> I have been experimenting with Ivy/Ant and have a question about the retrieve task.
>>
>>
>> While specifying in my build.xml
>>
>> <ivy:resolve transitive="false"/>
>>
>> and having an ivy.xml containing e.g.
>>
>> <ivy-module version="2.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
>> <info organisation="org.myorganisation" module="foo-5.3.0.ER2"/>
>> <dependencies>
>> <dependency org="org.myorganisation" name="foo" rev="5.3.0.ER2">
>> <artifact name="foo" ext="zip"/>
>> </dependency>
>> </dependencies>
>> </ivy-module>
>>
>>
>> However, what I really would like to do is in the build.xml have
>>
>> <ivy:retrieve keep="true" inline="true" organisation="org.myorganisation" module="foo" revision="5.3.0.ER2" type="zip"/>
>>
>> However, I cannot get it to recognise the zip extension it keeps attempting to download foo-version.jar.
>>
>> I have tried variations of patterns in my ivysettings but that seems to have no effect. Currently it has:
>>
>> <resolvers>
>> <chain name="default" returnFirst="true">
>> <url name="SOA-BRMS-5.2" m2compatible="true">
>> <ivy pattern="http://download.myrepo.com/mypath/maven/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
>>
>>
>>
>> Does anyone know how to get inline working with a zip extension?
>>
>> Thanks!
>>
>> Nick
>
Re: Inline Retrieve Task
Posted by Nicolas Lalevée <ni...@hibnet.org>.
If you happen to use Ivy 2.3, you could try:
<ivy:retrieve>
<dependency org="org.myorganisation" name="foo" rev="5.3.0.ER2">
<artifact name="foo" ext="zip"/>
</dependency>
</ivy:resolve>
See "Child elements" in http://ant.apache.org/ivy/history/latest-milestone/use/postresolvetask.html
Nicolas
Le 16 mai 2012 à 12:21, Nick Cross a écrit :
>
>
> Hi,
>
> I have been experimenting with Ivy/Ant and have a question about the retrieve task.
>
>
> While specifying in my build.xml
>
> <ivy:resolve transitive="false"/>
>
> and having an ivy.xml containing e.g.
>
> <ivy-module version="2.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" >
> <info organisation="org.myorganisation" module="foo-5.3.0.ER2"/>
> <dependencies>
> <dependency org="org.myorganisation" name="foo" rev="5.3.0.ER2">
> <artifact name="foo" ext="zip"/>
> </dependency>
> </dependencies>
> </ivy-module>
>
>
> However, what I really would like to do is in the build.xml have
>
> <ivy:retrieve keep="true" inline="true" organisation="org.myorganisation" module="foo" revision="5.3.0.ER2" type="zip"/>
>
> However, I cannot get it to recognise the zip extension it keeps attempting to download foo-version.jar.
>
> I have tried variations of patterns in my ivysettings but that seems to have no effect. Currently it has:
>
> <resolvers>
> <chain name="default" returnFirst="true">
> <url name="SOA-BRMS-5.2" m2compatible="true">
> <ivy pattern="http://download.myrepo.com/mypath/maven/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
>
>
>
> Does anyone know how to get inline working with a zip extension?
>
> Thanks!
>
> Nick