Skip to content

Commit

Permalink
Minor ScalaDoc fixes. Fixed generated maven artifact name.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkolaczk committed Jul 11, 2014
1 parent f00be72 commit 9c49b62
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 32 deletions.
1 change: 1 addition & 0 deletions project/CassandraSparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ object CassandraSparkBuild extends Build {

lazy val root = Project(id = "spark-cassandra-connector", base = file("."))
.settings(Settings.defaultSettings: _*)
.settings(Settings.buildSettings: _*)
.settings(libraryDependencies ++= Dependencies.spark)
.configs(IntegrationTest)
}
Expand Down
37 changes: 7 additions & 30 deletions project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import scala.language.postfixOps
object Settings extends Build {

lazy val buildSettings = Seq(
name := "Apache Spark connector for Apache Cassandra from DataStax",
name := "DataStax Apache Cassandra connector for Apache Spark",
normalizedName := "spark-cassandra-connector",
description := "A library that exposes Cassandra tables as Spark RDDs, writes Spark RDDs to Cassandra tables, " +
"and executes CQL queries in Spark applications.",
organization := "com.datastax.spark",
Expand All @@ -39,25 +40,8 @@ object Settings extends Build {
licenses := Seq(("Apache License, Version 2.0", url("http://www.apache.org/licenses/LICENSE-2.0")))
)

/*
ToDo: with release plugin: publishTo settings would handle generating versions published from the snapshot,
so that any users of these artifacts NEVER use a SNAPSHOT via typical build code such as:
if (version endsWith "-SNAPSHOT") ("snapshots" at nexus + "content/repositories/snapshots")
else ("releases" at nexus + "service/local/staging/deploy/maven2")
*/
override lazy val settings = super.settings ++ buildSettings ++ Seq(shellPrompt := ShellPrompt.prompt)

lazy val baseSettings =
Defaults.coreDefaultSettings ++ Defaults.itSettings ++
IvyPlugin.projectSettings ++ JvmPlugin.projectSettings ++ Publish.settings

lazy val parentSettings = baseSettings ++ Seq(
publishArtifact := false,
reportBinaryIssues := () // disable bin comp check
)

// add ++ formatSettings
lazy val defaultSettings = baseSettings ++ testSettings ++ mimaSettings ++ releaseSettings ++ Seq(
lazy val defaultSettings = testSettings ++ mimaSettings ++ releaseSettings ++ Seq(
scalacOptions in (Compile, doc) ++= Seq("-doc-root-content", "rootdoc.txt"),
scalacOptions ++= Seq("-encoding", "UTF-8", s"-target:jvm-${Versions.JDK}", "-deprecation", "-feature", "-language:_", "-unchecked", "-Xlint"),
javacOptions ++= Seq("-encoding", "UTF-8", "-source", Versions.JDK, "-target", Versions.JDK, "-Xlint:unchecked", "-Xlint:deprecation"),
Expand All @@ -76,22 +60,13 @@ object Settings extends Build {
Tests.Argument(TestFrameworks.JUnit, "-oDF", "-v", "-a")
)

val javaAgent = TaskKey[Seq[String]]("javaagent")
val javaAgentTask = javaAgent <<= (fullClasspath in IntegrationTest).map { cp =>
val fileNames = cp.map(_.data.getPath)
val jamm = fileNames.find(_.matches("^.*jamm-.*\\.jar$"))
jamm.map("-javaagent:" + _).toSeq
}

lazy val testSettings = tests ++ Seq(
lazy val testSettings = tests ++ Defaults.itSettings ++ Seq(
parallelExecution in Test := false,
parallelExecution in IntegrationTest := false,
testOptions in Test ++= testOptionSettings,
testOptions in IntegrationTest ++= testOptionSettings,
fork in Test := true,
fork in IntegrationTest := true,
javaAgentTask,
javaOptions in IntegrationTest ++= Seq("-Xmx2g") ++ javaAgent.value
fork in IntegrationTest := true
)

lazy val formatSettings = SbtScalariform.scalariformSettings ++ Seq(
Expand All @@ -106,6 +81,8 @@ object Settings extends Build {
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
}

override lazy val settings = super.settings ++ buildSettings ++ Seq(shellPrompt := ShellPrompt.prompt)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion rootdoc.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Cassandra driver for Apache Spark.
Cassandra connector for Apache Spark.
See documentation of package [[com.datastax.spark.connector]].
2 changes: 1 addition & 1 deletion src/main/scala/com/datastax/spark/connector/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.apache.spark.rdd.RDD
import scala.reflect.ClassTag

/**
* The root package of Cassandra driver for Apache Spark.
* The root package of Cassandra connector for Apache Spark.
* Offers handy implicit conversions that add Cassandra-specific methods to `SparkContext` and `RDD`.
*
* Call [[com.datastax.spark.connector.SparkContextFunctions#cassandraTable cassandraTable]] method on the `SparkContext` object
Expand Down

0 comments on commit 9c49b62

Please sign in to comment.