Skip to content

merge 2.11.x onto 2.12.x #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 17, 2015
Merged
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The Scala 2.11.x Distribution #
# The Scala 2.12.x Distribution

This project morphs the `"org.scala-lang" % "scala-dist" % $version` maven artifact
into a Scala `$version` distribution (zip, tar.gz, deb, rpm, and msi).
Expand All @@ -7,43 +7,45 @@ To build a distribution, run:

* `universal:package-bin` - Builds the universal zip installer
* `universal-docs:package-bin` - Builds the universal documentation zip
* `debian:package-bin` - Builds the debian DEB file. *Requires dpkg-deb*
* `debian:package-bin` - Builds the Debian DEB file. *requires dpkg-deb*
* `rpm:package-bin` - Builds the yum RPM file. *requires rpmbuild*
* `windows:package-bin` - Builds the windows MSI. *Requires WIX 3.6 installed*
* `windows:package-bin` - Builds the Windows MSI. *requires WiX 3.6*

Alternatively, the `s3-upload` task's mapping are configured based on the platform
the installer is running on: on Windows, it builds the MSI; on another platform,
Alternatively, the `s3-upload` task's mappings are configured based on the platform
the installer is running on. On Windows, it builds the MSI; on another platform,
it'll create and upload the other packages in the above list. (Use `s3Upload::mappings` for a dry-run.)

The version of Scala to package is derived from the most recent git tag,
or you can specify it using `-Dproject.version`.

This packager only works for Scala 2.11 releases (starting with M8) or newer,
This packager only works for Scala 2.11+ releases (starting with M8),
as earlier ones did not publish the `scala-dist` artifact to maven.

Due to limited resources, the native packages are quite rudimental -- we welcome new maintainers!
Due to limited resources, the native packages are quite rudimentary.
We welcome new maintainers!

## Legacy
If you're looking for the editor configurations that used to be in the tool-support directory, please see https://github.com/scala/scala-tool-support.
They were moved out because they no longer ship with the Scala distribution (you're welcome to take over the scala-tool-support project!).
They were moved out because they no longer ship with the Scala distribution. (New maintainers are welcome on the scala-tool-support project!)

The specification also used to be in this repo -- it is now a part of the main repository over at [scala/scala](https://github.com/scala/scala/tree/2.11.x/spec).

## Windows VM
- install windows 7 professional N 64-bit, ensure network access to github
- install oracle java 6 jdk
- install wix v3.6 (reboot!)
- download sbt launcher 0.13.1 from xsbt.org to c:\users\jenkins\Downloads
- install git
- configure the jenkins master's tool locations for
- install Windows 7 professional N 64-bit, ensure network access to GitHub
- install Oracle Java 6 JDK
- install WiX v3.6 (reboot!)
- download sbt launcher 0.13.1 from xsbt.org to `c:\users\jenkins\Downloads`
- install Git
- configure the Jenkins master's tool locations for
- HOME
- jdk path
- git (path of git.exe)
- JDK path
- Git (path of git.exe)
- sbt launch jar


## Contributing ##
Please read the [Scala Pull Request Policy](https://github.com/scala/scala/wiki/Pull-Request-Policy)
and sign the [CLA](http://typesafe.com/contribute/cla/scala).

The branching structure mimics that of [scala/scala](https://github.com/scala/scala).
The branching structure mimics that of [scala/scala](https://github.com/scala/scala):
branches for 2.11.x, 2.12.x, etc.

4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Docs.settings

ScalaDist.platformSettings

enablePlugins(UniversalPlugin, RpmPlugin, JDebPackaging)

// resolvers += "local" at "file:///e:/.m2/repository"
// resolvers += Resolver.mavenLocal
// to test, run e.g., stage, or windows:packageBin, show s3-upload::mappings
// to test, run e.g., stage, or windows:packageBin, show s3-upload::mappings
6 changes: 3 additions & 3 deletions conf/repositories
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[repositories]
plugins: http://dl.bintray.com/sbt/sbt-plugin-releases/, [organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
private-repo: https://scala-ci.typesafe.com/artifactory/scala-release-temp/
typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sbt-plugin-releases: http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
jcenter-cache: https://scala-ci.typesafe.com/artifactory/jcenter/
typesafe-ivy-releases: https://dl.bintray.com/typesafe/ivy-releases/, [organisation]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sbt-plugin-releases: https://dl.bintray.com/sbt/sbt-plugin-releases/, [organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-central
local
20 changes: 9 additions & 11 deletions project/ScalaDist.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import sbt._
import sbt.Keys._

import com.typesafe.sbt.SbtNativePackager._
import com.typesafe.sbt.packager.MappingsHelper._
import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.useNativeZip
import com.typesafe.sbt.packager.Keys._

import com.typesafe.sbt.S3Plugin.S3.upload
Expand Down Expand Up @@ -37,7 +39,6 @@ object ScalaDist {
)

def settings: Seq[Setting[_]] =
packagerSettings ++
useNativeZip ++ // use native zip to preserve +x permission on scripts
Seq(
name := "scala",
Expand Down Expand Up @@ -69,19 +70,16 @@ object ScalaDist {
case "scala-dist" =>
val tmpdir = IO.createTemporaryDirectory
IO.unzip(file, tmpdir)
// IO.listFiles(tmpdir) does not recurse, use ** with glob "*" to find all files
(PathFinder(IO.listFiles(tmpdir)) ** "*").get flatMap { file =>
val relative = IO.relativize(tmpdir, file).get // .get is safe because we just unzipped under tmpdir

// files are stored in repository with platform-appropriate line endings
// if (onWindows && (relative endsWith ".bat")) toDosInPlace(file)

// create mappings from the unzip scala-dist zip
contentOf(tmpdir) filter {
case (file, dest) => !(dest.endsWith("MANIFEST.MF") || dest.endsWith("META-INF"))
} map {
// make unix scripts executable (heuristically...)
if ((relative startsWith "bin/") && !(file.getName endsWith ".bat"))
case (file, dest) if (dest startsWith "bin/") && !(dest endsWith ".bat") =>
file.setExecutable(true, true)

if (relative startsWith "META-INF") Seq()
else Seq(file -> relative)
file -> dest
case mapping => mapping
}

// core jars: use simple name for backwards compat
Expand Down
4 changes: 3 additions & 1 deletion project/Unix.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import sbt.Keys._
import com.typesafe.sbt.SbtNativePackager._
import com.typesafe.sbt.packager.Keys._
import com.typesafe.sbt.packager.linux.{LinuxPackageMapping => pkgMap, LinuxSymlink}
import com.typesafe.sbt.packager.linux.LinuxPlugin.autoImport.packageMapping

/** Create debian & rpm packages.
*
Expand Down Expand Up @@ -87,7 +88,7 @@ object Unix {

// Debian Specific
name in Debian := "scala",
debianPackageDependencies += "openjdk-7-jre-headless | java-runtime-headless",
debianPackageDependencies += "java8-runtime-headless",
// debianPackageDependencies += "libjansi-java",

linuxPackageMappings in Debian += (packageMapping(
Expand All @@ -96,5 +97,6 @@ object Unix {

// Hack so we use regular version, rather than debian version.
target in Debian := target.value / s"${(name in Debian).value}-${version.value}"

)
}
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.6.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.4")

addSbtPlugin("com.typesafe.sbt" % "sbt-s3" % "0.8")

Expand Down