0
votes

Ok, I've been searching for some time and am getting nowhere. I'm fairly new to ivy and and trying to set up a repository that is housed on our internal servers. I have been playing with ivy namespaces as described in the Building a Repository tutorial on the Ivy site.

Tutorial here: http://ant.apache.org/ivy/history/trunk/tutorial/build-repository.html

Source here: https://svn.apache.org/repos/asf/ant/ivy/core/trunk/src/example/build-a-ivy-repository/

Specifically, I'm working with the "maven2-namespace-deps" target defined in the build.xml. The problem lies in an error I'm getting that looks like:

bad organisation found in blah/blah/blah/apache-4.pom: expected='org.apache' found='apache'

This occurs with the tutorial "out of the box". So I tried to simplify things a bit and see where I could get. I altered the rules in advanced-settings to only contain:

<rule>
    <fromsystem>
        <src org="apache" module="ant-.+"/>
        <dest org="org.apache.ant" module="$m0"/>
    </fromsystem>
    <tosystem>
        <src org="org.apache.ant" module="ant-.+"/>
        <dest org="apache" module="$m0"/>
    </tosystem>
</rule>

Then I altered the install line in the build xml to install just ant-junit and dependencies like so:

<ivy:install settingsRef="ivy.settings" organisation="org.apache.ant" module="ant-junit" revision="1.9.4" from="libraries" to="my-repository" transitive="true" />

Lo and behold...a very similar error on a different project:

libraries: bad organisation found in blah/blah/blah/ant-parent/1.9.4/ant-parent-1.9.4.pom: expected='org.apache.ant' found='apache'

Searches on Google and stackoverflow were both fruitless. This may be a red herring, however I noticed that both of the projects that had this issued have:

<packaging>pom</packaging>

in their pom files, rather than "jar" or nothing (jar is the maven default packaging). So, I'm a bit suspicious about that.

Has anyone run into this issue? Suggestions? Thoughts? Random eloquent ramblings?

1

1 Answers

0
votes

Specifically, I'm working with the "maven2-namespace-deps" target defined in the build.xml

If you're trying to store files in a Maven 2 format it would be a lot lot simpler to install a Maven repository manager.

The Maven repository has established itself as the defacto Java repository standard. Other builds tools, Gradle, sbt,etc all understand Maven repositories.

There several fine products to use, all of which are easy to install and setup: