ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Ficker" <m.fic...@googlemail.com>
Subject Re: confmappingoverride does not override
Date Tue, 23 Sep 2008 06:16:44 GMT
Hello Maarten,

> I think the behaviour you see is normal.
> Please see
> http://ant.apache.org/ivy/history/latest-milestone/ivyfile/configurations.html(the example
at the bottom of the page)
> I must admit that the name of the attribute is a bit misleading here.
>

I agree the behaviour I observed is the same as in the example in the
mentioned page.

[...]

> So, when you resolve the "src" configuration, Ivy will get the "src" config
> of jgoodies-binding, and also the "default" config because your src config
> extends the default config.
>

Right.

I think the following could solve your problem (I didn't test it though)
>
> <ivy-module version="1.4">
> <info organisation="me" module="ivy-test"/>
> <configurations
>    confmappingoverride="true"
>     defaultconfmapping="default,src->#">
>     <conf name="default" visibility="public"/>
>    <conf name="src" visibility="private" extends="*"/>
> </configurations>
>
> <dependencies>
>    <dependency org="jgoodies" name="binding" conf="default" rev="2.0.4"/>
> </dependencies>
> </ivy-module>
>


This does still not work.

Moving the mapping from defaultconfmapping  to the dependency declaration
works:

<dependency org="jgoodies" name="binding" conf="default,src->#"
rev="2.0.4"/>

But this means I'd have to write the same for each dependency added. Thats
what I'm trying to avoid. (I want to keep the complicated stuff withing the
configurations block that can be moved to a seperate file with "include").

Let me summarize:

 - confmappingoverride works but its name is misleading
 - I'm in  need of a "overridingconfmappingoverride"
 - The "#" does not work within defaultconfmapping

Martin

>
>
> Maarten
>
>
>
>
> ----- Original Message ----
> From: Martin Ficker <m.ficker@googlemail.com>
> To: ivy-user@ant.apache.org
> Sent: Monday, September 22, 2008 11:58:21 AM
> Subject: Re: confmappingoverride does not override
>
> Hi,
>
> To keep thingh simple I removed the unittest part of the example.
> My ivy file (Using both conmappingoverride="true" and "src->#").
>
> <ivy-module version="1.4">
> <info organisation="me" module="ivy-test"/>
> <configurations
>    confmappingoverride="true"
>    defaultconfmapping="src->#">
>    <conf name="default" visibility="public"/>
>    <conf name="src" visibility="private" extends="*"/>
> </configurations>
>
> <dependencies>
>    <dependency org="jgoodies" name="binding" conf="default" rev="2.0.4"/>
> </dependencies>
> </ivy-module>
>
> The binding ivy file:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <ivy-module version="1.4">
>    <info
>        organisation="jgoodies"
>        module="binding"
>        revision="2.0.4"
>        status="release">
>        <license name="BSD"/>
>        <description homepage="https://binding.dev.java.net/">
>            Bind domain data to Swing components.
>            The JGoodies Binding library connects object properties to Swing
> user interface components. And it helps you represent the state and
> behavior
> of a presentation independently of the GUI components used in the
> interface.
>        </description>
>    </info>
>    <configurations>
>        <conf name="default"/>
>        <conf name="src" description="The ziped source of this project"/>
>        <conf name="example" extends="default"/>
>    </configurations>
>
>    <publications>
>        <artifact conf="default"/>
>        <artifact name="binding-src" type="source" ext="zip" conf="src"/>
>    </publications>
>
>    <dependencies>
>        <dependency org="jgoodies" name="forms" rev="1.2.0"
> conf="example->default"/>
>    </dependencies>
>
> </ivy-module>
>
> My Buildfile (Striped down to the very basic. The problem still remains)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="ivy-test" default="retrieve" basedir="."
> xmlns:ivy="antlib:fr.jayasoft.ivy.ant"
> xmlns:antcontrib="antlib:net.sf.antcontrib">
>
>    <target name="retrieve">
>        <delete dir="lib"/>
>        <ivy:configure/>
>        <ivy:retrieve pattern ="lib/[conf]/[artifact].[ext]"/>
>
>    </target>
> </project>
>
> Expected outcome of  "ant"
> lib
>   default
>       binding.jar
>   src
>      binding-src.jar
>
> actual:
>  lib
>    default
>       binding.jar
>
>   src
>      binding.jar
>      binding-src.jar
>
>
> "#" doesn't work event in this simple ivy.xm (remember I'm using 1.4). So
> this part of the problem has nothing to to with
> default config:
> <configurations>
>    <conf name="default" visibility="public"/>
>    <conf name="src" visibility="private" extends="*"/>
> </configurations>
>
> <dependencies>
>    <dependency org="jgoodies" name="binding" conf="default;src->#"
> rev="2.0.4"/>
> </dependencies>
>
>
>
> Best regards
>
> Martin
>
>
>
> 2008/9/21 Maarten Coene <maarten_coene@yahoo.com>
>
> > It's hard to tell what's going on without knowing the ivy.xml files of
> your
> > binding and easymock module.
> > Could you post them here?
> > Could you also post the part of your build.xml where you do the resolve?
> >
> > Maarten
> >
> >
> >
> >
> > ----- Original Message ----
> > From: Martin Ficker <m.ficker@googlemail.com>
> > To: ivy-user@ant.apache.org
> > Sent: Sunday, September 21, 2008 5:04:11 PM
> > Subject: Re: confmappingoverride does not override
> >
> > Thanks for the reply.
> > src-># without  confmapping results in only binding.jar and easmyock.jar
> > withing the "src" dir.
> > The ivy:report tells me they are required in configuration default
> > repsectivly unittest.
> >
> > Looks like "#" doenst work correct when used in defaultconfigmapping?
> >
> > Martin
> >
> >
> > 2008/9/20 Gilles Scokart <gscokart@gmail.com>
> >
> > > I never tried it myself, but you can maybe try to use a defaultmapping
> > > "src->#"
> > > With this, I'm not even sure you will need confmappingoverride.
> > >
> > > Keep us informed of the result.
> > >
> > >
> > >
> > > 2008/9/19 Martin Ficker <m.ficker@googlemail.com>:
> > > > Hello Everybody,
> > > >
> > > > I would like to have a "src" configuration that retrieves all
> > > dependencies
> > > > in their src configuration, but I can't find
> > > > a solution. I'm usin ivy 1.4.
> > > > Here is what I tried so far:
> > > >
> > > > from ivy.xml:
> > > > <configurations
> > > >    confmappingoverride="true"
> > > >    defaultconfmapping="unittest->default;src->src">
> > > >    <conf name="default" visibility="public"/>
> > > >    <conf name="unittest"  visibility="private"/>
> > > >    <conf name="src" visibility="private" extends="*"/>
> > > > </configurations>
> > > >
> > > > <dependencies>
> > > >    <dependency org="jgoodies" name="binding" conf="default"
> > rev="2.0+"/>
> > > >    <dependency org="easymock" name="easymock" conf="unittest"
> > rev="2.3"/>
> > > > </dependencies>
> > > >
> > > >
> > > > After a resolve my lib dir looks like
> > > >
> > > > default
> > > >    binding.jar
> > > > unittest
> > > >    easymock.jar
> > > > src
> > > >     binding-src.jar
> > > >     binding.jar <----------------I don't want this
> > > >     easymock-src.jar
> > > >     easymock.jar <------------ I don't want this
> > > >
> > > >
> > > > It seems despite it's name and documentation  setting
> > > > conmappingoverride="true" the "src" mappingdoes not
> > > > override but add to the dependency mapping.
> > > >
> > > > Any suggestions are welcome.
> > > >
> > > > Best regards
> > > > Martin
> > > >
> > >
> > >
> > >
> > > --
> > > Gilles Scokart
> > >
> >
> >
> >
> >
> >
>
>
>
>
>

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