0
votes

I'm using Ant with Ivy to build a multi module project.

I'm having problems with my ivy.xml file. I have no idea what I have done wrong.

Error message:

my-repository: bad organisation found in /path_to_my_application/ivy.xml:

expected='junit' found='my-org'

my-repository: bad module name found in /path_to_my_application/ivy.xml:

expected='junit found='my-module'

Ivy.xml file:

<ivy-module version="2.0">
    <info organisation="my-org" module="my-module" /> 
    <dependencies>
        <dependency org="junit" name="junit" rev="4.12"/>
    </dependencies>
</ivy-module>

I've trawled the internet with no luck.

Posting under maven too as I've seen this floating around on a few maven forums, but without any success.

2

2 Answers

1
votes

Cannot reproduce your problem. The following project resolves dependencies without error

├── build.xml
└── ivy.xml

build.xml

<project name="demo" default="resolve" xmlns:ivy="antlib:org.apache.ivy.ant">

    <target name="resolve">
        <ivy:resolve/>
    </target>

</project>

ivy.xml

<ivy-module version="2.0">
    <info organisation="my-org" module="my-module" /> 
    <dependencies>
        <dependency org="junit" name="junit" rev="4.12"/>
    </dependencies>
</ivy-module>
0
votes

I got this error today. I have ivy.xml at repository location of dependencies and also referring ivy.xml when calling ivy resolve. For ex:

 <ivy:resolve file="ivy-3rdpartypkgs.xml"/> 

After I removed ivy.xml at repo location, it successfully downloaded dependencies.