ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: Optional dependencies
Date Tue, 16 Oct 2012 22:02:38 GMT
Yes, the conf attribute should not be a mapping; rather it should just
be the name of one of your local configurations.

Matt

On Tue, Oct 16, 2012 at 4:49 PM, Not Zippy <notzippy@gmail.com> wrote:
> I have set the mapping
>
>     <ivy:makepom ivyfile="${basedir}/ivy.xml"
>                  conf="default"
>                  pomfile="${build.dir}/${artifact.name}.pom">
>      <mapping conf="main->default" scope="compile"/>
>      <mapping conf="main->default" scope="runtime"/>
>     </ivy:makepom>
>
> It still generates the POM with optional dependencies.
>
> thanks
> Nz
>
>
> On Tue, Oct 16, 2012 at 2:20 PM, Matt Benson <gudnabrsam@gmail.com> wrote:
>>
>> You should be able to control this by using <mapping> elements nested
>> into <makepom>.
>>
>> Matt
>>
>> On Tue, Oct 16, 2012 at 4:15 PM, Not Zippy <notzippy@gmail.com> wrote:
>> > Hi
>> >
>> > For some reason I hadn't noticed till now that when I used ant + ivy to
>> > build my POMS that it created all the dependencies as "optional"
>> > ie
>> >     <dependency>
>> >       <groupId>commons-io</groupId>
>> >       <artifactId>commons-io</artifactId>
>> >       <version>2.2</version>
>> >       <optional>true</optional>
>> >     </dependency>
>> >
>> > My ivy.xml looks like
>> > <ivy-module version="1.0">
>> >     <info
>> >         organisation="xxx"
>> >         module="ext-dx"
>> >         status="integration"/>
>> >     <configurations defaultconf="main">
>> >       <conf name="core" visibility="private" />
>> >       <conf name="common" extends="core" />
>> >       <conf name="main" extends="core" />
>> >       <conf name="default" extends="main" />
>> >       <conf name="resource" extends="core" />
>> >       <conf name="hidden" extends="core" />
>> >       <conf name="test" extends="common" />
>> >     </configurations>
>> >     <publications>
>> >       <artifact name="ext-dx" type="jar" conf="main"/>
>> >       <artifact name="ext-dx" type="pom" conf="main"/>
>> >       <artifact name="ext-dx-resource" type="zip" ext="zip"
>> > conf="main"/>
>> >       <artifact name="ext-dx-sources" type="source" ext="jar"
>> > conf="main"/>
>> >     </publications>
>> >     <dependencies>
>> >         <dependency conf="main->default" org="commons-io"
>> > name="commons-io"
>> > rev="2.2"/>
>> > ....
>> >
>> > Make pom is
>> >     <ivy:makepom ivyfile="${basedir}/ivy.xml"
>> >                  conf="default"
>> >                  pomfile="${build.dir}/${artifact.name}.pom">
>> >      <mapping conf="default" scope="compile"/>
>> >      <mapping conf="default" scope="runtime"/>
>> >     </ivy:makepom>
>> >
>> > Anyone have idea why ? Can't see anything about it in the docs...
>> >
>> > THANKS
>> > nZ
>
>

Mime
View raw message