mirror of https://github.com/sbt/sbt.git
commit
052719a58a
|
|
@ -40,3 +40,6 @@ cache:
|
||||||
- C:\Users\appveyor\.m2
|
- C:\Users\appveyor\.m2
|
||||||
- C:\Users\appveyor\.sbt
|
- C:\Users\appveyor\.sbt
|
||||||
- C:\Users\appveyor\.coursier
|
- C:\Users\appveyor\.coursier
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,8 @@ lazy val bootstrap = project
|
||||||
.settings(
|
.settings(
|
||||||
pureJava,
|
pureJava,
|
||||||
dontPublish,
|
dontPublish,
|
||||||
|
// seems not to be automatically found with sbt 0.13.16-M1 :-/
|
||||||
|
mainClass := Some("coursier.Bootstrap"),
|
||||||
renameMainJar("bootstrap.jar")
|
renameMainJar("bootstrap.jar")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -261,6 +263,7 @@ lazy val coursier = project
|
||||||
`sbt-launcher`,
|
`sbt-launcher`,
|
||||||
web,
|
web,
|
||||||
doc,
|
doc,
|
||||||
|
echo,
|
||||||
`http-server`,
|
`http-server`,
|
||||||
okhttp
|
okhttp
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -906,7 +906,7 @@ object Cache {
|
||||||
def file(
|
def file(
|
||||||
artifact: Artifact,
|
artifact: Artifact,
|
||||||
cache: File = default,
|
cache: File = default,
|
||||||
cachePolicy: CachePolicy = CachePolicy.FetchMissing,
|
cachePolicy: CachePolicy = CachePolicy.UpdateChanging,
|
||||||
checksums: Seq[Option[String]] = defaultChecksums,
|
checksums: Seq[Option[String]] = defaultChecksums,
|
||||||
logger: Option[Logger] = None,
|
logger: Option[Logger] = None,
|
||||||
pool: ExecutorService = defaultPool,
|
pool: ExecutorService = defaultPool,
|
||||||
|
|
@ -961,7 +961,7 @@ object Cache {
|
||||||
|
|
||||||
def fetch(
|
def fetch(
|
||||||
cache: File = default,
|
cache: File = default,
|
||||||
cachePolicy: CachePolicy = CachePolicy.FetchMissing,
|
cachePolicy: CachePolicy = CachePolicy.UpdateChanging,
|
||||||
checksums: Seq[Option[String]] = defaultChecksums,
|
checksums: Seq[Option[String]] = defaultChecksums,
|
||||||
logger: Option[Logger] = None,
|
logger: Option[Logger] = None,
|
||||||
pool: ExecutorService = defaultPool,
|
pool: ExecutorService = defaultPool,
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,6 @@ final case class Project(
|
||||||
*/
|
*/
|
||||||
actualVersionOpt: Option[String],
|
actualVersionOpt: Option[String],
|
||||||
|
|
||||||
// Ivy-specific
|
|
||||||
// First String is configuration
|
// First String is configuration
|
||||||
publications: Seq[(String, Publication)],
|
publications: Seq[(String, Publication)],
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -328,6 +328,7 @@ final case class MavenRepository(
|
||||||
val prefix = s"${module.name}-${versioningValue.getOrElse(version)}"
|
val prefix = s"${module.name}-${versioningValue.getOrElse(version)}"
|
||||||
|
|
||||||
val packagingTpeMap = proj0.packagingOpt
|
val packagingTpeMap = proj0.packagingOpt
|
||||||
|
.filter(_ != Pom.relocatedPackaging)
|
||||||
.map { packaging =>
|
.map { packaging =>
|
||||||
(MavenSource.typeDefaultClassifier(packaging), MavenSource.typeExtension(packaging)) -> packaging
|
(MavenSource.typeDefaultClassifier(packaging), MavenSource.typeExtension(packaging)) -> packaging
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -228,13 +228,13 @@ final case class MavenSource(
|
||||||
dependency: Dependency,
|
dependency: Dependency,
|
||||||
project: Project,
|
project: Project,
|
||||||
overrideClassifiers: Option[Seq[String]]
|
overrideClassifiers: Option[Seq[String]]
|
||||||
): Seq[Artifact] = {
|
): Seq[Artifact] =
|
||||||
|
if (project.packagingOpt.toSeq.contains(Pom.relocatedPackaging))
|
||||||
if (project.publications.isEmpty)
|
Nil
|
||||||
|
else if (project.publications.isEmpty)
|
||||||
artifactsUnknownPublications(dependency, project, overrideClassifiers)
|
artifactsUnknownPublications(dependency, project, overrideClassifiers)
|
||||||
else
|
else
|
||||||
artifactsKnownPublications(dependency, project, overrideClassifiers)
|
artifactsKnownPublications(dependency, project, overrideClassifiers)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object MavenSource {
|
object MavenSource {
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,7 @@ object Pom {
|
||||||
profiles,
|
profiles,
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
packagingOpt(pom),
|
relocationDependencyOpt.fold(packagingOpt(pom))(_ => Some(relocatedPackaging)),
|
||||||
None,
|
None,
|
||||||
Nil,
|
Nil,
|
||||||
Info(
|
Info(
|
||||||
|
|
@ -445,6 +445,8 @@ object Pom {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val relocatedPackaging = s"$$relocated"
|
||||||
|
|
||||||
val extraAttributeSeparator = ":#@#:"
|
val extraAttributeSeparator = ":#@#:"
|
||||||
val extraAttributePrefix = "+"
|
val extraAttributePrefix = "+"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,17 @@ publish() {
|
||||||
sbt ++${SCALA_VERSION} publish
|
sbt ++${SCALA_VERSION} publish
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testBootstrap() {
|
||||||
|
if is211; then
|
||||||
|
sbt ++${SCALA_VERSION} echo/publishLocal cli/pack
|
||||||
|
cli/target/pack/bin/coursier bootstrap -o cs-echo io.get-coursier:echo_2.11:1.0.0-SNAPSHOT
|
||||||
|
if [ "$(./cs-echo foo)" != foo ]; then
|
||||||
|
echo "Error: unexpected output from bootstrapped echo command." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# TODO Add coverage once https://github.com/scoverage/sbt-scoverage/issues/111 is fixed
|
# TODO Add coverage once https://github.com/scoverage/sbt-scoverage/issues/111 is fixed
|
||||||
|
|
||||||
|
|
@ -206,6 +217,8 @@ else
|
||||||
else
|
else
|
||||||
runJvmTests
|
runJvmTests
|
||||||
|
|
||||||
|
testBootstrap
|
||||||
|
|
||||||
validateReadme
|
validateReadme
|
||||||
checkBinaryCompatibility
|
checkBinaryCompatibility
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
commons-io:commons-io:1.3.2:compile
|
||||||
|
org.apache.commons:commons-io:1.3.2:compile
|
||||||
|
|
@ -588,10 +588,24 @@ object CentralTests extends TestSuite {
|
||||||
}
|
}
|
||||||
|
|
||||||
'relocation - {
|
'relocation - {
|
||||||
resolutionCheck(
|
* - resolutionCheck(
|
||||||
Module("bouncycastle", "bctsp-jdk14"),
|
Module("bouncycastle", "bctsp-jdk14"),
|
||||||
"138"
|
"138"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
'ignoreRelocationJars - {
|
||||||
|
val mod = Module("org.apache.commons", "commons-io")
|
||||||
|
val ver = "1.3.2"
|
||||||
|
|
||||||
|
val expectedUrl = "https://repo1.maven.org/maven2/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar"
|
||||||
|
|
||||||
|
* - resolutionCheck(mod, ver)
|
||||||
|
|
||||||
|
* - withArtifacts(mod, ver, "jar", transitive = true) { artifacts =>
|
||||||
|
assert(artifacts.length == 1)
|
||||||
|
assert(artifacts.head.url == expectedUrl)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue