Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ngocdaothanh committed Apr 23, 2014
2 parents 81372e9 + 39db904 commit 40b2262
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 18 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ JVM processes without any prior setup at the target process.
## Download

Download and extract
[scalive-1.1.zip](https://github.com/ngocdaothanh/scalive/releases/download/v1.1/scalive-1.1.zip),
[scalive-1.2.zip](https://github.com/ngocdaothanh/scalive/releases/download/v1.2/scalive-1.2.zip),
you will see:

```
scalive-1.1/
scalive-1.2/
scalive
scalive.cmd
scalive-1.1.jar
scalive-1.2.jar
scala-library-2.10.3.jar
scala-compiler-2.10.3.jar
Expand All @@ -22,13 +22,17 @@ scalive-1.1/
scala-library-2.10.4.jar
scala-compiler-2.10.4.jar
scala-reflect-2.10.4.jar
scala-library-2.11.0.jar
scala-compiler-2.11.0.jar
scala-reflect-2.11.0.jar
```

scala-library, scala-compiler, and scala-reflect of the appropriate version
will be loaded to your running JVM process, if they have not been loaded.

For convenience, Scala 2.10.3 and 2.10.4 JARs are preincluded. If your process
is using a different Scala version, you need to manually download the
For convenience, Scala 2.10.3, 2.10.4, and 2.11.0 JARs are preincluded. If your
process is using a different Scala version, you need to manually download the
corresponding JARs and save them as above.

## Usage
Expand Down
6 changes: 4 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ organization := "tv.cntt"

name := "scalive"

version := "1.1-SNAPSHOT"
version := "1.2-SNAPSHOT"

scalaVersion := "2.11.0"

autoScalaLibrary := false

Expand All @@ -18,7 +20,7 @@ javacOptions ++= Seq("-source", "1.6", "-target", "1.6")
// https://blogs.oracle.com/CoreJavaTechTips/entry/the_attach_api
unmanagedJars in Compile := (file(System.getProperty("java.home")) / ".." / "lib" * "tools.jar").classpath

libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.3"
libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.11.0"

packageOptions in (Compile, packageBin) += Package.ManifestAttributes(
"Main-Class" -> "scalive.AgentLoader",
Expand Down
6 changes: 5 additions & 1 deletion dev/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This is the directory that will be zipped when Scalive is released.
zip/
scalive
scalive.cmd
scalive_2.10-1.1-SNAPSHOT.jar -> ../../target/scala-2.10/scalive_2.10-1.1-SNAPSHOT.jar
scalive_2.11-1.2-SNAPSHOT.jar -> ../../target/scala-2.11/scalive_2.11-1.2-SNAPSHOT.jar

scala-library-2.10.3.jar
scala-compiler-2.10.3.jar
Expand All @@ -35,6 +35,10 @@ This is the directory that will be zipped when Scalive is released.
scala-compiler-2.10.4.jar
scala-reflect-2.10.4.jar

scala-library-2.11.0.jar
scala-compiler-2.11.0.jar
scala-reflect-2.11.0.jar

While developing:

* Run ``sbt package`` to create/update scalive.jar
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/scalive/Agent.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public class Agent {
* jarpath/
* scalive.jar
*
* scala-library-2.10.3.jar
* scala-compiler-2.10.3.jar
* scala-reflect-2.10.3.jar
* scala-library-2.11.0.jar
* scala-compiler-2.11.0.jar
* scala-reflect-2.11.0.jar
*
* [Other Scala versions]
* }}}
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/scalive/AgentLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ public class AgentLoader {
*
* {{{
* jarpath/
* scalive-agent.jar
* scalive-client.jar
* scalive-repl.jar
* scalive.jar
*
* scala-library-2.10.3.jar
* scala-compiler-2.10.3.jar
* scala-reflect-2.10.3.jar
* scala-library-2.11.0.jar
* scala-compiler-2.11.0.jar
* scala-reflect-2.11.0.jar
*
* [Other Scala versions]
* }}}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/scalive/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class Server {
// Load this Scala version if Scala has not been loaded in the target process
private static final String DEFAULT_SCALA_VERSION = "2.10.3";
private static final String DEFAULT_SCALA_VERSION = "2.11.0";

public static void serve(Socket client, String[] jarpaths) throws Exception {
InputStream in = client.getInputStream();
Expand Down

0 comments on commit 40b2262

Please sign in to comment.