Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I retrieve snapshot dependencies from Nexus using SBT?
    primarykey
    data
    text
    <p>I have a maven2 repository from which I'm trying to fetch an snapshot artifact with an appended timestamp. I'm (unsurprisingly) able to retrieve it fine when building with maven2 but when building with <a href="http://code.google.com/p/simple-build-tool" rel="nofollow noreferrer">simple-build-tool (sbt)</a>, much preferred by me, I can't pull it down.</p> <p>I can see from <a href="https://stackoverflow.com/questions/2399099/resolving-snapshot-dependencies-with-timestamps-from-ivy">this question about snapshots in Ivy</a> that it is possible to configure <a href="http://ant.apache.org/ivy/" rel="nofollow noreferrer">Ivy</a> to get snapshot artifacts but I don't know how to tell sbt to do it.</p> <p>The relevant bits of my current configuration:</p> <pre><code>val snapshotsName = "Snapshots Repository" val snapshotsUrl = new java.net.URL("http://host:port/path/to/root") val snapshotsPattern = "[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]" val snapshots = Resolver.url(snapshotsName, snapshotsUrl)(Patterns(snapshotsPattern)) Credentials(Path.userHome / ".ivy2" / ".credentials", log) </code></pre> <p><strong>Update:</strong> After some more tinkering it looks like I can get it to point at the correct artifact url with the following pattern.</p> <pre><code>val snapshotsPattern = "[organisation]/[module]/[revision]-SNAPSHOT/[artifact]-[revision](-[timestamp]).[ext]" </code></pre> <p>With that I still need to specify the timestamp extra in the dependency</p> <pre><code>val dep = "group" % "artifact" % "0.0.1" extra("timestamp" -&gt; "20101202.195418-3") </code></pre> <p>but it does pull the artifact. However it does <em>NOT</em> pull the artifact's dependencies. So it seems I've still got something wrong.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload