Skip to content

Commit 173f3ec

Browse files
author
gadamc
committed
Updates README with installation instructions
1 parent 8701a73 commit 173f3ec

File tree

1 file changed

+109
-7
lines changed

1 file changed

+109
-7
lines changed

scala/README.md

Lines changed: 109 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,126 @@ on the latest IBM Spark Service instances (and through IBM Data Science Experien
77

88
## Installation
99

10-
We are in the process of publishing a release to Maven Central. For now, a snapshot version is available.
10+
This library is cross-built on both Scala 2.10 (for Spark 1.6.0) and Scala 2.11 (for Spark 2.0.0 and greater)
1111

12-
The `%AddJar` and `%AddDeps` magic funtion within a Scala notebook, available on IBM Spark Service in Bluemix or
13-
Data Science Experience, will install the package.
12+
### Releases
1413

15-
### Spark 1.6.0 (Scala 2.10)
14+
#### SBT library dependency
15+
16+
```
17+
"com.ibm.ibmos2spark" %% "ibmos2spark" % "0.0.7"
18+
```
19+
20+
#### Maven Dependency
21+
22+
##### Spark 1.6.0
23+
24+
```
25+
<dependency>
26+
<groupId>com.ibm.ibmos2spark</groupId>
27+
<artifactId>ibmos2spark_2.10</artifactId>
28+
<version>0.0.7</version>
29+
</dependency>
30+
```
31+
32+
##### Spark 2.0.0 and greater
33+
34+
```
35+
<dependency>
36+
<groupId>com.ibm.ibmos2spark</groupId>
37+
<artifactId>ibmos2spark_2.11</artifactId>
38+
<version>0.0.7</version>
39+
</dependency>
40+
```
41+
42+
43+
#### IBM Spark Service
44+
45+
The `%AddDeps` magic funtion within a Scala notebook, available on IBM Spark Service in the [IBM
46+
Data Science Experience](http://datascience.ibm.com), will install the package.
47+
48+
49+
##### Spark 1.6.0 (Scala 2.10)
1650

1751
```scala
18-
%AddJar https://oss.sonatype.org/content/repositories/snapshots/com/ibm/ibmos2spark/ibmos2spark_2.10/0.0.7-SNAPSHOT/ibmos2spark_2.10-0.0.7-SNAPSHOT.jar -f
52+
%AddDeps com.ibm.ibmos2spark ibmos2spark_2.10 0.0.7
53+
```
54+
55+
##### Spark 2.0.2 (Scala 2.11)
56+
57+
```scala
58+
%AddDeps com.ibm.ibmos2spark ibmos2spark_2.11 0.0.7
59+
```
60+
61+
62+
63+
### Snapshots
64+
65+
From time-to-time, a snapshot version may be released if fixes or new features are added.
66+
The following snipets show how to install snapshot releases.
67+
Replace the version number (`0.0.7`) in the following examples with the version you desire.
68+
69+
##### SBT library dependency
70+
71+
```
72+
"com.ibm.ibmos2spark" %% "ibmos2spark" % "0.0.7-SNAPSHOT"
73+
```
74+
75+
Add SNAPSHOT repository to build.sbt
76+
77+
```
78+
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
79+
```
80+
81+
##### Maven Spark 1.6.0
82+
83+
```
84+
<dependency>
85+
<groupId>com.ibm.ibmos2spark</groupId>
86+
<artifactId>ibmos2spark_2.10</artifactId>
87+
<version>0.0.7-SNAPSHOT</version>
88+
</dependency>
89+
```
90+
91+
##### Maven Spark 2.0.0 and greater
92+
93+
```
94+
<dependency>
95+
<groupId>com.ibm.ibmos2spark</groupId>
96+
<artifactId>ibmos2spark_2.11</artifactId>
97+
<version>0.0.7-SNAPSHOT</version>
98+
</dependency>
99+
```
100+
101+
Add SNAPSHOT repository to pom.xml
102+
103+
```
104+
<repositories>
105+
<repository>
106+
<id>snapshots</id>
107+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
108+
<releases>
109+
<enabled>false</enabled>
110+
</releases>
111+
<snapshots>
112+
<enabled>true</enabled>
113+
</snapshots>
114+
</repository>
115+
</repositories>
19116
```
20117

21118

22-
### Spark 2.0.2 (Scala 2.11)
119+
##### IBM Data Science Experience Spark 1.6.0 (Scala 2.10)
23120

24121
```scala
25-
%AddDeps com.ibm.ibmos2spark ibmos2spark_2.11 0.0.7-SNAPSHOT --repository https://oss.sonatype.org/content/repositories/snapshots/
122+
%AddJar https://oss.sonatype.org/content/repositories/snapshots/com/ibm/ibmos2spark/ibmos2spark_2.10/0.0.7-SNAPSHOT/ibmos2spark_2.10-0.0.7-SNAPSHOT.jar -f
26123
```
27124

125+
##### IBM Data Science Experience Spark 2.0.2 (Scala 2.11)
126+
127+
```scala
128+
%AddDeps com.ibm.ibmos2spark ibmos2spark_2.11 0.0.7-SNAPSHOT --repository https://oss.sonatype.org/content/repositories/snapshots/
129+
```
28130

29131
## Usage
30132

0 commit comments

Comments
 (0)