ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Gill" <llign...@gmail.com>
Subject Re: ivy module name as an ivy property?
Date Wed, 24 Jan 2007 14:55:14 GMT
What I have done is to create an ivy-template.xml file which has lots of ant
properties in it. Then I have a little bit of ANT code that reads in the
ivy-template.xml file into an ant property, but using an expandproperties
filterchain (which will replace all ant properties which their value). Then
all you have to do is write the property you read the file into out to
another file called ivy.xml.

Something like this...
<property name="ivy.module.name" value="StevesModule"/>

<loadfile property="ivy-template-file" srcFile="ivy-template.xml">
   <filterchain>
      <expandproperties/>
   </filterchain>
</loadfile>
<echo file="ivy.xml">${ivy-template-file}</echo>

Now assuming that you have ${ivy.module.name} referenced in your
ivy-template.xml file, after running that little bit of ant code, all
references to ${ivy.module.name} (and any other ant properties you have in
the file) will be replaced with the value of those properties.

Is this a suitable solution to your problem?

On 1/24/07, Xavier Hanin <xavier.hanin@gmail.com> wrote:
>
> On 1/24/07, Steve Loughran <stevel@apache.org> wrote:
> >
> >
> > Does the ivy module name get turned into an ivy property?
> >
> > I want an artifact with the name ${ivy.module.name}-javadocs ext="zip",
> > and dont want to hard code the module name in unless I have to...
>
>
> If I understand correctly you want in the ivy file when you declare the
> artifact to declare it with a name which reference the name of the module.
> I'm afraid this is not possible, but you can add a JIRA issue, it would be
> an interesting feature pretty easy to implement.
>
> Xavier
>
>


-- 
Regards,
John Gill

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