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 Neil Lott <ne...@yahoo.com> on 2008/02/21 23:22:34 UTC

ivy.xml

Let's say I have multiple modules each with their own ivy.xml

<ivy-module version="2.0">
     <info organisation="${organization.name}" module="$ 
{interface.jar.prefix}"/>

     <configurations>
         <conf name="interface"  description="dependencies for  
interface"/>
         <include file="path/to/included-configurations.xml"/>
     </configurations>

     <publications>
         <artifact name="${interface.jar.prefix}" type="jar"  
conf="interface" ext="jar"/>
     </publications>

     <dependencies>
	    <dependency org="twc" name="mas-core" rev="${mas.version}"  
conf="interface->server"/>
     </dependencies>
</ivy-module>


and I want them all to share an inherited configuration found in a  
file: included-configurations.xml

<configuration>
     <conf name="test"/>
</configuration>

<dependencies>
    <dependency name="testng" rev="5.7" conf="test"/>
</dependencies>

so in the inherited configurations file I'd also like to include a  
dependency that goes along with that configuration.

Is something like this possible?

Thanks,

Neil


Re: ivy.xml

Posted by Gilles Scokart <gs...@gmail.com>.
As I mentioned on the JIRA issue, you can already have something very
close.  You can just put a virtual module listing the common dependencies,
and use this virtual module as a dependency.  You will get all the
dependency by transitivity.

Gilles

2008/2/23, Neil Lott <ne...@yahoo.com>:
>
> Done.
>
> https://issues.apache.org/jira/browse/IVY-742
>
> If I get through my work it's a possibility.  I'm trying to convert
> our whole build system to use ivy and I still have a bunch more
> modules to go.  :)  But its working very well so far.
>
>
> Neil
>
>
> On Feb 23, 2008, at 3:36 AM, Xavier Hanin wrote:
>
> > On Thu, Feb 21, 2008 at 11:22 PM, Neil Lott
> > <ne...@yahoo.com>
> > wrote:
> >
> >> Let's say I have multiple modules each with their own ivy.xml
> >>
> >> <ivy-module version="2.0">
> >>    <info organisation="${organization.name}" module="$
> >> {interface.jar.prefix}"/>
> >>
> >>    <configurations>
> >>        <conf name="interface"  description="dependencies for
> >> interface"/>
> >>        <include file="path/to/included-configurations.xml"/>
> >>    </configurations>
> >>
> >>    <publications>
> >>        <artifact name="${interface.jar.prefix}" type="jar"
> >> conf="interface" ext="jar"/>
> >>    </publications>
> >>
> >>    <dependencies>
> >>           <dependency org="twc" name="mas-core" rev="${mas.version}"
> >> conf="interface->server"/>
> >>    </dependencies>
> >> </ivy-module>
> >>
> >>
> >> and I want them all to share an inherited configuration found in a
> >> file: included-configurations.xml
> >>
> >> <configuration>
> >>    <conf name="test"/>
> >> </configuration>
> >>
> >> <dependencies>
> >>   <dependency name="testng" rev="5.7" conf="test"/>
> >> </dependencies>
> >>
> >> so in the inherited configurations file I'd also like to include a
> >> dependency that goes along with that configuration.
> >>
> >> Is something like this possible?
> >
> > No, this is not possible in Ivy, but you can use text or xml
> > processing
> > tools to recompose your Ivy file before asking Ivy to resolve the
> > dependencies of your module.
> >
> > Alternatively, since what you ask is close to maven 2 parent
> > mechanism, I
> > think it could be a nice addition to Ivy feature set. So feel free
> > to open
> > an issue, and even provide a patch :-)
> >
> > Xavier
> >
> >>
> >>
> >> Thanks,
> >>
> >> Neil
> >>
> >>
> >
> >
> > --
> > Xavier Hanin - Independent Java Consultant
> > http://xhab.blogspot.com/
> > http://ant.apache.org/ivy/
> > http://www.xoocode.org/
>
>
>


-- 
Gilles Scokart

Re: ivy.xml

Posted by Neil Lott <ne...@yahoo.com>.
Done.

https://issues.apache.org/jira/browse/IVY-742

If I get through my work it's a possibility.  I'm trying to convert  
our whole build system to use ivy and I still have a bunch more  
modules to go.  :)  But its working very well so far.

Neil

On Feb 23, 2008, at 3:36 AM, Xavier Hanin wrote:

> On Thu, Feb 21, 2008 at 11:22 PM, Neil Lott  
> <ne...@yahoo.com>
> wrote:
>
>> Let's say I have multiple modules each with their own ivy.xml
>>
>> <ivy-module version="2.0">
>>    <info organisation="${organization.name}" module="$
>> {interface.jar.prefix}"/>
>>
>>    <configurations>
>>        <conf name="interface"  description="dependencies for
>> interface"/>
>>        <include file="path/to/included-configurations.xml"/>
>>    </configurations>
>>
>>    <publications>
>>        <artifact name="${interface.jar.prefix}" type="jar"
>> conf="interface" ext="jar"/>
>>    </publications>
>>
>>    <dependencies>
>>           <dependency org="twc" name="mas-core" rev="${mas.version}"
>> conf="interface->server"/>
>>    </dependencies>
>> </ivy-module>
>>
>>
>> and I want them all to share an inherited configuration found in a
>> file: included-configurations.xml
>>
>> <configuration>
>>    <conf name="test"/>
>> </configuration>
>>
>> <dependencies>
>>   <dependency name="testng" rev="5.7" conf="test"/>
>> </dependencies>
>>
>> so in the inherited configurations file I'd also like to include a
>> dependency that goes along with that configuration.
>>
>> Is something like this possible?
>
> No, this is not possible in Ivy, but you can use text or xml  
> processing
> tools to recompose your Ivy file before asking Ivy to resolve the
> dependencies of your module.
>
> Alternatively, since what you ask is close to maven 2 parent  
> mechanism, I
> think it could be a nice addition to Ivy feature set. So feel free  
> to open
> an issue, and even provide a patch :-)
>
> Xavier
>
>>
>>
>> Thanks,
>>
>> Neil
>>
>>
>
>
> -- 
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/



Re: ivy.xml

Posted by Xavier Hanin <xa...@gmail.com>.
On Thu, Feb 21, 2008 at 11:22 PM, Neil Lott <ne...@yahoo.com>
wrote:

> Let's say I have multiple modules each with their own ivy.xml
>
> <ivy-module version="2.0">
>     <info organisation="${organization.name}" module="$
> {interface.jar.prefix}"/>
>
>     <configurations>
>         <conf name="interface"  description="dependencies for
> interface"/>
>         <include file="path/to/included-configurations.xml"/>
>     </configurations>
>
>     <publications>
>         <artifact name="${interface.jar.prefix}" type="jar"
> conf="interface" ext="jar"/>
>     </publications>
>
>     <dependencies>
>            <dependency org="twc" name="mas-core" rev="${mas.version}"
> conf="interface->server"/>
>     </dependencies>
> </ivy-module>
>
>
> and I want them all to share an inherited configuration found in a
> file: included-configurations.xml
>
> <configuration>
>     <conf name="test"/>
> </configuration>
>
> <dependencies>
>    <dependency name="testng" rev="5.7" conf="test"/>
> </dependencies>
>
> so in the inherited configurations file I'd also like to include a
> dependency that goes along with that configuration.
>
> Is something like this possible?

No, this is not possible in Ivy, but you can use text or xml processing
tools to recompose your Ivy file before asking Ivy to resolve the
dependencies of your module.

Alternatively, since what you ask is close to maven 2 parent mechanism, I
think it could be a nice addition to Ivy feature set. So feel free to open
an issue, and even provide a patch :-)

Xavier

>
>
> Thanks,
>
> Neil
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/