Suzan Cioc
Suzan Cioc

Reputation: 30147

How to configure download.java.net repository for use with Ivy?

I am not familiar with Ivy. I think this is some utility to automatically download jars from repositories, like maven.

I have downloaded one project (red5 from with svn checkout http://red5.googlecode.com/svn/java/server/trunk/ command) which is configured with Ivy. The question is not about red5, but about Ivy.

After I have downloaded this project with Eclipse' SVN plugin, I selected it with right click and did Ivy-Resolve command (with IvyDE eclipse plugin). After that I found that a lot of jar appeared under ivy.xml[*] node in package explorer.

I guess these libraries are ones Ivy downloaded.

But resulting source code has an errors indicating that one jar is of old version. This is jaudiotagger-1.0.8.jar. It's package org.jaudiotagger.tag does not contain FieldKey class which is required by the source.

Next I look into 'ivy.xml` and see there

<dependency name="jaudiotagger" rev="2.0.4-SNAPSHOT" />

Doesn't this mean configuration requires 2.0.4 version of jar. Then why did Ivy downloaded version 1.0.8 of it?

How to check if repositories do contain required file? Maven central repository contains version 2.0.3 which is not 2.0.4, but nevertheless newer than 1.0.8. Should Ivy browse it?

EDIT 1

I found pom file for 2.0.4 version is here: http://download.java.net/maven/2/org/jaudiotagger/2.0.4-SNAPSHOT/jaudiotagger-2.0.4-SNAPSHOT.pom

I guess I can take the jar itself from the same directory.

But can I configure this place as a repository for Ivy instead? Is this place a Maven compatible repository or not?

Upvotes: 1

Views: 1073

Answers (1)

oers
oers

Reputation: 18714

There is an ivysettings.xml file in the root folder of the project. It contains all repositories, that are used by the build script.

You can easily add java.net as an extra repository like this:

<ibiblio name="java.net" m2compatible="true" root="http://download.java.net/maven/2/"/>

Reference:

jaudiotagger resolve

I tried to reproduce your error, but for me 2.0.4-Snapshot was found in the google code repo:

 trying http://red5.googlecode.com/svn/repository/jaudiotagger-2.0.4-SNAPSHOT.jar
    tried http://red5.googlecode.com/svn/repository/jaudiotagger-2.0.4-SNAPSHOT.jar
googlecode: no ivy file found for red5#jaudiotagger;2.0.4-SNAPSHOT: using default data
checking red5#jaudiotagger;2.0.4-SNAPSHOT[default] from googlecode against [none]
module revision kept as first found: red5#jaudiotagger;2.0.4-SNAPSHOT[default] from googlecode
found red5#jaudiotagger;2.0.4-SNAPSHOT in googlecode

Upvotes: 1

Related Questions