Skip to content

Commit

Permalink
Settings for publishing to oss.sonatype.org
Browse files Browse the repository at this point in the history
Separated macros and core scarango driver projects.
Added organisation as maven groupid.

Added links to example projects and other documentation improvements.
  • Loading branch information
aurelijusb committed Sep 9, 2015
1 parent 0f7b738 commit 0111e2d
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 24 deletions.
47 changes: 39 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This driver is based on [ArangoDB](https://www.arangodb.com/) REST API and spray
Stability
---------

**This is early alpha**
**This is early erly version**. Functionality, that is covered:

* **Database**: Create, List, Remove, ~~by user~~, ~~with user data~~
* **Collection**: Create, ~~List~~, Read (status, type, ~~properties~~, ~~count~~, ~~statistics~~), Remove, ~~(un)laod~~, ~~truncate~~, ~~rotate~~, ~~rename~~
Expand All @@ -20,8 +20,35 @@ Stability
* ~~Export, replicate~~
* Version, ~~WAL, System, Tasks, Log~~

See [integration tests](src/test/scala/com/auginte/scarango/IntegrationTest.scala)
for details of covered functionality and usage examples
Usage
-----

You may need to add the Sonatype nexus to your resolvers:

```scala
resolvers += "Sonatype OOS" at ""https//oss.sonatype.org/content/groups/public"
```

sbt:
```scala
libraryDependencies += "com.auginte" % "scarango_2.11" % "0.2.3"
```

Maven:
```xml
<dependency>
<groupId>com.auginte</groupId>
<artifactId>scarango_2.11</artifactId>
<version>0.2.3</version>
<classifier>sources</classifier>
</dependency>
```

Examples
--------

* Clone [Example project](https://github.com/aurelijusb/scarango-example)
* See [integration tests](src/test/scala/com/auginte/scarango/IntegrationTest.scala)

Why another driver
------------------
Expand All @@ -31,23 +58,22 @@ This client/driver concentrates on faster/easier development of
* Akka/spray based applications
* Graph intensive applications

Meaning, not the coverage of newest API changes or fancy ORM.
*Development still in progress*

Architecture concepts
---------------------

* Interacting with ArangoDB via Scarango Actor (reuse open HTTP connection)
* All operations/actor messages grouped into requests, response and error packages
* `request.groups` traits used for Functional grouping

Similar projects
----------------

* https://github.com/CharlesAHunt/proteus
* https://github.com/sumito3478/scarango

Run
---
Run/Develop driver itself
-------------------------

Assuming, that ArangoDb is installed on http://127.0.0.1:8529

Expand All @@ -68,4 +94,9 @@ Test

```
sbt test
```
```

License
-------

[Apache 2.0](LICENSE)
4 changes: 3 additions & 1 deletion project/Publish.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ object Publish {
lazy val settings = Seq(
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("http://scarango.auginte.com/")),
organization := "com.auginte",

publishMavenStyle := true,
publishArtifact in Test := false,
Expand All @@ -19,8 +20,9 @@ object Publish {
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},

credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),

pomExtra :=
<url>http://scarango.auginte.com/</url>
<scm>
<url>git@github.com:aurelijusb/scarango.git</url>
<connection>scm:git@github.com:aurelijusb/scarango.git</connection>
Expand Down
16 changes: 10 additions & 6 deletions project/build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sbt._

object build extends sbt.Build {
val buildName = "scarango"
val buildVersion = "0.2.1"
val buildVersion = "0.2.3"
val buildScalaVersion = "2.11.7"
val buildOptions = Seq("-feature", "-unchecked", "-deprecation", "-encoding", "utf8")

Expand All @@ -17,25 +17,29 @@ object build extends sbt.Build {
"io.spray" %% "spray-json" % "1.3.2",
"io.spray" %% "spray-json" % "1.3.2",
"org.scala-lang" % "scala-compiler" % buildScalaVersion,
"com.auginte" %% "scarango-macros" % "0.2.2", // See scarango-macros folder
"org.scalatest" % "scalatest_2.11" % "2.2.4" % "test"
)

lazy val commonSettings = Seq(
val scarangoAtSonatype = Seq(
"OSS" at "https//oss.sonatype.org/content/groups/public"
)

lazy val scarango = Seq(
name := buildName,
description := "Scala driver for ArangoDB",
version := buildVersion,
scalaVersion := buildScalaVersion,
scalacOptions := buildOptions,
mainClass := Some("com.auginte.scarango.Main"),
resolvers ++= scarangoAtSonatype,
libraryDependencies ++= buildDependencies,
scalacOptions in(Compile, doc) ++= Seq("-diagrams"),
spray.revolver.RevolverPlugin.Revolver.settings
)

lazy val scarangoMacros = RootProject(file("scarango-macros"))

lazy val scarangoLibrary = (project in file(".")
settings (commonSettings: _*)
settings (scarango: _*)
settings (Publish.settings: _*)
dependsOn scarangoMacros
)
}
38 changes: 38 additions & 0 deletions scarango-macros/project/Publish.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import sbt._
import Keys._

object Publish {
val nexus = "https://oss.sonatype.org/"

lazy val settings = Seq(
organization := "com.auginte",
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("http://scarango.auginte.com/")),

publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := (_ => false),

publishTo <<= version { v =>
if (v.trim endsWith "SNAPSHOT")
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},

credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),

pomExtra :=
<scm>
<url>git@github.com:aurelijusb/scarango.git/scarango-macros</url>
<connection>scm:git@github.com:aurelijusb/scarango.git/scarango-macros</connection>
</scm>
<developers>
<developer>
<id>aurelijusb</id>
<name>Aurelijus Banelis</name>
<url>http://aurelijus.banelis.lt</url>
</developer>
</developers>
)
}
24 changes: 15 additions & 9 deletions scarango-macros/project/build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sbt._

object build extends sbt.Build {
val buildName = "scarango-macros"
val buildVersion = "0.1"
val buildVersion = "0.2.2"
val buildScalaVersion = "2.11.7"
val buildOptions = Seq("-feature", "-unchecked", "-deprecation", "-encoding", "utf8")

Expand All @@ -12,13 +12,19 @@ object build extends sbt.Build {
"org.scala-lang" % "scala-compiler" % buildScalaVersion
)

lazy val scarangoLibrary = Project(id = buildName, base = file(".")) settings
(
name := buildName,
version := buildVersion,
scalaVersion := buildScalaVersion,
scalacOptions := buildOptions,
libraryDependencies ++= buildDependencies,
scalacOptions in(Compile, doc) ++= Seq("-diagrams")
lazy val macrosSettings = Seq(
name := buildName,
version := buildVersion,
description := "Scala Macro part for scarango driver",
scalaVersion := buildScalaVersion,
scalacOptions := buildOptions,
libraryDependencies ++= buildDependencies,
scalacOptions in(Compile, doc) ++= Seq("-diagrams")
)

lazy val scarangoMacros = (project in file(".")
settings (macrosSettings: _*)
settings (Publish.settings: _*)
)

}

0 comments on commit 0111e2d

Please sign in to comment.