sbt icon indicating copy to clipboard operation
sbt copied to clipboard

[organisation] and [organization] in ivy patterns behave like [orgPath] should in sftp and ssh resolvers.

Open Kreinoee opened this issue 13 years ago • 2 comments

I use the following resolver:

Resolver.sftp("Cirque-ivy-repo", "daisyduck.cirque.dk") as (username, keyfile) artifacts "/var/ivy/cirque-repo/[organization]/[module]/[type]s/[artifact]-[revision].[ext]" ivys "/var/ivy/cirque-repo/[organisation]/[module]/ivys/ivy-[revision].xml"

When i add the followin dependency: libraryDependencies += "dk.cirque.util" % "cirque-util-concurrency" % "3.6.0" it tries to resolve the ivy and artifact like this:

[warn] ==== Cirque-ivy-repo: tried
[warn]   /var/ivy/cirque-repo/dk/cirque/util/cirque-util-concurrency/ivys/ivy-3.6.0.xml
[warn]   -- artifact dk.cirque.util#cirque-util-concurrency;3.6.0!cirque-util-concurrency.jar:
[warn]   /var/ivy/cirque-repo/dk/cirque/util/cirque-util-concurrency/jars/cirque-util-concurrency-3.6.0.jar
[warn]   dk/cirque/util/cirque-util-concurrency/3.6.0/cirque-util-concurrency-3.6.0.jar

The problem is path it tries. The organisation of the dependency is dk.cirque.util so according to the pattern, the path of the ivy file should be /var/ivy/cirque-repo/dk.cirque.util/cirque-util-concurrency/ivys/ivy-3.6.0.xml but instead it replaces the . with / making the path: /var/ivy/cirque-repo/dk/cirque/util/cirque-util-concurrency/ivys/ivy-3.6.0.xml

According the documentation for ivy http://ant.apache.org/ivy/history/latest-milestone/concept.html it would be the correct behivor of [orgPath]

Note that i have tried both [organisation] and [organization] and both replaces the . with /

Kreinoee avatar Aug 30 '12 08:08 Kreinoee

FYI and for future reference, it seems that withIsMavenCompatible overrides the behavior of the pattern formatting when handling an [organization] token - setting it to false will format the organization without any modifications (as specified by the spec) while setting it to true overrides the spec and transforms the organization value to the equivalent of orgPath (i.e. every . is replaced by /).

matomer avatar Sep 03 '19 15:09 matomer

@matomer Thanks for the info!

eed3si9n avatar Sep 03 '19 16:09 eed3si9n