ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Greenwood-Geer <t.greenwoodg...@gmail.com>
Subject Managing an ivy repository and resolving dependencies
Date Fri, 17 Apr 2009 00:01:05 GMT
Hi,
I'm very interested in apache ivy and the benefits it provides. However, 
I'm having some problems...I apologize in advance for the lengthy email. 
Questions are labeled "Q[0-9]:" below:

I've created an ivy repository, but I'm having difficulties as some of 
the dependencies are not resolving. For example, here it looks as though 
I'm attempting to install ant 1.7.1, however, it is failing because 
xercesImpl 2.9.0 is not resolving.

=============================================
Q1: is that a correct assessment of this log?
(more questions below...)
=============================================

[ivy:install] :: installing org.apache.ant#ant;1.7.1 ::
[ivy:install] :: resolving dependencies ::
[ivy:install] 	found org.apache.ant#ant;1.7.1 in chained-resolvers
[ivy:install] 	found org.apache.ant#ant-launcher;1.7.1 in chained-resolvers
[ivy:install] 	found xerces#xercesImpl;2.9.0 in chained-resolvers
[ivy:install] 	found xml-apis#xml-apis;1.3.04 in chained-resolvers
[ivy:install] :: downloading artifacts to cache ::
[ivy:install] downloading 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/xerces/xercesImpl/jars/xercesImpl-2.9.0.jar

...
[ivy:install] .................... (1195kB)
[ivy:install] .. (0kB)
[ivy:install] downloading 
http://repo1.maven.org/maven2/xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar 
...
[ivy:install] ..............................................................
[ivy:install] 
.................................................................................................................................................................................................................................................................................
[ivy:install] 
....................................................................................................................................................................................................................................................................................................................................
[ivy:install] 
...................................................................................................................................................................

(1195kB)
[ivy:install] .. (0kB)
[ivy:install] downloading 
http://repo1.maven.org/maven2/xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar 
...
[ivy:install] 
......................................................................................................................................................................................................................................................
[ivy:install] 
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
[ivy:install] 
................................................................ (1195kB)
[ivy:install] .. (0kB)
[ivy:install] :: installing in local-repository ::
[ivy:install] 	published ant to 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/org.apache.ant/ant/jars/ant-1.7.1.jar
[ivy:install] 	published ivy to 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/org.apache.ant/ant/ivys/ivy-1.7.1.xml
[ivy:install] 	published ant-launcher to 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/org.apache.ant/ant-launcher/jars/ant-launcher-1.7.1.jar
[ivy:install] 	published ivy to 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/org.apache.ant/ant-launcher/ivys/ivy-1.7.1.xml
[ivy:install] 	published ivy to 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/xerces/xercesImpl/ivys/ivy-2.9.0.xml
[ivy:install] 	published xml-apis to 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/xml-apis/xml-apis/jars/xml-apis-1.3.04.jar
[ivy:install] 	published ivy to 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/xml-apis/xml-apis/ivys/ivy-1.3.04.xml
[ivy:install] :: install resolution report ::
[ivy:install] :: resolution report :: resolve 0ms :: artifacts dl 10809ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      default     |   4   |   0   |   0   |   0   ||   4   |   0   |
	---------------------------------------------------------------------
[ivy:install]
[ivy:install] :: problems summary ::
[ivy:install] :::: WARNINGS
[ivy:install] 		[FAILED     ] xerces#xercesImpl;2.9.0!xercesImpl.jar: 
invalid sha1: expected=sha1(xercesimpl-2.9.0.jar)= 
computed=868c0792233fc78d8c9bac29ac79ade988301318 (83ms)
[ivy:install] 		[FAILED     ] xerces#xercesImpl;2.9.0!xercesImpl.jar: 
invalid sha1: expected=sha1(xercesimpl-2.9.0.jar)= 
computed=868c0792233fc78d8c9bac29ac79ade988301318 (5735ms)
[ivy:install] 		[FAILED     ] xerces#xercesImpl;2.9.0!xercesImpl.jar: 
invalid sha1: expected=sha1(xercesimpl-2.9.0.jar)= 
computed=868c0792233fc78d8c9bac29ac79ade988301318 (3959ms)
[ivy:install] 		[FAILED     ] xerces#xercesImpl;2.9.0!xercesImpl.jar:  (0ms)
[ivy:install] 	==== local-repository: tried
[ivy:install] 	 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/xerces/xercesImpl/jars/xercesImpl-2.9.0.jar
[ivy:install] 	==== codehaus-snapshots: tried
[ivy:install] 	 
http://snapshots.repository.codehaus.org/xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar
[ivy:install] 	==== codehaus: tried
[ivy:install] 	 
http://repository.codehaus.org/xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar
[ivy:install] 	==== javanet: tried
[ivy:install] 	 
http://download.java.net/maven/2/xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar
[ivy:install] 	==== libraries: tried
[ivy:install] 	 
http://repo1.maven.org/maven2/xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar
[ivy:install] 	==== mirrors: tried
[ivy:install] 	 
http://mirrors.ibiblio.org/pub/mirrors/maven2/xercesImpl/jars/xercesImpl-2.9.0.jar
[ivy:install] 	==== public: tried
[ivy:install] 	 
http://repo1.maven.org/maven2/xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar
[ivy:install] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install] 		::              FAILED DOWNLOADS            ::
[ivy:install] 		:: ^ see resolution messages for details  ^ ::
[ivy:install] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install] 		:: xerces#xercesImpl;2.9.0!xercesImpl.jar
[ivy:install] 		::::::::::::::::::::::::::::::::::::::::::::::


=============================================
Q2: How do I resolve this dependency problem?
=============================================

The resource is at this url:
http://repo1.maven.org/maven2/xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar

However, the resource does not match the sha1 calculated for it.

=============================================
Q3: What does should a member of the maven/ivy community do, in the case 
of mismatched sha1/md5 values?
=============================================

Where do we report such problems? Presumably, someone either this is an 
administrative mistake, or the file has been compromised. In either 
case, where does it get reported, and who takes care of this?

=============================================
Q4: Assuming that I can simply download the files I need for my local 
repository directly from the web, what steps are necessary in order to 
populate my local repository?
=============================================

For example, is there a publish task that will take a given resource 
(jar) generate the sha1, and then copy it into my repository ? I have 
tried simply copying the files to the directory I suspect they should go 
to, but when I run ivy to resolve dependencies for my repo, they are 
ignored.

=============================================
Q5: What should community members do when they come across other 
mistakes in public repositories, such as seeing an 'O' (as in october) 
where one would expect a '0' (as in zero)?
=============================================

For instance, the xpp3_min module makes this mistake:

<ivy:install organisation="xpp3" module="xpp3_min" revision="1.1.3.4.O"

=============================================
Q6: In other cases, ivy is not using the correct url for the resource. 
Even though I can find the resource on the web, I don't know how to 
change the url that ivy is using to retrieve that resource... how do I 
do this?
=============================================

For instance, I'm attempting to download jett-util 6.1.4. The url for 
this (as found from the mvnrepository.com website) is:

Resource located at:
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/mortbay/jetty/jetty-util/6.1.4/jetty-util-6.1.4-sources.jar

However, the urls that ivy is using are all incorrect:

Attempted:
http://mirrors.ibiblio.org/pub/mirrors/maven2/jetty-util/jars/jetty-util-6.1.4.jar

Log snippet below:

=============================================
Q7: This seems like what the rules are supposed to handle, as described 
in this doc page:

http://ant.apache.org/ivy/history/2.1.0-rc1/tutorial/build-repository/advanced.html
=============================================

However, I've read this page at least 10 times, and I still don't 
understand all that it is saying:

1.<src org="apache" module=".+"/>	    	// what is .+ ?, in other places 
I've seen (.+)...are these different?

2. <dest org="$m0" module="$m0"/>		// what is $m0, $m1, ...?


Could someone explain or give examples for what this section is saying?

"""
To understand namespaces,

     * fromsystem : we define here that the projects defined in the 
system namespace under the organization called "apache" are transformed 
into the destination namespace into projects whose organization is named 
with the module name, whatever the revision is. For example, the project 
apache#commons-lang;1.0 in the system namespace will be translated into 
commons-lang#commons-lang;1.0 in the maven2 resolver namespace.
     * tosystem : we define here the reverse mapping, ie how to 
translate apache projects from maven 2 repo into apache projects in the 
system namespace. The rule used here tells that all projects matching 
commons-.+ (see it as java regular expression) for their organization 
name and module name are transformed into projects whose organisation is 
apache with the module name as it was found. The same kind of rule is 
applied for others apache projects like ant, etc.
"""


Log Snippet:
---------------------------------------------
[ivy:install] :: installing jetty#jetty-util;6.1.4 ::
[ivy:install] :: resolving dependencies ::
[ivy:install] :: downloading artifacts to cache ::
[ivy:install] :: installing in local-repository ::
[ivy:install] :: install resolution report ::
[ivy:install] :: resolution report :: resolve 0ms :: artifacts dl 0ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      default     |   1   |   0   |   0   |   0   ||   0   |   0   |
	---------------------------------------------------------------------
[ivy:install]
[ivy:install] :: problems summary ::
[ivy:install] :::: WARNINGS
[ivy:install] 		module not found: jetty#jetty-util;6.1.4
[ivy:install] 	==== local-repository: tried
[ivy:install] 	 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/jetty/jetty-util/ivys/ivy-6.1.4.xml
[ivy:install] 	  -- artifact jetty#jetty-util;6.1.4!jetty-util.jar:
[ivy:install] 	 
/home/toddg/src/Main/RSI/etc/holmes/main/asi-ivy-repo/repo/asi/jetty/jetty-util/jars/jetty-util-6.1.4.jar
[ivy:install] 	==== codehaus-snapshots: tried
[ivy:install] 	 
http://snapshots.repository.codehaus.org/jetty/jetty-util/6.1.4/jetty-util-6.1.4.pom
[ivy:install] 	  -- artifact jetty#jetty-util;6.1.4!jetty-util.jar:
[ivy:install] 	 
http://snapshots.repository.codehaus.org/jetty/jetty-util/6.1.4/jetty-util-6.1.4.jar
[ivy:install] 	==== codehaus: tried
[ivy:install] 	 
http://repository.codehaus.org/jetty/jetty-util/6.1.4/jetty-util-6.1.4.pom
[ivy:install] 	  -- artifact jetty#jetty-util;6.1.4!jetty-util.jar:
[ivy:install] 	 
http://repository.codehaus.org/jetty/jetty-util/6.1.4/jetty-util-6.1.4.jar
[ivy:install] 	==== javanet: tried
[ivy:install] 	 
http://download.java.net/maven/2/jetty/jetty-util/6.1.4/jetty-util-6.1.4.pom
[ivy:install] 	  -- artifact jetty#jetty-util;6.1.4!jetty-util.jar:
[ivy:install] 	 
http://download.java.net/maven/2/jetty/jetty-util/6.1.4/jetty-util-6.1.4.jar
[ivy:install] 	==== libraries: tried
[ivy:install] 	 
http://repo1.maven.org/maven2/jetty/jetty-util/6.1.4/jetty-util-6.1.4.pom
[ivy:install] 	  -- artifact jetty#jetty-util;6.1.4!jetty-util.jar:
[ivy:install] 	 
http://repo1.maven.org/maven2/jetty/jetty-util/6.1.4/jetty-util-6.1.4.jar
[ivy:install] 	==== mirrors: tried
[ivy:install] 	  -- artifact jetty#jetty-util;6.1.4!jetty-util.jar:
[ivy:install] 	 
http://mirrors.ibiblio.org/pub/mirrors/maven2/jetty-util/jars/jetty-util-6.1.4.jar
[ivy:install] 	==== public: tried
[ivy:install] 	 
http://repo1.maven.org/maven2/jetty/jetty-util/6.1.4/jetty-util-6.1.4.pom
[ivy:install] 	  -- artifact jetty#jetty-util;6.1.4!jetty-util.jar:
[ivy:install] 	 
http://repo1.maven.org/maven2/jetty/jetty-util/6.1.4/jetty-util-6.1.4.jar
[ivy:install] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install] 		::          UNRESOLVED DEPENDENCIES         ::
[ivy:install] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install] 		:: jetty#jetty-util;6.1.4: not found
[ivy:install] 		::::::::::::::::::::::::::::::::::::::::::::::
---------------------------------------------------

Thanks for your time.
-Todd

Mime
View raw message