mirror of https://github.com/sbt/sbt.git
commit
aa7794f950
24
README.md
24
README.md
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
A Scala library to fetch dependencies from Maven / Ivy repositories
|
||||
|
||||
[](https://travis-ci.org/alexarchambault/coursier)
|
||||
[](https://ci.appveyor.com/project/alexarchambault/coursier)
|
||||
[](https://travis-ci.org/coursier/coursier)
|
||||
[](https://ci.appveyor.com/project/coursier/coursier)
|
||||
[](https://gitter.im/alexarchambault/coursier?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/io.get-coursier/coursier_2.11)
|
||||
[](http://javadoc-badge.appspot.com/io.get-coursier/coursier_2.11)
|
||||
|
|
@ -365,7 +365,7 @@ Welcome to the Ammonite Repl 0.7.0
|
|||
### bootstrap
|
||||
|
||||
The `bootstrap` generates tiny bootstrap launchers, able to pull their dependencies from
|
||||
repositories on first launch. For example, the launcher of coursier is [generated](https://github.com/alexarchambault/coursier/blob/master/project/generate-launcher.sh) with a command like
|
||||
repositories on first launch. For example, the launcher of coursier is [generated](https://github.com/coursier/coursier/blob/master/project/generate-launcher.sh) with a command like
|
||||
```
|
||||
$ ./coursier bootstrap \
|
||||
io.get-coursier:coursier-cli_2.11:1.0.0-M15 \
|
||||
|
|
@ -388,9 +388,9 @@ libraryDependencies ++= Seq(
|
|||
The first module, `"io.get-coursier" %% "coursier" % "1.0.0-M15"`, mainly depends on
|
||||
`scalaz-core` (and only it, *not* `scalaz-concurrent` for example). It contains among others,
|
||||
definitions,
|
||||
mainly in [`Definitions.scala`](https://github.com/alexarchambault/coursier/blob/master/core/shared/src/main/scala/coursier/core/Definitions.scala),
|
||||
[`Resolution`](https://github.com/alexarchambault/coursier/blob/master/core/shared/src/main/scala/coursier/core/Resolution.scala), representing a particular state of the resolution,
|
||||
and [`ResolutionProcess`](https://github.com/alexarchambault/coursier/blob/master/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala),
|
||||
mainly in [`Definitions.scala`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/Definitions.scala),
|
||||
[`Resolution`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/Resolution.scala), representing a particular state of the resolution,
|
||||
and [`ResolutionProcess`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala),
|
||||
that expects to be given metadata, wrapped in any `Monad`, then feeds these to `Resolution`, and at the end gives
|
||||
you the final `Resolution`, wrapped in the same `Monad` it was given input. This final `Resolution` has all the dependencies,
|
||||
including the transitive ones.
|
||||
|
|
@ -440,7 +440,7 @@ scala> val repositories = Seq(
|
|||
| Cache.ivy2Local,
|
||||
| MavenRepository("https://repo1.maven.org/maven2")
|
||||
| )
|
||||
repositories: Seq[coursier.core.Repository] = List(IvyRepository(Pattern(List(Const(file://), Var(user.home), Const(/local/), Var(organisation), Const(/), Var(module), Const(/), Opt(WrappedArray(Const(scala_), Var(scalaVersion), Const(/))), Opt(WrappedArray(Const(sbt_), Var(sbtVersion), Const(/))), Var(revision), Const(/), Var(type), Const(s/), Var(artifact), Opt(WrappedArray(Const(-), Var(classifier))), Const(.), Var(ext))),None,None,true,true,true,true,None), MavenRepository(https://repo1.maven.org/maven2,None,false,None,Set(org.apache.zookeeper:zookeeper)))
|
||||
repositories: Seq[coursier.core.Repository] = List(IvyRepository(Pattern(List(Const(file://), Var(user.home), Const(/local/), Var(organisation), Const(/), Var(module), Const(/), Opt(WrappedArray(Const(scala_), Var(scalaVersion), Const(/))), Opt(WrappedArray(Const(sbt_), Var(sbtVersion), Const(/))), Var(revision), Const(/), Var(type), Const(s/), Var(artifact), Opt(WrappedArray(Const(-), Var(classifier))), Const(.), Var(ext))),None,None,true,true,true,true,None), MavenRepository(https://repo1.maven.org/maven2,None,false,None))
|
||||
```
|
||||
The first one, `Cache.ivy2Local`, is defined in `coursier.Cache`, itself from the `coursier-cache` module that
|
||||
we added above. As we can see, it is an `IvyRepository`, picking things under `~/.ivy2/local`. An `IvyRepository`
|
||||
|
|
@ -467,7 +467,7 @@ scala> MavenRepository(
|
|||
| "https://nexus.corp.com/content/repositories/releases",
|
||||
| authentication = Some(Authentication("user", "pass"))
|
||||
| )
|
||||
res6: coursier.maven.MavenRepository = MavenRepository(https://nexus.corp.com/content/repositories/releases,None,false,Some(Authentication(user, *******)),Set(org.apache.zookeeper:zookeeper))
|
||||
res6: coursier.maven.MavenRepository = MavenRepository(https://nexus.corp.com/content/repositories/releases,None,false,Some(Authentication(user, *******)))
|
||||
```
|
||||
|
||||
Now that we have repositories, we're going to mix these with things from the `coursier-cache` module,
|
||||
|
|
@ -484,7 +484,7 @@ The monad used by `Fetch.from` is `scalaz.concurrent.Task`, but the resolution p
|
|||
monad - any stack-safe monad would do.
|
||||
|
||||
With this `fetch` method, we can now go on with the resolution. Calling `process` on `start` above gives a
|
||||
[`ResolutionProcess`](https://github.com/alexarchambault/coursier/blob/master/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala),
|
||||
[`ResolutionProcess`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala),
|
||||
that drives the resolution. It is loosely inspired by the `Process` of scalaz-stream.
|
||||
It is an immutable structure, that represents the various states the resolution process can be in.
|
||||
|
||||
|
|
@ -507,7 +507,7 @@ val resolution = start.process.run(fetch).run
|
|||
```
|
||||
|
||||
To get additional feedback during the resolution, we can give the `Cache.default` method above
|
||||
a [`Cache.Logger`](https://github.com/alexarchambault/coursier/blob/cf269c6895e19f2d590f08811406724304332950/cache/src/main/scala/coursier/Cache.scala#L484-L490).
|
||||
a [`Cache.Logger`](https://github.com/coursier/coursier/blob/cf269c6895e19f2d590f08811406724304332950/cache/src/main/scala/coursier/Cache.scala#L484-L490).
|
||||
|
||||
By default, downloads happen in a global fixed thread pool (with 6 threads, allowing for 6 parallel downloads), but
|
||||
you can supply your own thread pool to `Cache.default`.
|
||||
|
|
@ -541,7 +541,7 @@ We're using the `Cache.file` method, that can also be given a `Logger` (for more
|
|||
### Scala JS demo
|
||||
|
||||
*coursier* is also compiled to Scala JS, and can be tested in the browser via its
|
||||
[demo](http://alexarchambault.github.io/coursier/#demo).
|
||||
[demo](http://coursier.github.io/coursier/#demo).
|
||||
|
||||
## Extra features
|
||||
|
||||
|
|
@ -742,7 +742,7 @@ coursier is now aiming directly at `1.0.0`.
|
|||
|
||||
The last features I'd like to add until a feature freeze are mainly a
|
||||
better / nicer output, for both the command-line tools and the SBT plugin.
|
||||
These are tracked via GitHub [issues](https://github.com/alexarchambault/coursier/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0.0), along with other points.
|
||||
These are tracked via GitHub [issues](https://github.com/coursier/coursier/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0.0), along with other points.
|
||||
Milestones will keep being released until then.
|
||||
Then coursier should undergo `RC` releases, with no new features added, and
|
||||
only fixes and minor refactorings between them.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ build_script:
|
|||
- sbt ++2.10.6 clean compile
|
||||
- sbt ++2.10.6 coreJVM/publishLocal cache/publishLocal # to make the scripted tests happy
|
||||
test_script:
|
||||
- ps: Start-Job { & java -jar -noverify C:\projects\coursier\coursier launch -r http://dl.bintray.com/scalaz/releases io.get-coursier:http-server-java7_2.11:1.0.0-SNAPSHOT -- -d /C:/projects/coursier/tests/jvm/src/test/resources/test-repo/http/abc.com -u user -P pass -r realm --list-pages -v }
|
||||
- ps: Start-Job -filepath .\scripts\start-it-server.ps1 -ArgumentList $pwd
|
||||
- sbt ++2.12.1 testsJVM/test testsJVM/it:test # Would node be around for testsJS/test?
|
||||
- sbt ++2.11.8 testsJVM/test testsJVM/it:test
|
||||
- sbt ++2.10.6 testsJVM/test testsJVM/it:test sbt-coursier/scripted sbt-coursier/publishLocal sbt-shading/scripted
|
||||
|
|
|
|||
10
build.sbt
10
build.sbt
|
|
@ -426,7 +426,7 @@ lazy val `sbt-shading` = project
|
|||
scala.Console.err.println(
|
||||
s"""Warning: using jarjar $fallback, which doesn't properly shade Scala JARs (classes with '$$' aren't shaded).
|
||||
|See the instructions around
|
||||
|https://github.com/alexarchambault/coursier/blob/630a780487d662dd994ed1c3246895a22c00cf21/scripts/travis.sh#L40
|
||||
|https://github.com/coursier/coursier/blob/630a780487d662dd994ed1c3246895a22c00cf21/scripts/travis.sh#L40
|
||||
|to use a version fine with Scala JARs.""".stripMargin
|
||||
)
|
||||
|
||||
|
|
@ -557,11 +557,11 @@ lazy val `coursier` = project.in(file("."))
|
|||
lazy val releaseSettings = Seq(
|
||||
publishMavenStyle := true,
|
||||
licenses := Seq("Apache 2.0" -> url("http://opensource.org/licenses/Apache-2.0")),
|
||||
homepage := Some(url("https://github.com/alexarchambault/coursier")),
|
||||
homepage := Some(url("https://github.com/coursier/coursier")),
|
||||
scmInfo := Some(ScmInfo(
|
||||
url("https://github.com/alexarchambault/coursier.git"),
|
||||
"scm:git:github.com/alexarchambault/coursier.git",
|
||||
Some("scm:git:git@github.com:alexarchambault/coursier.git")
|
||||
url("https://github.com/coursier/coursier.git"),
|
||||
"scm:git:github.com/coursier/coursier.git",
|
||||
Some("scm:git:git@github.com:coursier/coursier.git")
|
||||
)),
|
||||
pomExtra := {
|
||||
<developers>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ SET ERROR_CODE=0
|
|||
SET LAUNCHER_PATH=%~dp0/coursier
|
||||
|
||||
IF NOT EXIST %LAUNCHER_PATH% (
|
||||
bitsadmin /transfer "DownloadCoursierLauncher" https://github.com/alexarchambault/coursier/raw/master/coursier %LAUNCHER_PATH%
|
||||
bitsadmin /transfer "DownloadCoursierLauncher" https://github.com/coursier/coursier/raw/master/coursier %LAUNCHER_PATH%
|
||||
)
|
||||
|
||||
SET CMD_LINE_ARGS=%*
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
A Scala library to fetch dependencies from Maven / Ivy repositories
|
||||
|
||||
[](https://travis-ci.org/alexarchambault/coursier)
|
||||
[](https://ci.appveyor.com/project/alexarchambault/coursier)
|
||||
[](https://travis-ci.org/coursier/coursier)
|
||||
[](https://ci.appveyor.com/project/coursier/coursier)
|
||||
[](https://gitter.im/alexarchambault/coursier?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/io.get-coursier/coursier_2.11)
|
||||
[](http://javadoc-badge.appspot.com/io.get-coursier/coursier_2.11)
|
||||
|
|
@ -394,7 +394,7 @@ Welcome to the Ammonite Repl 0.7.0
|
|||
### bootstrap
|
||||
|
||||
The `bootstrap` generates tiny bootstrap launchers, able to pull their dependencies from
|
||||
repositories on first launch. For example, the launcher of coursier is [generated](https://github.com/alexarchambault/coursier/blob/master/project/generate-launcher.sh) with a command like
|
||||
repositories on first launch. For example, the launcher of coursier is [generated](https://github.com/coursier/coursier/blob/master/project/generate-launcher.sh) with a command like
|
||||
```
|
||||
$ ./coursier bootstrap \
|
||||
io.get-coursier:coursier-cli_2.11:1.0.0-M15 \
|
||||
|
|
@ -417,9 +417,9 @@ libraryDependencies ++= Seq(
|
|||
The first module, `"io.get-coursier" %% "coursier" % "1.0.0-M15"`, mainly depends on
|
||||
`scalaz-core` (and only it, *not* `scalaz-concurrent` for example). It contains among others,
|
||||
definitions,
|
||||
mainly in [`Definitions.scala`](https://github.com/alexarchambault/coursier/blob/master/core/shared/src/main/scala/coursier/core/Definitions.scala),
|
||||
[`Resolution`](https://github.com/alexarchambault/coursier/blob/master/core/shared/src/main/scala/coursier/core/Resolution.scala), representing a particular state of the resolution,
|
||||
and [`ResolutionProcess`](https://github.com/alexarchambault/coursier/blob/master/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala),
|
||||
mainly in [`Definitions.scala`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/Definitions.scala),
|
||||
[`Resolution`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/Resolution.scala), representing a particular state of the resolution,
|
||||
and [`ResolutionProcess`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala),
|
||||
that expects to be given metadata, wrapped in any `Monad`, then feeds these to `Resolution`, and at the end gives
|
||||
you the final `Resolution`, wrapped in the same `Monad` it was given input. This final `Resolution` has all the dependencies,
|
||||
including the transitive ones.
|
||||
|
|
@ -511,7 +511,7 @@ The monad used by `Fetch.from` is `scalaz.concurrent.Task`, but the resolution p
|
|||
monad - any stack-safe monad would do.
|
||||
|
||||
With this `fetch` method, we can now go on with the resolution. Calling `process` on `start` above gives a
|
||||
[`ResolutionProcess`](https://github.com/alexarchambault/coursier/blob/master/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala),
|
||||
[`ResolutionProcess`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala),
|
||||
that drives the resolution. It is loosely inspired by the `Process` of scalaz-stream.
|
||||
It is an immutable structure, that represents the various states the resolution process can be in.
|
||||
|
||||
|
|
@ -534,7 +534,7 @@ val resolution = start.process.run(fetch).run
|
|||
```
|
||||
|
||||
To get additional feedback during the resolution, we can give the `Cache.default` method above
|
||||
a [`Cache.Logger`](https://github.com/alexarchambault/coursier/blob/cf269c6895e19f2d590f08811406724304332950/cache/src/main/scala/coursier/Cache.scala#L484-L490).
|
||||
a [`Cache.Logger`](https://github.com/coursier/coursier/blob/cf269c6895e19f2d590f08811406724304332950/cache/src/main/scala/coursier/Cache.scala#L484-L490).
|
||||
|
||||
By default, downloads happen in a global fixed thread pool (with 6 threads, allowing for 6 parallel downloads), but
|
||||
you can supply your own thread pool to `Cache.default`.
|
||||
|
|
@ -568,7 +568,7 @@ We're using the `Cache.file` method, that can also be given a `Logger` (for more
|
|||
### Scala JS demo
|
||||
|
||||
*coursier* is also compiled to Scala JS, and can be tested in the browser via its
|
||||
[demo](http://alexarchambault.github.io/coursier/#demo).
|
||||
[demo](http://coursier.github.io/coursier/#demo).
|
||||
|
||||
## Extra features
|
||||
|
||||
|
|
@ -776,7 +776,7 @@ coursier is now aiming directly at `1.0.0`.
|
|||
|
||||
The last features I'd like to add until a feature freeze are mainly a
|
||||
better / nicer output, for both the command-line tools and the SBT plugin.
|
||||
These are tracked via GitHub [issues](https://github.com/alexarchambault/coursier/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0.0), along with other points.
|
||||
These are tracked via GitHub [issues](https://github.com/coursier/coursier/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0.0), along with other points.
|
||||
Milestones will keep being released until then.
|
||||
Then coursier should undergo `RC` releases, with no new features added, and
|
||||
only fixes and minor refactorings between them.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"repository": "https://github.com/alexarchambault/coursier.git",
|
||||
"repository": "https://github.com/coursier/coursier.git",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"cheerio": "0.22.0",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$1" = "clone" ]; then
|
||||
git clone "https://${GH_TOKEN}@github.com/alexarchambault/coursier.git" -b gh-pages coursier-gh-pages >/dev/null 2>&1
|
||||
git clone "https://${GH_TOKEN}@github.com/coursier/coursier.git" -b gh-pages coursier-gh-pages >/dev/null 2>&1
|
||||
else
|
||||
git push origin gh-pages >/dev/null 2>&1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# see https://stackoverflow.com/questions/2224350/powershell-start-job-working-directory/2246542#2246542
|
||||
Set-Location $args[0]
|
||||
& java -jar -noverify coursier launch -r https://dl.bintray.com/scalaz/releases io.get-coursier:http-server-java7_2.11:1.0.0-SNAPSHOT -- -d tests/jvm/src/test/resources/test-repo/http/abc.com -u user -P pass -r realm --list-pages -v
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
org.webjars.bower:jquery:3.1.1:compile
|
||||
org.webjars.bower:jquery:3.2.1:compile
|
||||
org.webjars.bower:jquery-mousewheel:3.1.13:compile
|
||||
org.webjars.bower:malihu-custom-scrollbar-plugin:3.1.5:compile
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@
|
|||
<div class="collapse navbar-collapse" id="mainNavBar">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="#demo" data-toggle="tab">Demo</a></li>
|
||||
<li><a href="https://github.com/alexarchambault/coursier/blob/master/USAGE.md">Usage</a></li>
|
||||
<li><a href="https://github.com/coursier/coursier/blob/master/USAGE.md">Usage</a></li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="https://github.com/alexarchambault/coursier">Github</a></li>
|
||||
<li><a href="https://github.com/coursier/coursier">Github</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
<div class="jumbotron">
|
||||
<h1>Coursier</h1>
|
||||
<p>Pure Scala Artifact Fetching</p>
|
||||
<p><a href="https://github.com/alexarchambault/coursier">Project Page</a></p>
|
||||
<p><a href="https://github.com/coursier/coursier">Project Page</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue