You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Maarten Coene (JIRA)" <ji...@apache.org> on 2012/08/24 00:34:42 UTC
[jira] [Resolved] (IVY-1356) ivy descriptors are merged incorrectly
[ https://issues.apache.org/jira/browse/IVY-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maarten Coene resolved IVY-1356.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.3.0
Assignee: Maarten Coene
Will be fixed in next release.
Thanks for reporting.
> 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
> Assignee: Maarten Coene
> Labels: testcase
> Fix For: 2.3.0
>
>
> 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="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.mycompany#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.mycompany#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