ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Coene (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IVY-1213) extends ignores defaultconfmapping/defaultconf/confmappingoverride attributes from parent's configurations and dependencies tags
Date Tue, 06 Mar 2012 22:10:01 GMT

     [ https://issues.apache.org/jira/browse/IVY-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Maarten Coene resolved IVY-1213.
--------------------------------

       Resolution: Fixed
    Fix Version/s: trunk
         Assignee: Maarten Coene

I've committed a fix in SVN trunk that should solve the problem. Thanks for reporting.
                
> extends ignores defaultconfmapping/defaultconf/confmappingoverride attributes from parent's
configurations and dependencies tags
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-1213
>                 URL: https://issues.apache.org/jira/browse/IVY-1213
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.0-RC1
>            Reporter: Kay Röpke
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>
> Using a parent ivy module with a configurations tag such as
> {code:xml}
> <ivy-module version="2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
>     <info
>         organisation="com.foo"
>         module="parent"
>         status="integration" />
>  	
> <configurations defaultconfmapping="compile->compile(*),master(*);runtime->runtime(*);test->runtime(*),master(*)">
>         <conf name="default" visibility="public" description="runtime dependencies
and master artifact can be used with this conf" extends="runtime,master"/>
>         <conf name="master" visibility="public" description="contains only the artifact
published by this module itself, with no transitive dependencies"/>
>         <conf name="compile" visibility="public" description="this is the default
scope, used if none is specified. Compile dependencies are available in all classpaths."/>
>         <conf name="provided" visibility="public" description="this is much like compile,
but indicates you expect the JDK or a container to provide it. It is only available on the
compilation classpath, and is not transitive."/>
>         <conf name="runtime" visibility="public" description="this scope indicates
that the dependency is not required for compilation, but is for execution. It is in the runtime
and test classpaths, but not the compile classpath." extends="compile"/>
>         <conf name="test" visibility="private" description="this scope indicates that
the dependency is not required for normal use of the application, and is only available for
the test compilation and execution phases." extends="runtime"/>
>         <conf name="system" visibility="public" description="this scope is similar
to provided except that you have to provide the JAR which contains it explicitly. The artifact
is always available and is not looked up in a repository."/>
>         <conf name="sources" visibility="public" description="this configuration contains
the source artifact of this module, if any."/>
>         <conf name="javadoc" visibility="public" description="this configuration contains
the javadoc artifact of this module, if any."/>
>         <conf name="optional" visibility="public" description="contains all optional
dependencies"/>
> </configurations>
> 	<publications />
>         <dependencies>
>             <dependency organisation="junit" module="junit" revision="4.8.2" conf="test"
/>
>         </dependencies>
> </ivy-module>
> {code}
> and later referring to that parent with an extends clause
> {code:xml}
> <ivy-module version="2.2"
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
> 	<info
> 	   organisation="com.foo"
> 	   module="module1"
> 	   status="integration">
> 	   <extends organisation="com.mysql.etools" module="etools-base" revision="1.0.0+"
/>
> 	</info>
>     <configurations />
>     <publications><!-- omitted for brevity --></publications>
>     <dependencies>
>         <dependency organisation="com.google.collections" module="google-collections"
revision="1.0" conf="compile" />
>     </dependencies>
> </ivy-module>
> {code}
> leads to the google-collections dependency not being retrieved, because the merged ivy
module descriptor does not inherit the defaultconfmapping from its parent.
> Adding {noformat}defaultconfmapping="compile->compile(*),master(*);runtime->runtime(*);test->runtime(*),master(*)"{noformat}
to the _child_ module's configurations tags makes it work.
> Looking at XmlModuleDescriptorParser seems to support the fact that it does not merge
tag attributes at all.
> Needless to say, this is really hard to find when refactoring modules to use extends.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message