This repository has been archived by the owner on Feb 28, 2021. It is now read-only.
forked from goneflyin/sbt-appengine-plugin
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 18e7ef3
Showing
4 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
lib_managed/ | ||
project/boot/ | ||
project/build/target/ | ||
project/plugins/lib_managed/ | ||
project/plugins/src_managed/ | ||
project/plugins/target/ | ||
target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#Project properties | ||
#Wed Jul 29 00:59:38 JST 2009 | ||
project.organization=net.stbbs.yasushi | ||
project.name=sbt-appengine-plugin | ||
sbt.version=0.5.2 | ||
project.version=1.0 | ||
scala.version=2.7.5 | ||
project.initialize=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import sbt._ | ||
class SbtAppenginePluginProject(info: ProjectInfo) extends PluginProject(info) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import sbt._ | ||
abstract class AppengineProject(info: ProjectInfo) extends DefaultWebProject(info) { | ||
lazy val appengineSdkRoot = property[String] | ||
|
||
val Appengine = Configurations.config("appengine") | ||
override def ivyConfigurations: Iterable[Configuration] = super.ivyConfigurations ++ (Appengine :: Nil) | ||
|
||
|
||
val servlet = "javax.servlet" % "servlet-api" % "2.5" % "provided->default" | ||
|
||
val appEngineApi = "com.google.appengine" % "appengine-api-1.0-sdk" % "1.2.2" % "compile->default" | ||
val appEngineOrm = "com.google.appengine.orm" % "datanucleus-appengine" % "1.0.2" % "compile->default" | ||
|
||
val dataNucleusCore = "org.datanucleus" % "datanucleus-core" % "1.1.4" % "compile->default" | ||
val dataNucleusJPA = "org.datanucleus" % "datanucleus-jpa" % "1.1.4" % "compile->default" | ||
val javaxPersistence = "javax.persistence" % "persistence-api" % "1.0.2" % "compile->default" | ||
val javaxJDO2 = "javax.jdo" % "jdo2-api" % "2.3-ea" % "compile->default" | ||
val dataNucleusEnhancer = "org.datanucleus" % "datanucleus-enhancer" % "1.1.4" % "appengine->default" | ||
|
||
override def ivyXML = | ||
<dependencies> | ||
<dependency org="com.google.appengine.orm" name="datanucleus-appengine" rev="1.0.1"> | ||
<exclude org="org.datanucleus" module="datanucleus-core"/> | ||
<exclude org="org.datanucleus" module="datanucleus-jpa"/> | ||
</dependency> | ||
<exclude org="junit" module="junit" conf="compile, runtime"/> | ||
</dependencies> | ||
|
||
val smackRepo = "m2-repository-smack" at "http://maven.reucon.com/public" | ||
val mvnsearchRepo = "mvnsearch.org" at "http://www.mvnsearch.org/maven2" | ||
val scalaSnapshots = "scala-snapshots" at "http://scala-tools.org/repo-snapshots" | ||
val devjavanet = JavaNet1Repository | ||
|
||
// | ||
lazy val appengineToolsApiJar = Path.fromFile(appengineSdkRoot.value) / "lib" / "appengine-tools-api.jar" | ||
def appengineClasspath = fullClasspath(Appengine) +++ compileClasspath +++ appengineToolsApiJar | ||
|
||
lazy val enhance = datanucleusEnhancerAction() | ||
lazy val enhanceCheck = datanucleusEnhancerAction("-checkonly") | ||
val classes = (mainCompilePath ** "*.class") | ||
def datanucleusEnhancerAction(opts:String*) = | ||
runTask(Some("org.datanucleus.enhancer.DataNucleusEnhancer"), | ||
appengineClasspath, List("-v") ++ opts ++ | ||
classes.get.map(_.projectRelativePath)) dependsOn(compile) | ||
|
||
override def prepareWebappAction = super.prepareWebappAction dependsOn(enhance) | ||
|
||
lazy val appcfg = task { args => | ||
runTask(Some("com.google.appengine.tools.admin.AppCfg"), | ||
appengineToolsApiJar, args) | ||
} | ||
|
||
lazy val appcfgUpdate = task { args => | ||
runTask(Some("com.google.appengine.tools.admin.AppCfg"), | ||
appengineToolsApiJar, args ++ List("update", temporaryWarPath.projectRelativePath)) dependsOn(prepareWebapp) | ||
} | ||
|
||
} |