Dynamic revisions question

View: New views
4 Messages — Rating Filter:   Alert me  

Dynamic revisions question

by James Christie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm having some difficulty getting dynamic revisions working in
v2.0.0-beta2.  Everything works fine as long as I specify a complete
revision number, for example: <dependency org="commons-logging"
name="commons-logging" rev="1.0.4" transitive="false"/>.  However, if I
attempt to specify a dynamic revision, it won't work.  

For example, this:
  <dependency org="commons-logging" name="commons-logging" rev="1.0.+"
transitive="false"/>

Results in this message:
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]          module not found:
commons-logging#commons-logging;1.0.+
[ivy:retrieve]  ==== artifactory: tried
[ivy:retrieve]    -- artifact
commons-logging#commons-logging;1.0.+!commons-logging.jar:
[ivy:retrieve]
http://reposvr:8081/artifactory/repo/commons-logging/commons-logging/1.0
.+/commons-logging-1.0.+.jar
[ivy:retrieve]
http://reposvr:8081/artifactory/repo/commons-logging/commons-logging/[re
vision]/commons-logging-[revision].jar
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          :: commons-logging#commons-logging;1.0.+: not
found
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::

My ivysettings.xml looks like this (we specify an enterprise repository
running on Artifactory and ibiblio as a fallback).

<ivysettings>
  <settings defaultResolver="chained"/>
    <resolvers>
      <chain name="chained">
        <url name="artifactory">
          <artifact
       
pattern="http://reposvr:8081/artifactory/repo/[organisation]/[module]/[r
evision]/[artifact]-[revision].[ext]" />
        </url>
        <ibiblio name="ibiblio" />
      </chain>
  </resolvers>
</ivysettings>

I have tried several work-arounds including using version range syntax,
'latest.integration' and replacing the url resolver with an ibiblio
resolver with its root and pattern attributes set to the specifics for
our enterprise repository, but to no avail.  Again, if I specify a
complete version number, it works fine, so I know that Ivy is set up
correctly.  Any advice on what I'm doing wrong would be greatly
appreciated.  Thanks in advance.

Jim





Parent Message unknown Re: Dynamic revisions question

by Maarten Coene :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Could you try adding an ivy-pattern to your artifactory resolver?
It could be that Ivy is having troubles resolving dynamic revisions if there is no ivy-pattern defined.

Maarten



----- Original Message ----
From: Jim Christie <Jim.Christie@...>
To: ivy-user@...
Sent: Friday, July 18, 2008 11:10:22 PM
Subject: Dynamic revisions  question

I'm having some difficulty getting dynamic revisions working in
v2.0.0-beta2.  Everything works fine as long as I specify a complete
revision number, for example: <dependency org="commons-logging"
name="commons-logging" rev="1.0.4" transitive="false"/>.  However, if I
attempt to specify a dynamic revision, it won't work.  

For example, this:
  <dependency org="commons-logging" name="commons-logging" rev="1.0.+"
transitive="false"/>

Results in this message:
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]          module not found:
commons-logging#commons-logging;1.0.+
[ivy:retrieve]  ==== artifactory: tried
[ivy:retrieve]    -- artifact
commons-logging#commons-logging;1.0.+!commons-logging.jar:
[ivy:retrieve]
http://reposvr:8081/artifactory/repo/commons-logging/commons-logging/1.0
.+/commons-logging-1.0.+.jar
[ivy:retrieve]
http://reposvr:8081/artifactory/repo/commons-logging/commons-logging/[re
vision]/commons-logging-[revision].jar
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          :: commons-logging#commons-logging;1.0.+: not
found
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::

My ivysettings.xml looks like this (we specify an enterprise repository
running on Artifactory and ibiblio as a fallback).

<ivysettings>
  <settings defaultResolver="chained"/>
    <resolvers>
      <chain name="chained">
        <url name="artifactory">
          <artifact
   
pattern="http://reposvr:8081/artifactory/repo/[organisation]/[module]/[r
evision]/[artifact]-[revision].[ext]" />
        </url>
        <ibiblio name="ibiblio" />
      </chain>
  </resolvers>
</ivysettings>

I have tried several work-arounds including using version range syntax,
'latest.integration' and replacing the url resolver with an ibiblio
resolver with its root and pattern attributes set to the specifics for
our enterprise repository, but to no avail.  Again, if I specify a
complete version number, it works fine, so I know that Ivy is set up
correctly.  Any advice on what I'm doing wrong would be greatly
appreciated.  Thanks in advance.

Jim


     

RE: Dynamic revisions question

by James Christie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maarten-

Thanks for the reply.  I tried adding an ivy pattern to the resolver,
but I'm still getting the same error.  After adding the ivy pattern I
tried specifying the dependency using both the + wildcard as well as
with a version-range expression.  The outcome was the same in both
cases.  I noticed there was a JIRA issue about this, but it was a while
back and it was my impression that this was working in 2.0.0 beta.  I'm
sure it's something on my end, but I can't seem to figure out what it
is.  Maybe I'll see if the Artifactory repository can be made available
as a filesystem share (only available via http right now) and try with a
filesystem resolver.

Jim




-----Original Message-----
From: Maarten Coene [mailto:maarten_coene@...]
Sent: Saturday, July 19, 2008 5:34 AM
To: ivy-user@...
Subject: Re: Dynamic revisions question

Could you try adding an ivy-pattern to your artifactory resolver?
It could be that Ivy is having troubles resolving dynamic revisions if
there is no ivy-pattern defined.

Maarten



----- Original Message ----
From: Jim Christie <Jim.Christie@...>
To: ivy-user@...
Sent: Friday, July 18, 2008 11:10:22 PM
Subject: Dynamic revisions  question

I'm having some difficulty getting dynamic revisions working in
v2.0.0-beta2.  Everything works fine as long as I specify a complete
revision number, for example: <dependency org="commons-logging"
name="commons-logging" rev="1.0.4" transitive="false"/>.  However, if I
attempt to specify a dynamic revision, it won't work.  

For example, this:
  <dependency org="commons-logging" name="commons-logging" rev="1.0.+"
transitive="false"/>

Results in this message:
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]          module not found:
commons-logging#commons-logging;1.0.+
[ivy:retrieve]  ==== artifactory: tried
[ivy:retrieve]    -- artifact
commons-logging#commons-logging;1.0.+!commons-logging.jar:
[ivy:retrieve]
http://reposvr:8081/artifactory/repo/commons-logging/commons-logging/1.0
.+/commons-logging-1.0.+.jar
[ivy:retrieve]
http://reposvr:8081/artifactory/repo/commons-logging/commons-logging/[re
vision]/commons-logging-[revision].jar
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          :: commons-logging#commons-logging;1.0.+: not
found
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::

My ivysettings.xml looks like this (we specify an enterprise repository
running on Artifactory and ibiblio as a fallback).

<ivysettings>
  <settings defaultResolver="chained"/>
    <resolvers>
      <chain name="chained">
        <url name="artifactory">
          <artifact
   
pattern="http://reposvr:8081/artifactory/repo/[organisation]/[module]/[r
evision]/[artifact]-[revision].[ext]" />
        </url>
        <ibiblio name="ibiblio" />
      </chain>
  </resolvers>
</ivysettings>

I have tried several work-arounds including using version range syntax,
'latest.integration' and replacing the url resolver with an ibiblio
resolver with its root and pattern attributes set to the specifics for
our enterprise repository, but to no avail.  Again, if I specify a
complete version number, it works fine, so I know that Ivy is set up
correctly.  Any advice on what I'm doing wrong would be greatly
appreciated.  Thanks in advance.

Jim


     

Re: Dynamic revisions question

by Brian Matzon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jim Christie wrote:
> I'm having some difficulty getting dynamic revisions working in
> v2.0.0-beta2.  Everything works fine as long as I specify a complete
> revision number, for example: <dependency org="commons-logging"
> name="commons-logging" rev="1.0.4" transitive="false"/>.  However, if I
> attempt to specify a dynamic revision, it won't work.
>  
I basically have the same issue - what I am seeing is:

[ivy:resolve] CLIENT ERROR: Not Found url=http://build.example.com/ivy/example/math/ivy-1.0.+.xml
[ivy:resolve] HTTP response status: 404=Not Found url=http://build.example.com/ivy/example/math/ivy-1.0.+.xml
[ivy:resolve]           tried http://build.example.com/ivy/example/math/ivy-[revision].xml
[ivy:resolve]   listing all in http://build.example.com/ivy/example/math/ivy-[revision].xml
[ivy:resolve]   using internal to list all in http://build.example.com/ivy/example/math
[ivy:resolve]           found 0 urls
[ivy:resolve]           0 matched http://build.example.com/ivy/example/math/ivy-[revision].xml
[ivy:resolve]   found revs: []
[ivy:resolve]   internal: no resource found for example#math;1.0.+: pattern=http://build.example.com/ivy/[organisation]/[module]/ivy-[revision].xml
[ivy:resolve]    trying http://build.example.com/ivy/example/math/math-1.0.+.jar
[ivy:resolve]           tried http://build.example.com/ivy/example/math/math-1.0.+.jar
[ivy:resolve] CLIENT ERROR: Not Found url=http://build.example.com/ivy/example/math/math-1.0.+.jar
[ivy:resolve] HTTP response status: 404=Not Found url=http://build.example.com/ivy/example/math/math-1.0.+.jar
[ivy:resolve]           tried http://build.example.com/ivy/example/math/math-[revision].jar
[ivy:resolve]   listing all in http://build.example.com/ivy/example/math/math-[revision].jar
[ivy:resolve]   using internal to list all in http://build.example.com/ivy/example/math
[ivy:resolve]           found 0 urls
[ivy:resolve]           0 matched http://build.example.com/ivy/example/math/math-[revision].jar
[ivy:resolve]   found revs: []
[ivy:resolve]   internal: no resource found for example#math;1.0.+: pattern=http://build.example.com/ivy/[organisation]/[module]/[artifact]-[revision].[ext]
[ivy:resolve]   internal: no ivy file nor artifact found for example#math;1.0.+
[ivy:resolve] WARN:     module not found: example#math;1.0.+
[ivy:resolve] WARN: ==== local: tried
[ivy:resolve] WARN:   ../build/plugins/ivy/local/example/math/ivy-1.0.+.xml
[ivy:resolve] WARN:   ../build/plugins/ivy/local/example/math/ivy-[revision].xml
[ivy:resolve] WARN:   -- artifact example#math;1.0.+!math.jar:
[ivy:resolve] WARN:   ../build/plugins/ivy/local/example/math/math-1.0.+.jar
[ivy:resolve] WARN:   ../build/plugins/ivy/local/example/math/math-[revision].jar
[ivy:resolve] WARN: ==== internal: tried
[ivy:resolve] WARN:   http://build.example.com/ivy/example/math/ivy-1.0.+.xml
[ivy:resolve] WARN:   http://build.example.com/ivy/example/math/ivy-[revision].xml
[ivy:resolve] WARN:   -- artifact example#math;1.0.+!math.jar:
[ivy:resolve] WARN:   http://build.example.com/ivy/example/math/math-1.0.+.jar
[ivy:resolve] WARN:   http://build.example.com/ivy/example/math/math-[revision].jar

using the following settings:

default.ivy.pattern                                      = [organisation]/[module]/ivy-[revision].xml
default.artifact.pattern                                 = [organisation]/[module]/[artifact]-[revision].[ext]

ivy.internal.default.root                                = http://build.example.com/ivy
ivy.internal.default.ivy.pattern                         = ${default.ivy.pattern}
ivy.internal.default.artifact.pattern                    = ${default.artifact.pattern}                                                    

ivy.local.default.root                                   = ../build/plugins/ivy/local
ivy.local.default.ivy.pattern                            = ${default.ivy.pattern}
ivy.local.default.artifact.pattern                       = ${default.artifact.pattern}


furthermore I am seeing these entries in the web server - its as if the
actual expansion of 1.0.+ isn't happening.

--
Brian Matzon
Certus