On 4/6/07, Jing Xue <[EMAIL PROTECTED]> wrote:

I have a maven-proxy, http://jabba:9999, running against the real
ibiblio repo, and the ivy ibiblio resolver pointed to the proxy.
With this config:

<ivysettings>
  <property name="ivy.ibiblio.default.artifact.root" value="
http://jabba:9999/repository"; />
  <property name="ivyx.returnFirst" value="true" override="false" />

  <settings defaultResolver="main" checkUpToDate="true" />
  <resolvers>
    <chain name="main" returnFirst="${ivyx.returnFirst}">
      <cache name="cacheResolver" />
      <ibiblio name="ibiblioResolver" m2compatible="true" root="${
ivy.ibiblio.default.artifact.root}" />
     </chain>
  </resolvers>
</ivysettings>

I got this error message:

[ivy:resolve] problem occured while resolving dependency: [ log4j | log4j
| 1.2.+ ] {build=[default]} with cacheResolver:
java.util.EmptyStackException
[ivy:resolve]           tried
http://jabba:9999/repository/log4j/log4j/1.2.+/log4j-1.2.+.pom
[ivy:resolve] CLIENT ERROR: Not Found url=
http://jabba:9999/repository/log4j/log4j/1.2.+/log4j-1.2.+.pom
[ivy:resolve]           tried
http://jabba:9999/repository/log4j/log4j/[revision]/log4j-[revision].pom
[ivy:resolve]           tried
http://jabba:9999/repository/log4j/log4j/1.2.+/log4j-1.2.+.jar
[ivy:resolve] CLIENT ERROR: Not Found url=
http://jabba:9999/repository/log4j/log4j/1.2.+/log4j-1.2.+.jar
[ivy:resolve]           tried
http://jabba:9999/repository/log4j/log4j/[revision]/log4j-[revision].jar
[ivy:resolve]   ibiblioResolver: no ivy file nor artifact found for [
log4j | log4j | 1.2.+ ]

I also tried setting awaysCheckExactRevision="false", and got:

[ivy:resolve] problem occured while resolving dependency: [ log4j | log4j
| 1.2.+ ] {build=[default]} with cacheResolver:
java.util.EmptyStackException
[ivy:resolve]           tried
http://jabba:9999/repository/log4j/log4j/[revision]/log4j-[revision].pom
[ivy:resolve]           tried
http://jabba:9999/repository/log4j/log4j/[revision]/log4j-[revision].jar
[ivy:resolve]   ibiblioResolver: no ivy file nor artifact found for [
log4j | log4j | 1.2.+ ]

Note that this actually happened when I _do_ have log4j 1.2.14 in the
maven proxy repository. So I looked into the code, and looks like the
problem is currently URLResolver has URLRepository hard-coded, which in
turn has the ApacheUrlLister hard-coded, which can (obviously) handle
only the authentic ibiblio directory listing. Is it possible to expose
the url lister in the settings?


The ApacheUrlLister, depsite its name, is able to list urls on a good number
of http server, as long as they have directory listing enabled. In the case
of maven proxy, I guess you can't browse a directory, or the directory
doesn't look like usual http servers directory listing.

So opening the settings to be able to set the URLLister used is a good idea,
but I think that as part of our attempt to make better integration with
maven repository we should also make sure that the ibiblio resolver is
compatible with maven-proxy (I think we should use maven metadata files,
instead of browsing directories as we do).

Could you open an issue for opening the API of URLResolver, and I'll open
one for maven proxy compatibility.

BTW, on a side point unrelated to the topic of this message, please note
that in the above scenario, I also _do_ have the log4j 1.2.14 in my
local ivy cache, yet it went ahead and checked ibiblioResolver...


This is really strange. I haven't tested with a cache resolver (it's not
very often used, since Ivy itself relies on its cache as often as possible
without any specific settings), but it's unit tested in general case, and
I've checked the code and I don't see why if the first resolver returns
something the chain could continue (with returnFirst=true). But if you want
to help us investigate, could you please send a debug log, adn we'll see if
we better understand what's happening.

- Xavier

Thanks.
--
Jing Xue




--
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Reply via email to