Merge pull request #1934 from akka/wip-3781-remove-sbt-plugin-patriknw

!pro,sbt #3781 Remove akka-sbt-plugin
This commit is contained in:
Patrik Nordwall 2014-01-17 05:42:11 -08:00
commit 497c0c3924
13 changed files with 39 additions and 496 deletions

View file

@ -15,11 +15,17 @@ The Akka Microkernel is included in the Akka download found at `downloads`_.
To run an application with the microkernel you need to create a Bootable class
that handles the startup and shutdown the application. An example is included below.
Put your application jar in the ``deploy`` directory to have it automatically
loaded.
Put your application jar in the ``deploy`` directory and additional dependencies in the ``lib`` directory
to have them automatically loaded and placed on the classpath.
To start the kernel use the scripts in the ``bin`` directory, passing the boot
classes for your application. Example command (on a unix-based system):
classes for your application.
The start script adds ``config`` directory first in the classpath, followed by ``lib/*``.
It runs java with main class ``akka.kernel.Main`` and the supplied Bootable class as
argument.
Example command (on a unix-based system):
.. code-block:: none
@ -35,36 +41,3 @@ of creating a Bootable):
.. includecode:: ../../../akka-samples/akka-sample-hello-kernel/src/main/java/sample/kernel/hello/java/HelloKernel.java
Distribution of microkernel application
---------------------------------------
To make a distribution package of the microkernel and your application the ``akka-sbt-plugin`` provides
``AkkaKernelPlugin``. It creates the directory structure, with jar files, configuration files and
start scripts.
To use the sbt plugin you define it in your ``project/plugins.sbt``:
.. includecode:: ../../../akka-sbt-plugin/sample/project/plugins.sbt
Make sure that you have a ``project/build.properties`` file:
.. includecode:: ../../../akka-sbt-plugin/sample/project/build.properties
Then you add it to the settings of your ``project/Build.scala``. It is also important that you add the ``akka-kernel`` dependency.
This is an example of a complete sbt build file:
.. includecode:: ../../../akka-sbt-plugin/sample/project/Build.scala
Run the plugin with sbt::
> dist
> dist:clean
There are several settings that can be defined:
* ``outputDirectory`` - destination directory of the package, default ``target/dist``
* ``distJvmOptions`` - JVM parameters to be used in the start script
* ``configSourceDirs`` - Configuration files are copied from these directories, default ``src/config``, ``src/main/config``, ``src/main/resources``
* ``distMainClass`` - Kernel main class to use in start script
* ``libFilter`` - Filter of dependency jar files
* ``additionalLibs`` - Additional dependency jar files

View file

@ -200,3 +200,11 @@ During a migration period you can still use BalancingDispatcher by specifying th
type = "akka.dispatch.BalancingDispatcherConfigurator"
akka-sbt-plugin is Removed
==========================
``akka-sbt-plugin`` for packaging of application binaries has been removed. Version 2.2.3 can still be used
independent of Akka version of the application. Version 2.2.3 can be used with both sbt 0.12 and 0.13.
`sbt-native-packager <https://github.com/sbt/sbt-native-packager>`_ is the recommended tool for creating
distributions of Akka applications when using sbt.

View file

@ -15,11 +15,17 @@ The Akka Microkernel is included in the Akka download found at `downloads`_.
To run an application with the microkernel you need to create a Bootable class
that handles the startup and shutdown the application. An example is included below.
Put your application jar in the ``deploy`` directory to have it automatically
loaded.
Put your application jar in the ``deploy`` directory and additional dependencies in the ``lib`` directory
to have them automatically loaded and placed on the classpath.
To start the kernel use the scripts in the ``bin`` directory, passing the boot
classes for your application. Example command (on a unix-based system):
classes for your application.
The start script adds ``config`` directory first in the classpath, followed by ``lib/*``.
It runs java with main class ``akka.kernel.Main`` and the supplied Bootable class as
argument.
Example command (on a unix-based system):
.. code-block:: none
@ -34,37 +40,3 @@ of creating a Bootable):
.. includecode:: ../../../akka-samples/akka-sample-hello-kernel/src/main/scala/sample/kernel/hello/HelloKernel.scala
Distribution of microkernel application
---------------------------------------
To make a distribution package of the microkernel and your application the ``akka-sbt-plugin`` provides
``AkkaKernelPlugin``. It creates the directory structure, with jar files, configuration files and
start scripts.
To use the sbt plugin you define it in your ``project/plugins.sbt``:
.. includecode:: ../../../akka-sbt-plugin/sample/project/plugins.sbt
Make sure that you have a ``project/build.properties`` file:
.. includecode:: ../../../akka-sbt-plugin/sample/project/build.properties
Then you add it to the settings of your ``project/Build.scala``. It is also important that you add the ``akka-kernel`` dependency.
This is an example of a complete sbt build file:
.. includecode:: ../../../akka-sbt-plugin/sample/project/Build.scala
Run the plugin with sbt::
> dist
> dist:clean
There are several settings that can be defined:
* ``outputDirectory`` - destination directory of the package, default ``target/dist``
* ``distJvmOptions`` - JVM parameters to be used in the start script
* ``configSourceDirs`` - Configuration files are copied from these directories, default ``src/config``, ``src/main/config``, ``src/main/resources``
* ``distMainClass`` - Kernel main class to use in start script
* ``libFilter`` - Filter of dependency jar files
* ``additionalLibs`` - Additional dependency jar files

View file

@ -1,56 +0,0 @@
import sbt._
import Keys._
import akka.sbt.AkkaKernelPlugin
import akka.sbt.AkkaKernelPlugin.{ Dist, outputDirectory, distJvmOptions}
object HelloKernelBuild extends Build {
val Organization = "akka.sample"
val Version = "2.3-SNAPSHOT"
val ScalaVersion = "2.10.3"
lazy val HelloKernel = Project(
id = "hello-kernel",
base = file("."),
settings = defaultSettings ++ AkkaKernelPlugin.distSettings ++ Seq(
libraryDependencies ++= Dependencies.helloKernel,
distJvmOptions in Dist := "-Xms256M -Xmx1024M",
outputDirectory in Dist := file("target/hello-dist")
)
)
lazy val buildSettings = Defaults.defaultSettings ++ Seq(
organization := Organization,
version := Version,
scalaVersion := ScalaVersion,
crossPaths := false,
organizationName := "Typesafe Inc.",
organizationHomepage := Some(url("http://www.typesafe.com"))
)
lazy val defaultSettings = buildSettings ++ Seq(
// compile options
scalacOptions ++= Seq("-encoding", "UTF-8", "-deprecation", "-unchecked"),
javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")
)
}
object Dependencies {
import Dependency._
val helloKernel = Seq(
akkaKernel, akkaSlf4j, logback
)
}
object Dependency {
// Versions
object V {
val Akka = "2.3-SNAPSHOT"
}
val akkaKernel = "com.typesafe.akka" %% "akka-kernel" % V.Akka
val akkaSlf4j = "com.typesafe.akka" %% "akka-slf4j" % V.Akka
val logback = "ch.qos.logback" % "logback-classic" % "1.0.13"
}

View file

@ -1 +0,0 @@
sbt.version=0.12.4

View file

@ -1 +0,0 @@
addSbtPlugin("com.typesafe.akka" % "akka-sbt-plugin" % "2.3-SNAPSHOT")

View file

@ -1,4 +0,0 @@
akka {
loglevel = INFO
loggers = ["akka.event.slf4j.Slf4jLogger"]
}

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date{ISO8601} %-5level %X{akkaSource} %X{sourceThread} - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT" />
</root>
</configuration>

View file

@ -1,37 +0,0 @@
/**
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
*/
package sample.kernel.hello
import akka.actor.{ Actor, ActorSystem, ActorLogging, Props }
import akka.kernel.Bootable
case object Start
class HelloActor extends Actor with ActorLogging {
val worldActor = context.actorOf(Props[WorldActor], name = "world")
def receive = {
case Start worldActor ! "Hello"
case message: String
log.info("Received message [{}]", message)
}
}
class WorldActor extends Actor {
def receive = {
case message: String sender ! (message.toUpperCase + " world!")
}
}
class HelloKernel extends Bootable {
val system = ActorSystem("hellokernel")
def startup = {
system.actorOf(Props[HelloActor], name = "hello") ! Start
}
def shutdown = {
system.shutdown()
}
}

View file

@ -1,238 +0,0 @@
/**
* Copyright (C) 2011-2012 Typesafe <http://typesafe.com/>
*/
package akka.sbt
import sbt._
import sbt.Keys._
import sbt.BuildStructure
import sbt.classpath.ClasspathUtilities
import sbt.Def.Initialize
import sbt.CommandUtil._
import java.io.File
object AkkaKernelPlugin extends Plugin {
case class DistConfig(
outputDirectory: File,
configSourceDirs: Seq[File],
distJvmOptions: String,
distMainClass: String,
distBootClass: String,
libFilter: File Boolean,
additionalLibs: Seq[File])
val Dist = config("dist") extend (Runtime)
val dist = TaskKey[File]("dist", "Builds an Akka microkernel directory")
val distClean = TaskKey[Unit]("clean", "Removes Akka microkernel directory")
val outputDirectory = SettingKey[File]("output-directory")
val configSourceDirs = TaskKey[Seq[File]]("config-source-directories",
"Configuration files are copied from these directories")
val distJvmOptions = SettingKey[String]("kernel-jvm-options",
"JVM parameters to use in start script")
val distMainClass = SettingKey[String]("kernel-main-class",
"main class to use in start script, defaults to akka.kernel.Main to load an akka.kernel.Bootable")
val distBootClass = SettingKey[String]("kernel-boot-class",
"class implementing akka.kernel.Bootable, which gets loaded by the default 'distMainClass'")
val libFilter = SettingKey[File Boolean]("lib-filter", "Filter of dependency jar files")
val additionalLibs = TaskKey[Seq[File]]("additional-libs", "Additional dependency jar files")
val distConfig = TaskKey[DistConfig]("dist-config")
val distNeedsPackageBin = dist <<= dist.dependsOn(packageBin in Compile)
lazy val distSettings: Seq[Setting[_]] =
inConfig(Dist)(Seq(
dist <<= packageBin,
packageBin <<= distTask,
distClean <<= distCleanTask,
dependencyClasspath <<= (dependencyClasspath in Runtime),
unmanagedResourceDirectories <<= (unmanagedResourceDirectories in Runtime),
outputDirectory <<= target { t t / "dist" },
configSourceDirs <<= defaultConfigSourceDirs,
distJvmOptions := "-Xms1024M -Xmx1024M -Xss1M -XX:MaxPermSize=256M -XX:+UseParallelGC",
distMainClass := "akka.kernel.Main",
distBootClass := "",
libFilter := { f true },
additionalLibs <<= defaultAdditionalLibs,
distConfig <<= (outputDirectory, configSourceDirs, distJvmOptions, distMainClass, distBootClass, libFilter, additionalLibs) map DistConfig)) ++
Seq(dist <<= (dist in Dist), distNeedsPackageBin)
private def distTask: Initialize[Task[File]] =
(thisProject, distConfig, sourceDirectory, crossTarget, dependencyClasspath, allDependencies, buildStructure, state) map { (project, conf, src, tgt, cp, allDeps, buildStruct, st)
if (isKernelProject(allDeps)) {
val log = st.log
val distBinPath = conf.outputDirectory / "bin"
val distConfigPath = conf.outputDirectory / "config"
val distDeployPath = conf.outputDirectory / "deploy"
val distLibPath = conf.outputDirectory / "lib"
val subProjectDependencies: Set[SubProjectInfo] = allSubProjectDependencies(project, buildStruct, st)
log.info("Creating distribution %s ..." format conf.outputDirectory)
IO.createDirectory(conf.outputDirectory)
Scripts(conf.distJvmOptions, conf.distMainClass, conf.distBootClass).writeScripts(distBinPath)
copyDirectories(conf.configSourceDirs, distConfigPath)
copyJars(tgt, distDeployPath)
copyFiles(libFiles(cp, conf.libFilter), distLibPath)
copyFiles(conf.additionalLibs, distLibPath)
for (subProjectDependency subProjectDependencies) {
val subTarget = subProjectDependency.target
EvaluateTask(buildStruct, packageBin in Compile, st, subProjectDependency.projectRef)
copyJars(subTarget, distLibPath)
}
log.info("Distribution created.")
}
conf.outputDirectory
}
private def distCleanTask: Initialize[Task[Unit]] =
(outputDirectory, allDependencies, streams) map { (outDir, deps, s)
if (isKernelProject(deps)) {
val log = s.log
log.info("Cleaning " + outDir)
IO.delete(outDir)
}
}
def isKernelProject(dependencies: Seq[ModuleID]): Boolean = {
dependencies.exists { d
(d.organization == "com.typesafe.akka" || d.organization == "se.scalablesolutions.akka") &&
(d.name == "akka-kernel" || d.name.startsWith("akka-kernel_"))
}
}
private def defaultConfigSourceDirs = (sourceDirectory, unmanagedResourceDirectories) map { (src, resources)
Seq(src / "config", src / "main" / "config") ++ resources
}
private def defaultAdditionalLibs = (libraryDependencies) map { (libs)
Seq.empty[File]
}
private case class Scripts(jvmOptions: String, mainClass: String, bootClass: String) {
def writeScripts(to: File) = {
scripts.map { script
val target = new File(to, script.name)
IO.write(target, script.contents)
setExecutable(target, script.executable)
}.foldLeft(None: Option[String])(_ orElse _)
}
private case class DistScript(name: String, contents: String, executable: Boolean)
private def scripts = Set(DistScript("start", distShScript, true),
DistScript("start.bat", distBatScript, true))
private def distShScript =
("#!/bin/sh\n\n" +
"AKKA_HOME=\"$(cd \"$(cd \"$(dirname \"$0\")\"; pwd -P)\"/..; pwd)\"\n" +
"AKKA_CLASSPATH=\"$AKKA_HOME/config:$AKKA_HOME/lib/*\"\n" +
"JAVA_OPTS=\"%s\"\n\n" +
"java $JAVA_OPTS -cp \"$AKKA_CLASSPATH\" -Dakka.home=\"$AKKA_HOME\" %s%s \"$@\"\n").format(jvmOptions, mainClass, if (bootClass.nonEmpty) " " + bootClass else "")
private def distBatScript =
("@echo off\r\n\r\n" +
"set AKKA_HOME=%%~dp0..\r\n" +
"set AKKA_CLASSPATH=%%AKKA_HOME%%\\config;%%AKKA_HOME%%\\lib\\*\r\n" +
"set JAVA_OPTS=%s\r\n\r\n" +
"java %%JAVA_OPTS%% -cp \"%%AKKA_CLASSPATH%%\" -Dakka.home=\"%%AKKA_HOME%%\" %s%s %%*\r\n").format(jvmOptions, mainClass, if (bootClass.nonEmpty) " " + bootClass else "")
private def setExecutable(target: File, executable: Boolean): Option[String] = {
val success = target.setExecutable(executable, false)
if (success) None else Some("Couldn't set permissions of " + target)
}
}
private def copyDirectories(fromDirs: Seq[File], to: File) = {
IO.createDirectory(to)
for (from fromDirs) {
IO.copyDirectory(from, to)
}
}
private def copyJars(fromDir: File, toDir: File) = {
val jarFiles = fromDir.listFiles.filter(f
f.isFile &&
f.name.endsWith(".jar") &&
!f.name.contains("-sources") &&
!f.name.contains("-docs"))
copyFiles(jarFiles, toDir)
}
private def copyFiles(files: Seq[File], toDir: File) = {
for (f files) {
IO.copyFile(f, new File(toDir, f.getName))
}
}
private def libFiles(classpath: Classpath, libFilter: File Boolean): Seq[File] = {
val (libs, directories) = classpath.map(_.data).partition(ClasspathUtilities.isArchive)
libs.map(_.asFile).filter(libFilter)
}
private def includeProject(project: ResolvedProject, parent: ResolvedProject): Boolean = {
parent.uses.exists {
case ProjectRef(uri, id) id == project.id
case _ false
}
}
private def allSubProjectDependencies(project: ResolvedProject, buildStruct: BuildStructure, state: State): Set[SubProjectInfo] = {
val buildUnit = buildStruct.units(buildStruct.root)
val uri = buildStruct.root
val allProjects = buildUnit.defined.map {
case (id, proj) (ProjectRef(uri, id) -> proj)
}
val subProjects: Seq[SubProjectInfo] = allProjects.collect {
case (projRef, proj) if includeProject(proj, project) projectInfo(projRef, proj, buildStruct, state, allProjects)
}.toList
val allSubProjects = subProjects.map(_.recursiveSubProjects).flatten.toSet
allSubProjects
}
private def projectInfo(projectRef: ProjectRef, project: ResolvedProject, buildStruct: BuildStructure, state: State,
allProjects: Map[ProjectRef, ResolvedProject]): SubProjectInfo = {
def optionalSetting[A](key: SettingKey[A]) = key in projectRef get buildStruct.data
def setting[A](key: SettingKey[A], errorMessage: String) = {
optionalSetting(key) getOrElse {
state.log.error(errorMessage);
throw new IllegalArgumentException()
}
}
val subProjects = allProjects.collect {
case (projRef, proj) if includeProject(proj, project) projectInfo(projRef, proj, buildStruct, state, allProjects)
}.toList
val target = setting(Keys.crossTarget, "Missing crossTarget directory")
SubProjectInfo(projectRef, target, subProjects)
}
private case class SubProjectInfo(projectRef: ProjectRef, target: File, subProjects: Seq[SubProjectInfo]) {
def recursiveSubProjects: Set[SubProjectInfo] = {
val flatSubProjects = for {
x subProjects
y x.recursiveSubProjects
} yield y
flatSubProjects.toSet + this
}
}
}

View file

@ -39,7 +39,6 @@ object AkkaBuild extends Build {
lazy val buildSettings = Seq(
organization := "com.typesafe.akka",
version := "2.3-SNAPSHOT",
// Also change ScalaVersion in akka-sbt-plugin/sample/project/Build.scala
scalaVersion := requestedScalaVersion,
scalaBinaryVersion := System.getProperty("akka.scalaBinaryVersion", if (scalaVersion.value contains "-") scalaVersion.value else scalaBinaryVersion.value)
)
@ -53,12 +52,12 @@ object AkkaBuild extends Build {
testMailbox in GlobalScope := System.getProperty("akka.testMailbox", "false").toBoolean,
parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", "false").toBoolean,
Publish.defaultPublishTo in ThisBuild <<= crossTarget / "repository",
unidocExclude := Seq(samples.id, channelsTests.id, remoteTests.id, akkaSbtPlugin.id),
unidocExclude := Seq(samples.id, channelsTests.id, remoteTests.id),
sources in JavaDoc <<= junidocSources,
javacOptions in JavaDoc := Seq(),
artifactName in packageDoc in JavaDoc := ((sv, mod, art) => "" + mod.name + "_" + sv.binary + "-" + mod.revision + "-javadoc.jar"),
packageDoc in Compile <<= packageDoc in JavaDoc,
Dist.distExclude := Seq(actorTests.id, akkaSbtPlugin.id, docs.id, samples.id, osgi.id, osgiAries.id, channelsTests.id),
Dist.distExclude := Seq(actorTests.id, docs.id, samples.id, osgi.id, osgiAries.id, channelsTests.id),
// generate online version of docs
sphinxInputs in Sphinx <<= sphinxInputs in Sphinx in LocalProject(docs.id) map { inputs => inputs.copy(tags = inputs.tags :+ "online") },
// don't regenerate the pdf, just reuse the akka-docs version
@ -75,7 +74,7 @@ object AkkaBuild extends Build {
),
aggregate = Seq(actor, testkit, actorTests, dataflow, remote, remoteTests, camel, cluster, slf4j, agent, transactor,
persistence, mailboxes, zeroMQ, kernel, akkaSbtPlugin, osgi, osgiAries, docs, contrib, samples, channels, channelsTests,
persistence, mailboxes, zeroMQ, kernel, osgi, osgiAries, docs, contrib, samples, channels, channelsTests,
multiNodeTestkit)
)
@ -84,7 +83,7 @@ object AkkaBuild extends Build {
base = file("akka-scala-nightly"),
// remove dependencies that we have to build ourselves (Scala STM, ZeroMQ Scala Bindings)
aggregate = Seq(actor, testkit, actorTests, dataflow, remote, remoteTests, camel, cluster, slf4j,
persistence, mailboxes, kernel, akkaSbtPlugin, osgi, osgiAries, contrib, samples, channels, channelsTests,
persistence, mailboxes, kernel, osgi, osgiAries, contrib, samples, channels, channelsTests,
multiNodeTestkit)
)
@ -425,20 +424,6 @@ object AkkaBuild extends Build {
)
)
lazy val akkaSbtPlugin = Project(
id = "akka-sbt-plugin",
base = file("akka-sbt-plugin"),
settings = defaultSettings ++ formatSettings ++ Seq(
sbtPlugin := true,
publishMavenStyle := false, // SBT Plugins should be published as Ivy
publishTo <<= Publish.akkaPluginPublishTo,
scalacOptions in Compile := Seq("-encoding", "UTF-8", "-deprecation", "-unchecked"),
scalaVersion := "2.10.2",
scalaBinaryVersion := "2.10",
reportBinaryIssues := () // disable bin comp check
)
)
lazy val samples = Project(
id = "akka-samples",
base = file("akka-samples"),
@ -804,7 +789,6 @@ object AkkaBuild extends Build {
javacOptions in compile ++= Seq("-encoding", "UTF-8", "-source", "1.6", "-target", "1.6", "-Xlint:unchecked", "-Xlint:deprecation"),
javacOptions in doc ++= Seq("-encoding", "UTF-8", "-source", "1.6"),
// if changing this between binary and full, also change at the bottom of akka-sbt-plugin/sample/project/Build.scala
crossVersion := CrossVersion.binary,
ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet,

View file

@ -66,15 +66,6 @@ object Publish {
}
}
def akkaPluginPublishTo: Initialize[Option[Resolver]] = {
(defaultPublishTo, version) { (defaultPT, version) =>
pluginPublishLocally(defaultPT) orElse
akkaPublishRepository orElse
pluginRepo(version) orElse
Some(Resolver.file("Default Local Repository", defaultPT))
}
}
def sonatypeRepo(version: String): Option[Resolver] = {
Option(sys.props("publish.maven.central")) filter (_.toLowerCase == "true") map { _ =>
val nexus = "https://oss.sonatype.org/"
@ -83,23 +74,12 @@ object Publish {
}
}
def pluginRepo(version: String): Option[Resolver] =
Option(sys.props("publish.maven.central")) collect { case mc if mc.toLowerCase == "true" =>
val name = if (version endsWith "-SNAPSHOT") "sbt-plugin-snapshots" else "sbt-plugin-releases"
Resolver.url(name, url("http://scalasbt.artifactoryonline.com/scalasbt/" + name))(Resolver.ivyStylePatterns)
}
def akkaPublishRepository: Option[Resolver] =
Option(System.getProperty("akka.publish.repository", null)) map { "Akka Publish Repository" at _ }
def akkaCredentials: Seq[Credentials] =
Option(System.getProperty("akka.publish.credentials", null)) map (f => Credentials(new File(f))) toSeq
def pluginPublishLocally(defaultPT: File): Option[Resolver] =
Option(sys.props("publish.plugin.locally")) collect { case pl if pl.toLowerCase == "true" =>
Resolver.file("Default Local Repository", defaultPT)
}
// timestamped versions
def stampVersion = Command.command("stamp-version") { state =>

View file

@ -51,41 +51,25 @@
# "<your username>",
# "<your password>")
#
# 3) You must have publishing rights to scalasbt.artifactoryonline.com
# 3) You must have access to repo.akka.io
#
# 3.1) Politely ask the maintainers of the community plugins repository
# for credentials here:
# http://groups.google.com/group/sbt-repo-admins?hl=en
# More information about this repository is available here:
# http://www.scala-sbt.org/release/docs/Community/Community-Plugins.html
# 3.1) Ask someone in the team for login information for the akkarepo user.
#
# 3.2) Add your credentials to sbt by adding this to your global.sbt file
# credentials += Credentials("Artifactory Realm",
# "scalasbt.artifactoryonline.com",
# "<your username>",
# "<your encrypted password>")
# The encrypted password is available in your profile here
# http://scalasbt.artifactoryonline.com/scalasbt/webapp/profile.html
#
# 4) You must have access to repo.akka.io
#
# 4.1) Ask someone in the team for login information for the akkarepo user.
#
# 4.2) Install your public ssh key to avoid typing in your password.
# 3.2) Install your public ssh key to avoid typing in your password.
# From the command line:
# shell> cat ~/.ssh/id_rsa.pub | ssh akkarepo@repo.akka.io "cat >> ~/.ssh/authorized_keys"
#
# 5) You must have upload access to S3 bucket "downloads.typesafe.com"
# 4) You must have upload access to S3 bucket "downloads.typesafe.com"
#
# 5.1) Ask Akka team member for the AWS access key for 'akka.team' user.
# 4.1) Ask Akka team member for the AWS access key for 'akka.team' user.
#
# 5.2) Add your credentials to sbt by adding this to your global.sbt file
# 4.2) Add your credentials to sbt by adding this to your global.sbt file
# credentials += Credentials("Amazon S3",
# "downloads.typesafe.com.s3.amazonaws.com",
# "<Access Key Id>",
# "<Secret Access Key>")
#
# 6) Have access to github.com/akka/akka. This should be a given.
# 5) Have access to github.com/akka/akka. This should be a given.
#
# Now you should be all set to run the script
#
@ -95,8 +79,7 @@
# And if all goes well a real run:
# shell> project/scripts/release <version>
#
# The sbt plugin is published directly to scalasbt.artifactoryonline.com, but the
# artifacts published to oss.sonatype.org needs to be released by following the
# The artifacts published to oss.sonatype.org needs to be released by following the
# instructions under release here
# https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
@ -111,7 +94,7 @@ declare release_path=${default_path}
declare -r unzipped_dir="target/dist/unzipped"
# flags
unset run_tests dry_run no_mima no_revert no_akka_plugin
unset run_tests dry_run no_mima no_revert
# get the source location for this script; handles symlinks
function get_script_path {
@ -138,7 +121,6 @@ Usage: ${script_name} [options] VERSION
-n | --dry-run Build everything but do not push the release
-m | --no-mima Skip binary compatibility check in dry-run
-r | --no-revert On dry-run don't revert git commits and tags
--no-akka-plugin Publish the akka sbt plugin locally and not to the repositry
EOM
}
@ -173,7 +155,6 @@ while true; do
-n | --dry-run) dry_run=true; shift ;;
-m | --no-mima) no_mima=true; shift ;;
-r | --no-revert) no_revert=true; shift ;;
--no-akka-plugin) no_akka_plugin=true; shift ;;
* ) break ;;
esac
done
@ -316,9 +297,6 @@ if [ ! $dry_run ]; then
else
RELEASE_OPT="-Dakka.genjavadoc.enabled=true"
fi
if [ $no_akka_plugin ]; then
RELEASE_OPT="${RELEASE_OPT} -Dpublish.plugin.locally=true"
fi
try sbt $RELEASE_OPT build-release
echolog "Creating gzipped tar download..."
try tar -cz -C ${unzipped_dir} -f ${release_dir}/downloads/akka-${version}.tgz akka-${version}