Skip to content
This repository has been archived by the owner on Jul 22, 2018. It is now read-only.

Commit

Permalink
Name now includes Lift Edition.
Browse files Browse the repository at this point in the history
  • Loading branch information
d6y committed Apr 7, 2013
1 parent 5ebdb2f commit 7b66135
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 21 deletions.
16 changes: 15 additions & 1 deletion README.textile
@@ -1,5 +1,19 @@
h1. Lift JTA Transaction API

To include this module in your Lift project, update your `libraryDependencies` in `build.sbt` to include:

*Lift 2.5.x* for Scala 2.9 and 2.10:

<pre>
"net.liftmodules" %% "jpa_2.5" % "1.2"
</pre>

*Lift 3.0.x* for Scala 2.10:

<pre>
"net.liftmodules" %% "jpa_3.0" % "1.2-SNAPSHOT"
</pre>

The semantics are the same as used in the EJB spec. E.g. Required, RequiresNew, Mandatory, Supports, Never. All these are exposed as monadic objects and high-order functions in the TransactionContext object.

The implementation is hooked into the Lift's JPA implementation.
Expand Down Expand Up @@ -39,7 +53,7 @@ h3. High-order functions API

<pre>
TransactionContext.withTxRequired {
... // REQUIRED semantics
... // REQUIRED semantics

TransactionContext.withTxRequiresNew {
... // REQUIRES_NEW semantics
Expand Down
34 changes: 19 additions & 15 deletions build.sbt
@@ -1,51 +1,55 @@
name := "jta"

organization := "net.liftmodules"

version := "1.2-SNAPSHOT"

liftVersion <<= liftVersion ?? "2.5-SNAPSHOT"

version <<= liftVersion apply { _ + "-1.2-SNAPSHOT" }
liftEdition <<= liftVersion apply { _.substring(0,3) }

name <<= (name, liftEdition) { (n, e) => n + "_" + e }

organization := "net.liftmodules"

scalaVersion := "2.10.0"

crossScalaVersions := Seq("2.10.0", "2.9.2", "2.9.1-1", "2.9.1", "2.9.0-1", "2.9.0")

resolvers += "CB Central Mirror" at "http://repo.cloudbees.com/content/groups/public"

resolvers += "Java.net Maven2 Repository" at "http://download.java.net/maven/2/"

libraryDependencies <++= liftVersion { v =>
"net.liftweb" %% "lift-webkit" % v % "compile->default" ::
"net.liftweb" %% "lift-util" % v % "compile->default" ::
"net.liftweb" %% "lift-webkit" % v % "provided" ::
"net.liftweb" %% "lift-util" % v % "provided" ::
Nil
}
}

libraryDependencies <++= scalaVersion { sv =>
libraryDependencies <++= scalaVersion { sv =>
"com.atomikos" % "atomikos-util" % "3.2.3" % "provided" ::
"com.atomikos" % "transactions" % "3.2.3" % "provided" ::
"com.atomikos" % "transactions-api" % "3.2.3" % "provided" ::
"com.atomikos" % "transactions-jta" % "3.2.3" % "provided" ::
"javax.persistence" % "persistence-api" % "1.0" % "provided" ::
"javax.transaction" % "transaction-api" % "1.1" % "provided" ::
"org.hibernate" % "hibernate-entitymanager" % "3.4.0.GA" ::
"org.scala-libs" % "scalajpa_2.9.1" % "1.4" ::
"org.scala-libs" % "scalajpa_2.9.1" % "1.4" ::
Nil
}

libraryDependencies <++= scalaVersion { sv =>
(sv match {
libraryDependencies <++= scalaVersion { sv =>
(sv match {
case "2.9.2" | "2.9.1" | "2.9.1-1" => "org.specs2" %% "specs2" % "1.12.3" % "test"
case "2.10.0" => "org.specs2" %% "specs2" % "1.13" % "test"
case "2.9.0-1" | "2.9.0" => "org.specs2" %% "specs2" % "1.7.1" % "test"
}) ::
}) ::
Nil
}

publishTo <<= version { _.endsWith("SNAPSHOT") match {
case true => Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
case false => Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
}
}
}


// For local deployment:
Expand Down Expand Up @@ -82,6 +86,6 @@ pomExtra := (
<name>Lift Team</name>
<url>http://www.liftmodules.net</url>
</developer>
</developers>
</developers>
)

9 changes: 4 additions & 5 deletions project/LiftModule.scala
Expand Up @@ -3,11 +3,10 @@ import sbt.Keys._

object LiftModuleBuild extends Build {

val liftVersion = SettingKey[String]("liftVersion", "Version number of the Lift Web Framework")

val project = Project("LiftModule", file("."))

}
val liftVersion = SettingKey[String]("liftVersion", "Full version number of the Lift Web Framework")

val liftEdition = SettingKey[String]("liftEdition", "Lift Edition (short version number to append to artifact name)")

val project = Project("LiftModule", file("."))

}

0 comments on commit 7b66135

Please sign in to comment.