ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nascif Abousalh-Neto <>
Subject RE: Question on attributes
Date Thu, 28 Aug 2008 17:57:15 GMT
Hi Xavier,

Thanks for your reply.

Yes, that would be perfect. We already do our own parsing of the resolve reports, this step
was already part of the plan.

I tried using the info attribute yesterday but didn't get very far. Although the documentation
said that if I used namespaces I wouldn't have to set validate to false, the schema validation
did fail the build. I just found out that this was added in beta2 as part of IVY-553, but
unfortunately we are still in beta1. Hopefully we will upgrade soon.

Thanks again,

Nascif Abousalh-Neto
Software Development Manager
Query and Reporting  ▪ Business Intelligence Clients
Tel: + 1 919 531 0123 -

-----Original Message-----
From: Xavier Hanin []
Sent: Thursday, August 28, 2008 12:08 PM
Subject: Re: Question on attributes

On Thu, Aug 28, 2008 at 4:30 AM, Nascif Abousalh-Neto <> wrote:

> Hi,
> I am considering the use of extra attributes to store the result of a
> process that is executed as part of the build, just before we publish the
> new version. I think it would meet our needs and allow us to optimize the
> process of recovering this information (since we will later have to recover
> the module anyway).
> My concern though is this paragraph in the Ivy documentation (from
> Example:
> Here is an ivy file with the attribute 'color' set to blue:
> <ivy-module version="2.0" xmlns:e="">
>        <info organisation="apache"
>               module="foo"
>               e:color="blue"
>               status="integration"
>               revision="1.59"
>        />
> </ivy-module>
> Then you must use the extra attribute when you declare a dependency on foo.
> Those extra attributes
> will indeed be used as identifier for the module like the org the name and
> the revision:
> <dependency org="apache" name="foo" e:color="blue" rev="1.5+" />
> And you can define your repository pattern as:
> ${repository.dir}/[organisation]/[module]/[color]/[revision]/[artifact].[ext]
> It says that I "must use the extra attribute", but what if I don't want to?
> I don't want to change the layout of my repository or change all my ivy.xml
> dependencies, I just want to use an extra attribute as an annotation or a
> tag, that I might (or not) refer to later after resolving the module.
> Would that be possible?

Well, extra attributes on the info tag are considered as identifying
attributes, and as such do not really fit what you want. But if all you need
is adding data, you can put it as a subelement of the info element:
<ivy-module version="2.0" xmlns:e="">
       <info organisation="apache"
              revision="1.59" >
Then you can use xml parsing to get the value of your extra element. Note
that this won't be parsed by Ivy itself, if you want to parse it, you can
create a custom Ivy parser extending the default one.

Does this match your need?


> Thanks,
>  Nascif
> -------------------------------------------------------------------
> Nascif Abousalh-Neto
> Software Development Manager
> Query and Reporting  ▪ Business Intelligence Clients
> Tel: + 1 919 531 0123 -

Xavier Hanin - Independent Java Consultant
View raw message