ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gintautas Grigelionis <>
Subject Ivy "extends" loses defaultconfmapping
Date Thu, 09 Apr 2015 08:58:20 GMT
I tried to use extends tag to avoid boilerplate configurations like this

<ivy-module ...>
  <info organisation="a" module="b">
     <extends organisation="c" module="d" revision="1"



The ivy.xml containing configurations is

<ivy-module ...>
    <info organisation="c" module="d" revision="1" status="integration"
    <configurations defaultconfmapping="*->@">
        <conf name="provided" transitive="true" description="Required for
compilation, but provided by the container or JRE at runtime."/>
        <conf name="compile" transitive="true" description="Required for
        <conf name="runtime" transitive="true" extends="compile" description
="Required at runtime"/>
        <conf name="test" transitive="true" extends="runtime"
for test only"/>
        <artifact name="d" type="pom" ext="pom" conf="compile"/>

I generate corresponding pom and publish it with ivy.xml so that I can run
publish as usual and have something to resolve for.

The resulting ivy.xml that is published looks like this

<ivy-module ...>
    <info organisation="a" module="b" revision="..." status="integration"
        <!-- <extends organisation="c" module="d" revision="1"
extendType="configurations"/> -->

        <!-- configurations inherited from c#d;1 -->
        <conf name="provided" visibility="public" description="Required to
compile application, but provided by the container or JRE at runtime."/>
        <conf name="compile" visibility="public" description="Required to
compile application"/>
        <conf name="runtime" visibility="public" description="Required at
runtime" extends="compile"/>
        <conf name="test" visibility="public" description="Required for
test only" extends="runtime"/>

...     </publications>

    <dependencies>        ...
Please note the missing defaultconfmapping, which lets Ivy to revert to
default defaultconfmapping ("*->*") which has the effect of putting all
configurations together with all other configurations, making
configurations useless in resolve.
Is this a bug or am I missing something?

I noticed other effects of "extends" that are undocumented, like looking
for a "parent" ivy.xml on resolve in ".." (undocumented default value for
location attribute + location having preference over resolvers even when
not specified explicitly?) and treating the repository name where the
resolved ivy.xml used for extending was found as a resolver reference name
on retrieve and complaining that that name was not defined in Ivy settings.

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