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 2009/08/03 09:11:14 UTC

[jira] Resolved: (IVY-1101) ivy.xml: ivy-module dependencies cannot be parsed if there are both dependency and override elements present.

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

Maarten Coene resolved IVY-1101.
--------------------------------

    Resolution: Invalid
      Assignee: Maarten Coene

Hi,

the order of the elements in the ivy file is important: your dependency elements should come before your override elements.
The following should work:

{noformat}
<ivy-module version="2.0">
    <info organisation="org.test" module="b" />
    <configurations>
        <conf name="default"/>
        <conf name="test"/>
    </configurations>
    <publications>
        <artifact name="b" />
    </publications>
    <dependencies>
        <dependency org="junit" name="junit" rev="3.8.2" conf="test->default" />
        <override org="org.test" module="a" rev="1.0.3.0" />
    </dependencies>
</ivy-module>
{noformat}

Maarten

> ivy.xml: ivy-module dependencies cannot be parsed if there are both dependency and override elements present.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-1101
>                 URL: https://issues.apache.org/jira/browse/IVY-1101
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.1.0-RC1
>         Environment: Windows XP, Apache Ant version 1.7.1.
>            Reporter: Andreas R.
>            Assignee: Maarten Coene
>            Priority: Minor
>
> When trying to use the override element (http://ant.apache.org/ivy/history/2.1.0-rc1/ivyfile/override.html)
> with the following ivy.xml:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <ivy-module version="2.0">
> 	<info organisation="org.test" module="b" />
> 	<configurations>
> 		<conf name="default"/>
> 		<conf name="test"/>
> 	</configurations>
> 	<publications>
> 		<artifact name="b" />
> 	</publications>
> 	<dependencies>
> 		<override org="org.test" module="a" rev="1.0.3.0" />
> 		<dependency org="junit" name="junit" rev="3.8.2" conf="test->default" />
> 	</dependencies>
> </ivy-module>
> and the following build.xml:
> <project name="test" xmlns:ivy="antlib:org.apache.ivy.ant">
> 	<target name="resolve">
> 		<ivy:resolve />
> 	</target>
> </project>
> , parsing fails at resolve time with the following error:
> resolve:
> No ivy:settings found for the default reference 'ivy.instance'.  A default instance will be used
> no settings file found, using default...
> [ivy:resolve] :: Ivy 2.1.0-rc1 - 20090319213629 :: http://ant.apache.org/ivy/ ::
> :: loading settings :: url = jar:file:/C:/Program%20Files/apache-ant-1.7.1/lib/ivy-2.1.0-rc1.jar!/org/apache/ivy/core/settings/ivysettings.xml
> [ivy:resolve] [xml parsing: ivy.xml:16:75: cvc-complex-type.2.4.a: Invalid content was found starting with element 'dependency'. One of '{override, conflict}' is expected. in file:/C:/override_not_working_with_dependency/ivy.xml
> [ivy:resolve] ]
> BUILD FAILED
> C:\override_not_working_with_dependency\build.xml:3: syntax errors in ivy file: java.text.ParseException: [xml parsing:
> ivy.xml:16:75: cvc-complex-type.2.4.a: Invalid content was found starting with element 'dependency'. One of '{override,
> conflict}' is expected. in file:/C:/override_not_working_with_dependency/ivy.xml
> ]
> It parses fine if either the override or dependency element is omitted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.