On 3/6/07, Steve Loughran <[EMAIL PROTECTED]> wrote:
Xavier Hanin wrote:
> On 3/5/07, Matt Benson <[EMAIL PROTECTED]> wrote:
>>
> Yes, I agree this is a nice thing, but it's not easy to convert an Ivy
> fille
> to a pom. What do you do with configurations and their mapping.
Everything
> will be lost in the pom. Maybe a first solution would be to consider
> that if
> the Ivy file has configurations with the same names as m2 scopes then
you
> consider dependencies in these confs to be in the corresponding scope,
and
> for the rest put them as optional dependencies. In this case it's pretty
> easy and could be part of Ivy as a member of the "maven 2 compatibility"
> feature.
>
I think maybe we'd want to let people explicitly declare what the
non-optional and optional ivy confs were for every m2 configuration:
<ivy:makepom file="build/m2.pom">
<m2conf name="compile" conf="build,java5" />
<m2conf name="optional" conf="java6,java4-scripting" />
</ivy:makepom>
Good idea. I would only name them m2scope instead of m2conf, since conf is
already used too much in Ivy :-)
We'd need to collaborate with the maven people here. One funny is that
maven has a different eviction policy from Ivy (closest declaration to
the root of the graph wins; conflict at the same depth is an error). We
may want to avoid transitive dependency mismatch by explicitly listing
the complete resolved graph in the POM, as resolved by Ivy rather than
Maven. That way, recipients get what we declared, with the right to
override it by declaring stuff closer, in their own POMs. Maybe that
would be a switch
<ivy:makepom file="build/m2.pom" resolve="true">
<m2conf name="compile" conf="build,java5" />
<m2conf name="optional" conf="java6,java4-scripting" />
</ivy:makepom>
Good idea too. Could you create an issue for this feature?
- Xavier