Friday, May 9, 2014

Ivy: Invalid content was found starting with element 'dependency'. One of '{exclude, override, conflict}' is expected.

Just in case you try to use an exclude with Ivy and get the following message without having any problems with your ivy.xml:

Invalid content was found starting with element 'dependency'. One of '{exclude, override, conflict}' is expected.

Try to move it to the bottom of the file and build again. It's a bug in the spec and should go away just like that.


[ivy:resolve] :: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] [xml parsing: ivy.xml:54:84: cvc-complex-type.2.4.a: Invalid content was found starting with element 'dependency'. One of '{exclude, override, conflict}' is expected. in file:/Users/elomonaco/dev/workspace/platform-services/ivy.xml
BUILD FAILED
/Users/elomonaco/dev/workspace/module-tools/build/install/ant/ivy.xml:88: syntax errors in ivy file: java.text.ParseException: [xml parsing: ivy.xml:54:84: cvc-complex-type.2.4.a: Invalid content was found starting with element 'dependency'. One of '{exclude, override, conflict}' is expected. in file:/Users/elomonaco/dev/workspace/platform-services/ivy.xml
]
view raw gistfile1.txt hosted with ❤ by GitHub

3 comments:

  1. Thank you so much. I encountered the same problem and your solution helped me build.

    ReplyDelete
    Replies
    1. Ivy documentation isn't very complete and requires a bit of empiricism. Good luck

      Delete