ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Bailliez (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IVY-1356) ivy descriptors are merged incorrectly
Date Mon, 04 Jun 2012 18:44:23 GMT
Stephane Bailliez created IVY-1356:
--------------------------------------

             Summary: ivy descriptors are merged incorrectly
                 Key: IVY-1356
                 URL: https://issues.apache.org/jira/browse/IVY-1356
             Project: Ivy
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.2.0
            Reporter: Stephane Bailliez


I'm making use of parent definition in ivy files to define general dependencies and configuration
across projects.

Parent file is typically something like:

{code}

<ivy-module version="2.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
            xmlns:m="http://ant.apache.org/ivy/maven">    
    <info organisation="com.mycompany" module="parent" revision="1.0" status="release"
publication="20120101020304">
    </info>
    
    <configurations>
        <conf name="default" description="Default dependencies"/>
        <conf name="runtime" description="Only runtime" extends="default" visibility="private"/>
        <conf name="test" description="Only for unit testing" extends="compile,runtime"
visibility="private"/>
        <conf name="compile" description="Only for compilation" extends="default" visibility="private"/>
        <conf name="sources" description="Sources"/>
        <conf name="javadoc" description="Javadoc"/>
    </configurations>
    
    <dependencies>
        <dependency org="org.testng" name="testng" rev="6.4" conf="test->default"/>
    </dependencies>

</ivy-module>
{code}

Ivy file for the project is typically:


{code}
<ivy-module version="2.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
            xmlns:m="http://ant.apache.org/ivy/maven">
    <info organisation="com.mycompany.service" module="${project.name}">
        <extends organisation="com.mycompany" module="parent" revision="${ivy.parent.revision}"
location="${ivy.parent.location}"/>
        
    </info>

    <publications>
        <artifact name="${project.name}" type="jar" ext="jar" conf="default"/>
        <artifact name="${project.name}" type="source" ext="jar" conf="sources" m:classifier="sources"/>
        <artifact name="${project.name}" type="javadoc" ext="jar" conf="javadoc" m:classifier="javadoc"/>
    </publications>
    <dependencies>
        <dependency org="org.jackson" name="jackson" rev="1.9.5" conf="compile->default"/>
        <exclude org="javax.servlet" module="servlet-api"/>
        <exclude org="javax.servlet" module="servlet"/>
    </dependencies>
</ivy-module>

{code}

The result end up being a merge which is incompatible with the schema since dependency and
exclude end up being mixed when the file is delivered:

{code}
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
xmlns:m="http://ant.apache.org/ivy/maven">
    <info organisation="com.mycompany.service" module="myproject" revision="1.2.8.20120604181037"
status="development" publication="20120604141056">
        <!-- <extends organisation="com.mycompany" module="parent" revision="1.0.0"
location="/somewhere/ivy-parent.xml"/> -->

    </info>
    <configurations>
    
        <!-- configurations inherited from com.giltgroupe#parent;1.0.0 -->
        <conf name="default" visibility="public" description="Default dependencies"/>
        <conf name="runtime" visibility="private" description="Only runtime" extends="default"/>
        <conf name="test" visibility="private" description="Only for unit testing" extends="compile,runtime"/>
        <conf name="compile" visibility="private" description="Only for compilation" extends="default"/>
        <conf name="sources" visibility="public" description="Sources"/>
        <conf name="javadoc" visibility="public" description="Javadoc"/>
    </configurations>
    <publications>
        <artifact name="myproject" type="jar" ext="jar" conf="default"/>
        <artifact name="myproject" type="source" ext="jar" conf="sources" m:classifier="sources"/>
        <artifact name="myproject" type="javadoc" ext="jar" conf="javadoc" m:classifier="javadoc"/>
    </publications>
    <dependencies>
        
        
        <dependency org="org.codehaus" name="jackson" rev="1.9.5" conf="default"/>

        <exclude org="javax.servlet" module="servlet-api"/>
        <exclude org="javax.servlet" module="servlet"/>
    
        <!-- dependencies inherited from com.giltgroupe#parent;1.0.0 -->
        <dependency org="org.testng" name="testng" rev="6.4" conf="test->default"/>
conf="default->api;newrelic->default"/>
    </dependencies>
</ivy-module>

{code}


--
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