ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <>
Subject RE: confusing artifacts retrieving
Date Wed, 19 Mar 2008 13:42:20 GMT
> -----Original Message-----
> From: Pavel Sher [] 
> Sent: Wednesday, March 19, 2008 8:17 AM
> To:
> Subject: confusing artifacts retrieving
> Hello,
> Is it possible to setup Ivy to not create the full artifact 
> directories structure during retrieve process? For example, I 
> have the following ivy.xml in the repository:
> <ivy-module version="1.4">
>   <info organisation="xxx" module="yyy" revision="1.1"/>
>   <publications>
>     <artifact name="file1" type="txt" ext="txt"/>
>     <artifact name="dir1/file2" type="txt" ext="txt"/>
>     <artifact name="dir1/dir2/file3" type="txt" ext="txt"/>
>   </publications>
> </ivy-module>
> Suppose I want to retrieve all *.txt files and put then into 
> the "dest"
> directory without subfolders. I tried the following ivy.xml 
> on the client side: 
> <ivy-module version="1.3" 
> xmlns:xsi=""
> xsi:noNamespaceSchemaLocation="
> /schemas/ivy.xsd">
>   <info organisation="xxx" module="yyy"/>
>   <dependencies>
>     <dependency org="xxx" name="yyy" rev="1.1">
>       <include name="*.txt" ext="txt" matcher="glob"/>
>     </dependency>
>   </dependencies>
> </ivy-module>
> I used Ant retrieve task and as destination pattern I used:
> dest/[artifact].[ext]
> But in this case retrieve task creates the following structure:
> dest/file1.txt
> dest/dir1/file2.txt
> dest/dir1/dir2/file3.txt
> while I hoped to get this:
> dest/file1.txt
> dest/file2.txt
> dest/file3.txt

This is just my opinion... I think your ivy file is structured in a way
that defeats the purpose of Ivy.  The ivy.xml file should only contain
abstract descriptions of the artifact, not concrete references to how
the storage is implemented.  For example, it would be difficult to
convert this to a relational database or some other storage

If you insist on having this directory structure in your repository,
then you probably want to split this ivy file into 3 components, and use
the organisation attributes appropriately, like:  organisation="file1",
organisation="file1.file2.file3" in each ivy file respectively.  

If you can be flexible on the directory structure, you can still achieve
some segregation by using Ivy configurations appropriately.   I find
configurations useful in situations where there is an unusual layout and
no flexibility to change it.

I do think Ivy could be somewhat improved in how the organisation is
parsed during retrieve.  I notice that when doing a retrieve, an
organisation with dotted notation does not get mapped into directories.
For example, given an artifact mine.jar in organisation, I'd like to see the retrieval of
'[organisation]/[artifact].[ext]' create a local directory structure
org/brown/software/mine.jar.   This happens when you publish to a maven
compatible repository, but it doesn't seem to happen when you retrieve
(unless I missed something somewhere).   Xavier, is this reasonable
behavior to request, or did I miss the documentation somewhere?

This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the 
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on 
the contents of this message is prohibited. In such
case please notify us and destroy and delete all 
copies of this transmission.  Thank you.

View raw message