ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <>
Subject Re: Configuration substitution in artifact pattern during publication.
Date Tue, 18 Dec 2007 13:32:51 GMT
On Dec 17, 2007 5:54 PM, Oleg Sakharov <> wrote:

> Hello.
> We try to use Ivy in our build process. This is really amazing product,
> but
> unfortunately we have some troubles with it.
> We publish some artifacts under certain configurations.
> For instance, we have a described artifact pattern in our IvySetting.xml:
>    <resolvers>
>        <sftp name="remote">
>            <ivy pattern="sftp://user:password@host
> :port/repository/[module]/[conf]/[module]-[revision]-[branch].xml"/>
>            <artifact pattern="sftp://user:password@host
> :port/repository/[module]/[conf]/[artifact]-[revision]-[branch].[ext]"/>
>        </sftp>
>    </resolvers>
> In our ivy.xml we have one configuration and only one artifact
> publication:
>     <configurations>
>        <conf name="configA" />
>    </configurations>
>    <publications>
>        <artifact name="IvyTest" type="txt" ext="txt" conf="configA" />
>    </publications>
> After publication we expect that a full path name to the artifact in our
> repository will be looks like
> repository/IvyTest/configA/IvyTest-
> However, we get
> repository/IvyTest/default/IvyTest-
> Question: Is it predefined behavior or not? Probably this is our mistake
> or
> misunderstanding of Ivy configuration concept.
> We look through the code and found that RepositoryResolver.publish()
> contains call of getDestination() without any passing of configuration
> parameter. Is it right?

Yes, the problem is that one artifact can be published in several
configurations, so we don't set the configuration token during publication.
If I remember correctly you're not the first to ask for something like this,
but I really don't see how we could handle this use case whle still allowing
one artifact to be published in several confs. What you can still do is use
an extra attribute and use this extra attribute in your pattern. This should
work (and if it doesn't this can be considered as a bug and should be

But why do you want to isolate your artifacts by configuration in your
repository? Maybe there's another way than using configurations for what you
want to achieve?


> Thank you in advance for your help.
> Best regards. Oleg Sakharov.

Xavier Hanin - Independent Java Consultant

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message