Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Step 1: Follow the instructions at <a href="http://www.scala-sbt.org/release/docs/Detailed-Topics/Proxy-Repositories.html" rel="nofollow noreferrer">Detailed Topics: Proxy Repositories</a>, which I have summarised and added to below:</p> <ol> <li><p>(If you are using Artifactory, you can skip this step.) Create an <em>entirely separate</em> Maven proxy repository (or group) on your corporate Maven repository, to proxy <em>ivy-style</em> repositories such as these two important ones:</p> <ul> <li><a href="http://repo.typesafe.com/typesafe/ivy-releases/" rel="nofollow noreferrer">http://repo.typesafe.com/typesafe/ivy-releases/</a></li> <li><a href="http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/" rel="nofollow noreferrer">http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/</a></li> </ul> <p>This is needed because some repository managers cannot handle Ivy-style and Maven-style repositories being mixed together.</p></li> <li><p>Create a file <code>repositories</code>, listing both your main corporate repository and any extra one that you created in step 1, in the format shown below:</p> <pre><code>[repositories] my-maven-proxy-releases: http://repo.example.com/maven-releases/ my-ivy-proxy-releases: http://repo.example.com/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] </code></pre></li> <li><p>Either save that file in the <code>.sbt</code> directory inside your home directory, or specify it on the sbt command line (you will need to specify if you have <a href="https://stackoverflow.com/questions/4483230/an-easy-way-to-get-rid-of-everything-generated-by-sbt/19143599#19143599">disabled sharing</a>):</p> <pre><code>sbt -Dsbt.repository.config=&lt;path-to-your-repo-file&gt; </code></pre></li> </ol> <p><strong>Good news for those using older versions of sbt</strong>: Even though, in the sbt 0.12.0 launcher jar at least, the boot properties files for older sbt versions don't contain the required line (the one that mentions <code>repository.config</code>), it will still work for those versions of sbt if you edit those files to add the required line, and repackage them into the sbt 0.12.0 launcher jar! This is because the feature is implemented in the launcher, not in sbt itself. And the sbt 0.12.0 launcher is claimed to be able to launch all versions of sbt, right back to 0.7!</p> <p>Step 2: To make sure external repositories are not being used, remove the default repositories from your resolvers. This can be done in one of three ways:</p> <ol> <li>Add the command line option <code>-Dsbt.override.build.repos=true</code> mentioned on the Detailed Topics page above. This will cause the repositories you specified in the file to override any repositories specified in any of your sbt files. This might only work in sbt 0.12 and above, though - I haven't tried it yet.</li> <li>Having the same effect as 1, you can use <code>overrideBuildResolvers := true</code>, with the advantage that you can control the projects where it is applicable, depending on which scope (a project / <code>ThisBuild</code> / <code>Global</code>) you define it in. This works in sbt 0.13.</li> <li>Use <code>fullResolvers := Seq(</code> <em>resolver(s) for your corporate maven repositories</em> <code>)</code> in your build files, instead of <code>resolvers ++=</code> or <code>resolvers :=</code> or whatever you used to use.</li> </ol> <p>Finally, note that the sbt launcher script has a bug in reading the <code>sbtopts</code> file, so if you decide to put your common sbt command-line options in there, make sure the last line of the file ends in a newline (Emacs in particular can fail to ensure this, unless configured to do so).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    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