sbt
sbt copied to clipboard
[organisation] and [organization] in ivy patterns behave like [orgPath] should in sftp and ssh resolvers.
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 /
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 Thanks for the info!