Google Groups

Re: [sbt] Invertability Of Local Publication And Resolution


Ray Racine May 3, 2012 11:29 AM
Posted in group: simple-build-tool
Yes '%%' does work and much simpler then my previous work around of using custom patterns.    However, in the general case SBT vanilla out of the box, should be able to a) publish a jar to the local repository and then in turn be able to subsequently retrieve/use it.

I'll open it as a low priority bug.

Thanks for the simpler '%%'.

Ray

On Tue, May 1, 2012 at 7:14 PM, Christian Goetze <cg.softwa...@gmail.com> wrote:
would using "ray" %% "hello" % "1.0" help?


On Tue, May 1, 2012 at 11:13 AM, Ray Racine <ray.r...@gmail.com> wrote:
Hi, been away for a long time.

publish-local and update (which attempts to resolve from the local repository) don't seem to share the same default pattern.  I've always worked around this by manually setting patterns but it seems a bit inefficient.

Example.

Create a tiny project Hello with build.sbt as follows: 

name := "hello"

version := "1.0"

organization := "ray"

Publish said project via publish-local.

sbt> publish-local
...
[info] published hello_2.9.1 to /home/ray/.ivy2/local/ray/hello_2.9.1/1.0/jars/hello_2.9.1.jar
[info] published ivy to /home/ray/.ivy2/local/ray/hello_2.9.1/1.0/ivys/ivy.xml
...

Now lets pretend we want to use the above published local artifact as a standard sbt dependency.

An equally simple sbt.build of a project which uses hello.jar

name := "main"

version := "1.0"

organization := "ray"

libraryDependencies += "ray" % "hello" % "1.0"

sbt> update

Resolving ray#hello;1.0 ...
[warn] module not found: ray#hello;1.0
[warn] ==== local: tried
[warn]   /home/ray/.ivy2/local/ray/hello/1.0/ivys/ivy.xml
...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] ::          UNRESOLVED DEPENDENCIES         ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: ray#hello;1.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/tmp/p1/}default-df7991/*:update: sbt.ResolveException: unresolved dependency: ray#hello;1.0: not found

The out-of-the-box sbt local publish pattern does not match the out-of-box sbt local resolution pattern.

[info] published ivy to /home/ray/.ivy2/local/ray/hello_2.9.1/1.0/ivys/ivy.xml
[warn]       (resolving from)  /home/ray/.ivy2/local/ray/hello/1.0/ivys/ivy.xml

Can we bring the "default" local pattern for publish/resolution into alignment?


Thanks,

Ray

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To view this discussion on the web visit https://groups.google.com/d/msg/simple-build-tool/-/D3sTOLKCezAJ.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.