From bc82459613f11a81b78deeadd4ac6a06572346bc Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Sat, 23 Jul 2016 00:40:15 +0900 Subject: [PATCH] Bump the sbt version of the framework project build to 0.13.12 --- bin/sbt-launch.jar | Bin 1210231 -> 1210231 bytes build.sbt | 390 +++++++++++++++++++++++++++++++++- project/Build.scala | 436 --------------------------------------- project/build.properties | 2 +- 4 files changed, 390 insertions(+), 438 deletions(-) delete mode 100644 project/Build.scala diff --git a/bin/sbt-launch.jar b/bin/sbt-launch.jar index 307fc224d0fc125bf07c81895af9c8a76d133359..871dedda6bc11601f8d39f5bcd0dc809678936d7 100644 GIT binary patch delta 2522 zcmZWr4NwzD6eh_fm%j@eM1BlHw1xsA!CFxS5kv( z)+92p`iHV%Y@Wn`HT6iTdS_iColJ2HV{-)UhY$21clM%4$y3E+36&0&1S1I+_Iz^;r%f(6{E{S7c6iLG0Nm zLeC;<6i6meytJJ%;2Bn=8j=UrS7~YXcghvi?bK8l^QELPH?5M5mhy!qNsU6_Lt!-F zUK^r^r0bD>0Ks%wAl}wAta0hG2ndQKdK|5%T-h5kK6M@;`l2c3f13!v);W}X7@bT< zI@7S_v^V(4bO5foPpQ~9wBl{sNZ1t@Crc?dO3tsuEnQPAb!E56-#sxxsWF;E+EC@> z&(0$!ImlyEf>z4D5wctoLl!kQ&(*4iRcBH}@CEd#xvOwa<}plQQ%r-BZHfRKdPOE@ zqm<4DlP|ZJsTcdIt!i?roO}5$tzuqWU;d{#!O3jc5Cmt7bvzMqxL(Z-002oiH;dx@M>OjC& zwHNEo@K>ABc(OAXz9tjH>&h4(95S7evlfQmXc-g2FK&}C9{6-BqdBDEBaFrXDJN_6 zFfJ6ZSz`g5;u)Z$aNkK2nk6c@o$iUfzXX-XdaR zViIB$F)1-wrI$CoFOypVf47aEIt z+M=yb9ABR7-u-E|$ul$exA?FZsV{ph$4*W<^Q3rt_!n!FKMqa$mT_dYIJ6i0862EX z`{X})^+O=IDOAStbVsLmbxXk2Ej!X& z_nVH7O*y(^Py6Av?%8LK>zTQ$P>ynC>MoCjf-do<`n%eO?zFnhYd)tkXKwdBJl)t) z8mo7VPC3@Sa<9ERt>l8VLbmEex+e3-6FFIB`4c~{h>e;RxwtCh&|>zq-oHJz=n6EZXLB{i?kmExNaF_xaeC`db@=jJ3~Bbc9>NEf@OlbZ+`AIjiqd z=eDy~c3##lTf6y6N$Vf3rbJq97?)aoPUPb90LL7lM&p_SwX*QMnI)6)`n2 zhM0z!Yvp+}x{v?|yP+1rOALQwM>>417P$j`{5C<)YLO0*dmVx&6(`rB8Njf0Xf`;@ zZg9dn6b#5vFVGr}-c^q#0e!h1C4oce`Oax^;Mm%@WpAMIfE+CZF%2k;Lq|A}(SSlA zL~`gvq4;1U^27%sMKm@JAeuBmBv!f%ehD#@)88PJ1IgnWh2*(6NxlP(2wvX2va?Z8 zs;wygZ9N;T!W2U5aJ3apfY@UzngtGNgAOOz&^RZp!(Z7DyaRBxO%REj&`gNOHK9as z4hs%!Y@kWlnDHj!TS4lZ3%ZPElD_LEn#ds#hc*jh5}F4Zt{u3p8No+}X!z3vc6AHS z;^QqS1;nJS$>7YsC6vP6LMC9KDWX=PDS+lX5p1)lRoEsM6K5;&!DliL92rlmj@XeJ zazLAd>_X2L+EFafhRJwp=E$dorq+c1M`8Nd|MD@+(z&@ z#^h?k^}yP8lBDl8@&z?P;ou~-qsidF9WEv!KyNs8TRVEsiK4)PJudDL_DJUHu%!dR z&jno7fkHvl(;=iJJJI3jPLu}p(N5v0?>Zg-I|7sCbbfF;{|Zj!%)97mft>r<#67)* OQLD6-QLEg-wf_N<{Ptx4 delta 2522 zcmZWr2~bm46ea5qNq%^tNYJQ&8cQt7VgVJ3fXE_(L2H%jC^!Q+ZXm5w?Z{H?h+8%G zRiD;nuwz@w*hmm6d`ap8>Ne>l81rScFjuV-N67fX5@miu;B8?v5W5XA z1JZTN0wI_xH7YVIl=m%9%V*qo<8$u?&n;(uPQz~M?q zgJ~CMHgWwzR#JYSVZioH$a%&0eS;0Xf&JePH}n4bKy{s*QlHY7gwj z@>iSH=J+;EJx$kbZ>W>t+i^jFRTXyR*?uq=28~g)G`|R60mVJ>{@kyxB4*8F&(yJ|(R@4O_l+%R$TB-wFe^tLg-Wq%TS^S&apx8z3Pk{u0!-jO@24(aUm z-sV1yG4aE|m=(Pxw)PDvlCoL;g~wa#&IC8+dz80$dyYCZzQh00_m|#9xchM8qm3mG zkF3ZFxU#eSdeWU~EuWefRV+9YzRHipj2t^G>goKp$L5C@$Hordn?L)-yfxDevHMnK zjy@H3FFjZ5-Mgto-*+=gk`xja5R>t1aiRb9#-%CIqbJ8)-LXwK=XPXYBknr-(p=s1 z5!S7!jDM`F?K0ZK_bo45u|dHT3L9ifT5Gt!gatB@Pe2U;n5T!r+2+^P{gsU*1?O$7#5qv_x* zuH}T)$QO{IMxZquy}1TW1p4P1ln4%`lN{4x!LhY)%hsZ|06l1=h_#?#4(;JUngvaO z5Y3?%`IB9BNJq?JB8K?AK#YqiK_pf>^?wNol=H7eC&Z?Vf_DHpYZFA`dK3lm*m{%z z&ThehjlHNBHs;rW_*T&RW`Hj3GEIN20R?af#Qv8BF%8WG4c87*eHp<=hHCiJ1U9pg zXUTy^G#kXUt;yg_zao@^uOJgJ&=gUV&=f#P4g}lW-z034i;1(9WY=T4I|++pRC}6{ z8gf9J$2AK*o8OG40Znfd-)d_!zZD{FLGZyMw3B+Ws6}WQpsyW>W{ZLOKnJx7qO?{7 zpJPI=CR`7qZKFwgTG2>QQ#2Wz#5NQJ4&31)DgyM9Q@6CC(GC<24(xG3yRb((S5FSM zBlx*M%G;4Yh`QT_lyoP0648O?0=>6GIO _publishTo(v) }, + sbtPlugin := false, + scalaVersion := "2.11.8", + ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }, + scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature"), + publishMavenStyle := true, + // NOTE: for stability + parallelExecution in Test := false, + publishArtifact in Test := false, + pomIncludeRepository := { x => false }, + transitiveClassifiers in Global := Seq(Artifact.SourceClassifier), + incOptions := incOptions.value.withNameHashing(true), + // NOTE: forking when testing doesn't work for some existing tests + // fork in Test := true, + logBuffered in Test := false, + // TODO: Fix warning - javaOptions will be ignored, fork is set to false + // javaOptions in Test ++= Seq("-Dskinny.env=test"), + updateOptions := updateOptions.value.withCachedResolution(true), + javacOptions ++= Seq("-source", "1.7", "-target", "1.7", "-encoding", "UTF-8", "-Xlint:-options"), + javacOptions in doc := Seq("-source", "1.7"), + pomExtra := _pomExtra +) + +// ----------------------------- +// skinny libraries + +lazy val common = (project in file("common")).settings(baseSettings).settings( + name := "skinny-common", + libraryDependencies <++= (scalaVersion) { (sv) => + jodaDependencies ++ testDependencies ++ Seq( + "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile, + // NOTE: 1.3.0 requires Java 8 or higher + "com.typesafe" % "config" % "1.2.1" % Compile, + "org.apache.lucene" % "lucene-core" % kuromojiVersion % Provided, + "org.apache.lucene" % "lucene-analyzers-common" % kuromojiVersion % Provided, + "org.apache.lucene" % "lucene-analyzers-kuromoji" % kuromojiVersion % Provided + ) ++ (sv match { + case v if v.startsWith("2.11.") => Seq("org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4" % Compile) + case _ => Nil + }) + } +) + +lazy val httpClient = (project in file("http-client")).settings(baseSettings).settings( + name := "skinny-http-client", + libraryDependencies ++= Seq( + "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile, + "org.specs2" %% "specs2-core" % "2.5" % Test, + "commons-fileupload" % "commons-fileupload" % "1.3.2" % Test, + "commons-io" % "commons-io" % commonsIoVersion % Test, + "commons-httpclient" % "commons-httpclient" % "3.1" % Test, + "javax.servlet" % "javax.servlet-api" % "3.0.1" % Test, + "org.eclipse.jetty" % "jetty-server" % jettyVersion % Test, + "org.eclipse.jetty" % "jetty-servlet" % jettyVersion % Test + ) ++ slf4jApiDependencies ++ testDependencies +) + +lazy val framework = (project in file("framework")).settings(baseSettings).settings( + name := "skinny-framework", + libraryDependencies <++= (scalaVersion) { (sv) => + Seq( + "org.skinny-framework" %% "skinny-micro" % skinnyMicroVersion % Compile, + "org.skinny-framework" %% "skinny-micro-scalate" % skinnyMicroVersion % Compile, + "commons-io" % "commons-io" % commonsIoVersion % Compile, + "org.scalatra" %% "scalatra-specs2" % scalatraTestVersion % Test, + "org.scalatra" %% "scalatra-scalatest" % scalatraTestVersion % Test + ) ++ compileScalateDependencies(sv) ++ servletApiDependencies ++ testDependencies + } +).dependsOn( + common, + json, + validator, + orm, + mailer, + httpClient, + worker +) + +lazy val worker = (project in file("worker")).settings(baseSettings).settings( + name := "skinny-worker", + libraryDependencies ++= jodaDependencies ++ testDependencies ++ Seq( + "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile + ) +) + +// just keeping compatibility with 1.x +lazy val standalone = (project in file("standalone")).settings(baseSettings).settings( + name := "skinny-standalone", + libraryDependencies += "org.skinny-framework" %% "skinny-micro-server" % skinnyMicroVersion % Compile +) + +lazy val assets = (project in file("assets")).settings(baseSettings).settings( + name := "skinny-assets", + libraryDependencies ++= Seq( + "ro.isdc.wro4j" % "rhino" % "1.7R5-20130223-1", + "commons-io" % "commons-io" % commonsIoVersion + ) ++ servletApiDependencies ++ testDependencies +).dependsOn( + framework, + test % Test +) + +lazy val task = (project in file("task")).settings(baseSettings).settings( + name := "skinny-task", + libraryDependencies ++= Seq( + "commons-io" % "commons-io" % commonsIoVersion % Compile, + "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile + ) ++ testDependencies +).dependsOn(orm % "provided->compile") + +lazy val orm = (project in file("orm")).settings(baseSettings).settings( + name := "skinny-orm", + libraryDependencies ++= scalikejdbcDependencies ++ servletApiDependencies ++ Seq( + "org.flywaydb" % "flyway-core" % "4.0.3" % Compile, + "org.hibernate" % "hibernate-core" % "5.2.1.Final" % Test + ) ++ testDependencies +).dependsOn(common) + +lazy val factoryGirl = (project in file("factory-girl")).settings(baseSettings).settings( + name := "skinny-factory-girl", + libraryDependencies <++= (scalaVersion) { (sv) => + scalikejdbcDependencies ++ Seq( + "org.scala-lang" % "scala-compiler" % sv + ) ++ testDependencies + } +).dependsOn(orm) + +lazy val freemarker = (project in file("freemarker")).settings(baseSettings).settings( + name := "skinny-freemarker", + libraryDependencies ++= servletApiDependencies ++ Seq( + "commons-beanutils" % "commons-beanutils" % "1.9.2" % Compile, + "org.freemarker" % "freemarker" % "2.3.23" % Compile, + "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test + ) ++ testDependencies +).dependsOn(framework) + +lazy val thymeleaf = (project in file("thymeleaf")).settings(baseSettings).settings( + name := "skinny-thymeleaf", + libraryDependencies ++= servletApiDependencies ++ Seq( + // TODO: thymeleaf 3 support + // see also https://github.com/ultraq/thymeleaf-layout-dialect/issues/68 + "org.thymeleaf" % "thymeleaf" % "2.1.4.RELEASE" % Compile, + "nz.net.ultraq.thymeleaf" % "thymeleaf-layout-dialect" % "1.4.0" % Compile exclude("org.thymeleaf", "thymeleaf"), + "net.sourceforge.nekohtml" % "nekohtml" % "1.9.22" % Compile, + "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test + ) ++ testDependencies +).dependsOn(framework) + +lazy val velocity = (project in file("velocity")).settings(baseSettings).settings( + name := "skinny-velocity", + libraryDependencies ++= servletApiDependencies ++ Seq( + "commons-logging" % "commons-logging" % "1.2" % Compile, + "org.apache.velocity" % "velocity" % "1.7" % Compile, + "org.apache.velocity" % "velocity-tools" % "2.0" % Compile excludeAll( + ExclusionRule("org.apache.velocity", "velocity"), + ExclusionRule("commons-loggin", "commons-logging") + ), + "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test + ) ++ testDependencies +).dependsOn(framework) + +lazy val scaldi = (project in file("scaldi")).settings(baseSettings).settings( + name := "skinny-scaldi", + libraryDependencies <++= (scalaVersion) { (sv) => + servletApiDependencies ++ Seq( + sv match { + case v if v.startsWith("2.10.") => "org.scaldi" %% "scaldi" % "0.3.2" + case _ => "org.scaldi" %% "scaldi" % "0.5.7" + }, + "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test + ) ++ testDependencies + } +).dependsOn(framework) + +// just keeping compatibility with 1.x +lazy val json = (project in file("json")).settings(baseSettings).settings( + name := "skinny-json", + libraryDependencies ++= Seq( + "org.skinny-framework" %% "skinny-micro-json4s" % skinnyMicroVersion % Compile + ) ++ testDependencies +) + +lazy val oauth2 = (project in file("oauth2")).settings(baseSettings).settings( + name := "skinny-oauth2", + libraryDependencies ++= Seq( + "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile, + "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % Compile exclude("org.slf4j", "slf4j-api") + ) ++ servletApiDependencies ++ testDependencies +).dependsOn(json) + +lazy val oauth2Controller = (project in file("oauth2-controller")).settings(baseSettings).settings( + name := "skinny-oauth2-controller", + libraryDependencies ++= servletApiDependencies ++ Seq( + "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test + ) ++ testDependencies +).dependsOn(framework, oauth2) + +lazy val twitterController = (project in file("twitter-controller")).settings(baseSettings).settings( + name := "skinny-twitter-controller", + libraryDependencies ++= Seq( + "org.twitter4j" % "twitter4j-core" % "4.0.4" % Compile, + "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test + ) ++ servletApiDependencies ++ testDependencies +).dependsOn(framework) + +lazy val validator = (project in file("validator")).settings(baseSettings).settings( + name := "skinny-validator", + libraryDependencies ++= jodaDependencies ++ testDependencies +).dependsOn(common) + +lazy val mailer = (project in file("mailer")).settings(baseSettings).settings( + name := "skinny-mailer", + libraryDependencies ++= mailDependencies ++ jodaDependencies ++ testDependencies +).dependsOn(common) + +lazy val test = (project in file("test")).settings(baseSettings).settings( + name := "skinny-test", + libraryDependencies ++= mailDependencies ++ testDependencies ++ Seq( + "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Compile, + "org.mockito" % "mockito-core" % mockitoVersion % Compile exclude("org.slf4j", "slf4j-api"), + "org.scalikejdbc" %% "scalikejdbc-test" % scalikeJDBCVersion % Compile exclude("org.slf4j", "slf4j-api") + ) +).dependsOn(framework) + +// ----------------------------- +// example and tests with a real project + +lazy val example = (project in file("example")).settings(baseSettings, servletSettings, scalateSettings).settings( + name := "skinny-framework-example", + libraryDependencies ++= Seq( + "com.h2database" % "h2" % h2Version, + "org.skinny-framework" % "skinny-logback" % skinnyLogbackVersion, + "org.scalatra" %% "scalatra-specs2" % scalatraTestVersion % Test, + "org.scalatra" %% "scalatra-scalatest" % scalatraTestVersion % Test, + "org.mockito" % "mockito-core" % mockitoVersion % Test, + "org.eclipse.jetty" % "jetty-webapp" % jettyVersion % "container", + "org.eclipse.jetty" % "jetty-plus" % jettyVersion % "container", + "javax.servlet" % "javax.servlet-api" % "3.0.1" % "container;provided;test" + ), + mainClass := Some("TaskLauncher"), + unmanagedClasspath in Test <+= (baseDirectory) map { bd => Attributed.blank(bd / "src/main/webapp") } +).dependsOn( + framework, + assets, + thymeleaf, + freemarker, + velocity, + factoryGirl, + test % Test, + task, + scaldi, + oauth2Controller, + twitterController +) + +// ----------------------------- +// common dependencies + +lazy val fullExclusionRules = Seq( + ExclusionRule("org.slf4j", "slf4j-api"), + ExclusionRule("joda-time", "joda-time"), + ExclusionRule("org.joda", "joda-convert"), + ExclusionRule("log4j", "log4j"), + ExclusionRule("org.slf4j", "slf4j-log4j12") +) +def compileScalateDependencies(sv: String) = Seq( + sv match { + case v if v.startsWith("2.11.") => "org.scalatra.scalate" %% "scalamd" % "1.6.1" % Compile + case _ => "org.fusesource.scalamd" %% "scalamd" % "1.6" % Compile + } + ) ++ Seq("org.scalatra.scalate" %% "scalate-core" % "1.7.1" % Compile excludeAll(fullExclusionRules: _*)) + +lazy val scalikejdbcDependencies = Seq( + "org.scalikejdbc" %% "scalikejdbc" % scalikeJDBCVersion % Compile excludeAll(fullExclusionRules: _*), + "org.scalikejdbc" %% "scalikejdbc-syntax-support-macro" % scalikeJDBCVersion % Compile excludeAll(fullExclusionRules: _*), + "org.scalikejdbc" %% "scalikejdbc-config" % scalikeJDBCVersion % Compile excludeAll(fullExclusionRules: _*), + "org.scalikejdbc" %% "scalikejdbc-test" % scalikeJDBCVersion % Test +) + +lazy val servletApiDependencies = Seq( + "javax.servlet" % "javax.servlet-api" % "3.0.1" % Provided +) +lazy val slf4jApiDependencies = Seq( + "org.slf4j" % "slf4j-api" % slf4jApiVersion % Compile +) +lazy val jodaDependencies = Seq( + "joda-time" % "joda-time" % "2.9.4" % Compile, + "org.joda" % "joda-convert" % "1.8.1" % Compile +) +lazy val mailDependencies = slf4jApiDependencies ++ Seq( + "javax.mail" % "mail" % "1.4.7" % Compile, + "org.jvnet.mock-javamail" % "mock-javamail" % "1.9" % Provided +) +lazy val testDependencies = Seq( + "org.scalatest" %% "scalatest" % scalaTestVersion % Test, + "org.mockito" % "mockito-core" % mockitoVersion % Test, + "ch.qos.logback" % "logback-classic" % logbackVersion % Test, + "org.jvnet.mock-javamail" % "mock-javamail" % "1.9" % Test, + "com.h2database" % "h2" % h2Version % Test, + "org.skinny-framework" % "skinny-logback" % skinnyLogbackVersion % Test, + "com.h2database" % "h2" % h2Version % Test +) + +def _publishTo(v: String) = { + val nexus = "https://oss.sonatype.org/" + if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots") + else Some("releases" at nexus + "service/local/staging/deploy/maven2") +} + +lazy val _pomExtra = { + http://skinny-framework.org/ + + + MIT License + http://www.opensource.org/licenses/mit-license.php + repo + + + + git@github.com:skinny-framework/skinny-framework.git + scm:git:git@github.com:skinny-framework/skinny-framework.git + + + + seratch + Kazuhiro Sera + http://git.io/sera + + + namutaka + namu + https://github.com/namutaka + + + Arakaki + Yusuke Arakaki + https://github.com/Arakaki + + + cb372 + Chris Birchall + https://github.com/cb372 + + + argius + argius + https://github.com/argius + + + gakuzzzz + Manabu Nakamura + https://github.com/gakuzzzz + + + BlackPrincess + BlackPrincess + https://github.com/BlackPrincess + + +} diff --git a/project/Build.scala b/project/Build.scala deleted file mode 100644 index 8b0f83e8..00000000 --- a/project/Build.scala +++ /dev/null @@ -1,436 +0,0 @@ -import sbt._, Keys._ -import skinny.scalate.ScalatePlugin._, ScalateKeys._ -import skinny.servlet._, ServletPlugin._, ServletKeys._ - -import scala.language.postfixOps - -object SkinnyFrameworkBuild extends Build { - - lazy val currentVersion = "2.2.0-RC1" - - lazy val skinnyMicroVersion = "1.1.0" - lazy val scalatraTestVersion = "2.4.1" - lazy val scalikeJDBCVersion = "2.4.2" - lazy val h2Version = "1.4.192" - lazy val kuromojiVersion = "6.1.0" - lazy val mockitoVersion = "1.10.19" - // Jetty 9.3 dropped Java 7 - lazy val jettyVersion = "9.2.17.v20160517" - lazy val logbackVersion = "1.1.7" - lazy val slf4jApiVersion = "1.7.21" - lazy val scalaTestVersion = "2.2.6" - lazy val commonsIoVersion = "2.5" - lazy val skinnyLogbackVersion = "1.0.9" - - lazy val baseSettings = Seq( - organization := "org.skinny-framework", - version := currentVersion, - dependencyOverrides += "org.slf4j" % "slf4j-api" % slf4jApiVersion, - resolvers ++= Seq( - "sonatype releases" at "https://oss.sonatype.org/content/repositories/releases" - //, "sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" - ), - publishTo <<= version { (v: String) => _publishTo(v) }, - sbtPlugin := false, - scalaVersion := "2.11.8", - ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }, - scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature"), - publishMavenStyle := true, - // NOTE: for stability - parallelExecution in Test := false, - publishArtifact in Test := false, - pomIncludeRepository := { x => false }, - transitiveClassifiers in Global := Seq(Artifact.SourceClassifier), - incOptions := incOptions.value.withNameHashing(true), - // NOTE: forking when testing doesn't work for some existing tests - // fork in Test := true, - logBuffered in Test := false, - // TODO: Fix warning - javaOptions will be ignored, fork is set to false - // javaOptions in Test ++= Seq("-Dskinny.env=test"), - updateOptions := updateOptions.value.withCachedResolution(true), - javacOptions ++= Seq("-source", "1.7", "-target", "1.7", "-encoding", "UTF-8", "-Xlint:-options"), - javacOptions in doc := Seq("-source", "1.7"), - pomExtra := _pomExtra - ) - - // ----------------------------- - // skinny libraries - - lazy val common = Project(id = "common", base = file("common"), - settings = baseSettings ++ Seq( - name := "skinny-common", - libraryDependencies <++= (scalaVersion) { (sv) => - jodaDependencies ++ testDependencies ++ Seq( - "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile, - // NOTE: 1.3.0 requires Java 8 or higher - "com.typesafe" % "config" % "1.2.1" % Compile, - "org.apache.lucene" % "lucene-core" % kuromojiVersion % Provided, - "org.apache.lucene" % "lucene-analyzers-common" % kuromojiVersion % Provided, - "org.apache.lucene" % "lucene-analyzers-kuromoji" % kuromojiVersion % Provided - ) ++ (sv match { - case v if v.startsWith("2.11.") => Seq("org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4" % Compile) - case _ => Nil - }) - } - ) - ) - - lazy val httpClient = Project(id = "httpClient", base = file("http-client"), - settings = baseSettings ++ Seq( - name := "skinny-http-client", - libraryDependencies ++= Seq( - "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile, - "org.specs2" %% "specs2-core" % "2.5" % Test, - "commons-fileupload" % "commons-fileupload" % "1.3.2" % Test, - "commons-io" % "commons-io" % commonsIoVersion % Test, - "commons-httpclient" % "commons-httpclient" % "3.1" % Test, - "javax.servlet" % "javax.servlet-api" % "3.0.1" % Test, - "org.eclipse.jetty" % "jetty-server" % jettyVersion % Test, - "org.eclipse.jetty" % "jetty-servlet" % jettyVersion % Test - ) ++ slf4jApiDependencies ++ testDependencies - ) - ) - - lazy val framework = Project(id = "framework", base = file("framework"), - settings = baseSettings ++ Seq( - name := "skinny-framework", - libraryDependencies <++= (scalaVersion) { (sv) => - Seq( - "org.skinny-framework" %% "skinny-micro" % skinnyMicroVersion % Compile, - "org.skinny-framework" %% "skinny-micro-scalate" % skinnyMicroVersion % Compile, - "commons-io" % "commons-io" % commonsIoVersion % Compile, - "org.scalatra" %% "scalatra-specs2" % scalatraTestVersion % Test, - "org.scalatra" %% "scalatra-scalatest" % scalatraTestVersion % Test - ) ++ compileScalateDependencies(sv) ++ servletApiDependencies ++ testDependencies - } - ) - ).dependsOn( - common, - json, - validator, - orm, - mailer, - httpClient, - worker - ) - - lazy val worker = Project(id = "worker", base = file("worker"), - settings = baseSettings ++ Seq( - name := "skinny-worker", - libraryDependencies ++= jodaDependencies ++ testDependencies ++ Seq( - "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile - ) - ) - ) - - // just keeping compatibility with 1.x - lazy val standalone = Project(id = "standalone", base = file("standalone"), - settings = baseSettings ++ Seq( - name := "skinny-standalone", - libraryDependencies += "org.skinny-framework" %% "skinny-micro-server" % skinnyMicroVersion % Compile - ) - ) - - lazy val assets = Project(id = "assets", base = file("assets"), - settings = baseSettings ++ Seq( - name := "skinny-assets", - libraryDependencies ++= Seq( - "ro.isdc.wro4j" % "rhino" % "1.7R5-20130223-1", - "commons-io" % "commons-io" % commonsIoVersion - ) ++ servletApiDependencies ++ testDependencies - ) - ).dependsOn( - framework, - test % Test - ) - - lazy val task = Project(id = "task", base = file("task"), - settings = baseSettings ++ Seq( - name := "skinny-task", - libraryDependencies ++= Seq( - "commons-io" % "commons-io" % commonsIoVersion % Compile, - "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile - ) ++ testDependencies - ) - ).dependsOn(orm % "provided->compile") - - lazy val orm = Project(id = "orm", base = file("orm"), - settings = baseSettings ++ Seq( - name := "skinny-orm", - libraryDependencies ++= scalikejdbcDependencies ++ servletApiDependencies ++ Seq( - "org.flywaydb" % "flyway-core" % "4.0.3" % Compile, - "org.hibernate" % "hibernate-core" % "5.2.1.Final" % Test - ) ++ testDependencies - ) - ).dependsOn(common) - - lazy val factoryGirl = Project(id = "factoryGirl", base = file("factory-girl"), - settings = baseSettings ++ Seq( - name := "skinny-factory-girl", - libraryDependencies <++= (scalaVersion) { (sv) => - scalikejdbcDependencies ++ Seq( - "org.scala-lang" % "scala-compiler" % sv - ) ++ testDependencies - } - ) - ).dependsOn(orm) - - lazy val freemarker = Project(id = "freemarker", base = file("freemarker"), - settings = baseSettings ++ Seq( - name := "skinny-freemarker", - libraryDependencies ++= servletApiDependencies ++ Seq( - "commons-beanutils" % "commons-beanutils" % "1.9.2" % Compile, - "org.freemarker" % "freemarker" % "2.3.23" % Compile, - "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test - ) ++ testDependencies - ) - ).dependsOn(framework) - - lazy val thymeleaf = Project(id = "thymeleaf", base = file("thymeleaf"), - settings = baseSettings ++ Seq( - name := "skinny-thymeleaf", - libraryDependencies ++= servletApiDependencies ++ Seq( - // TODO: thymeleaf 3 support - // see also https://github.com/ultraq/thymeleaf-layout-dialect/issues/68 - "org.thymeleaf" % "thymeleaf" % "2.1.4.RELEASE" % Compile, - "nz.net.ultraq.thymeleaf" % "thymeleaf-layout-dialect" % "1.4.0" % Compile exclude("org.thymeleaf", "thymeleaf"), - "net.sourceforge.nekohtml" % "nekohtml" % "1.9.22" % Compile, - "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test - ) ++ testDependencies - ) - ).dependsOn(framework) - - lazy val velocity = Project(id = "velocity", base = file("velocity"), - settings = baseSettings ++ Seq( - name := "skinny-velocity", - libraryDependencies ++= servletApiDependencies ++ Seq( - "commons-logging" % "commons-logging" % "1.2" % Compile, - "org.apache.velocity" % "velocity" % "1.7" % Compile, - "org.apache.velocity" % "velocity-tools" % "2.0" % Compile excludeAll( - ExclusionRule("org.apache.velocity", "velocity"), - ExclusionRule("commons-loggin", "commons-logging") - ), - "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test - ) ++ testDependencies - ) - ).dependsOn(framework) - - lazy val scaldi = Project(id = "scaldi", base = file("scaldi"), - settings = baseSettings ++ Seq( - name := "skinny-scaldi", - libraryDependencies <++= (scalaVersion) { (sv) => - servletApiDependencies ++ Seq( - sv match { - case v if v.startsWith("2.10.") => "org.scaldi" %% "scaldi" % "0.3.2" - case _ => "org.scaldi" %% "scaldi" % "0.5.7" - }, - "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test - ) ++ testDependencies - } - ) - ).dependsOn(framework) - - // just keeping compatibility with 1.x - lazy val json = Project(id = "json", base = file("json"), - settings = baseSettings ++ Seq( - name := "skinny-json", - libraryDependencies ++= Seq( - "org.skinny-framework" %% "skinny-micro-json4s" % skinnyMicroVersion % Compile - ) ++ testDependencies - ) - ) - - lazy val oauth2 = Project(id = "oauth2", base = file("oauth2"), - settings = baseSettings ++ Seq( - name := "skinny-oauth2", - libraryDependencies ++= Seq( - "org.skinny-framework" %% "skinny-micro-common" % skinnyMicroVersion % Compile, - "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % Compile exclude("org.slf4j", "slf4j-api") - ) ++ servletApiDependencies ++ testDependencies - ) - ).dependsOn(json) - - lazy val oauth2Controller = Project(id = "oauth2Controller", base = file("oauth2-controller"), - settings = baseSettings ++ Seq( - name := "skinny-oauth2-controller", - libraryDependencies ++= servletApiDependencies ++ Seq( - "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test - ) ++ testDependencies - ) - ).dependsOn(framework, oauth2) - - lazy val twitterController = Project(id = "twitterController", base = file("twitter-controller"), - settings = baseSettings ++ Seq( - name := "skinny-twitter-controller", - libraryDependencies ++= Seq( - "org.twitter4j" % "twitter4j-core" % "4.0.4" % Compile, - "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Test - ) ++ servletApiDependencies ++ testDependencies - ) - ).dependsOn(framework) - - lazy val validator = Project(id = "validator", base = file("validator"), - settings = baseSettings ++ Seq( - name := "skinny-validator", - libraryDependencies ++= jodaDependencies ++ testDependencies - ) - ).dependsOn(common) - - lazy val mailer = Project( id = "mailer", base = file("mailer"), - settings = baseSettings ++ Seq( - name := "skinny-mailer", - libraryDependencies ++= mailDependencies ++ jodaDependencies ++ testDependencies - ) - ).dependsOn(common) - - lazy val test = Project(id = "test", base = file("test"), - settings = baseSettings ++ Seq( - name := "skinny-test", - libraryDependencies ++= mailDependencies ++ testDependencies ++ Seq( - "org.skinny-framework" %% "skinny-micro-test" % skinnyMicroVersion % Compile, - "org.mockito" % "mockito-core" % mockitoVersion % Compile exclude("org.slf4j", "slf4j-api"), - "org.scalikejdbc" %% "scalikejdbc-test" % scalikeJDBCVersion % Compile exclude("org.slf4j", "slf4j-api") - ) - ) - ).dependsOn(framework) - - // ----------------------------- - // example and tests with a real project - - lazy val example = Project(id = "example", base = file("example"), - settings = baseSettings ++ servletSettings ++ scalateSettings ++ Seq( - name := "skinny-framework-example", - libraryDependencies ++= Seq( - "com.h2database" % "h2" % h2Version, - "org.skinny-framework" % "skinny-logback" % skinnyLogbackVersion, - "org.scalatra" %% "scalatra-specs2" % scalatraTestVersion % Test, - "org.scalatra" %% "scalatra-scalatest" % scalatraTestVersion % Test, - "org.mockito" % "mockito-core" % mockitoVersion % Test, - "org.eclipse.jetty" % "jetty-webapp" % jettyVersion % "container", - "org.eclipse.jetty" % "jetty-plus" % jettyVersion % "container", - "javax.servlet" % "javax.servlet-api" % "3.0.1" % "container;provided;test" - ), - mainClass := Some("TaskLauncher"), - unmanagedClasspath in Test <+= (baseDirectory) map { bd => Attributed.blank(bd / "src/main/webapp") } - ) - ).dependsOn( - framework, - assets, - thymeleaf, - freemarker, - velocity, - factoryGirl, - test % Test, - task, - scaldi, - oauth2Controller, - twitterController - ) - - // ----------------------------- - // common dependencies - - lazy val fullExclusionRules = Seq( - ExclusionRule("org.slf4j", "slf4j-api"), - ExclusionRule("joda-time", "joda-time"), - ExclusionRule("org.joda", "joda-convert"), - ExclusionRule("log4j", "log4j"), - ExclusionRule("org.slf4j", "slf4j-log4j12") - ) - def compileScalateDependencies(sv: String) = Seq( - sv match { - case v if v.startsWith("2.11.") => "org.scalatra.scalate" %% "scalamd" % "1.6.1" % Compile - case _ => "org.fusesource.scalamd" %% "scalamd" % "1.6" % Compile - } - ) ++ Seq("org.scalatra.scalate" %% "scalate-core" % "1.7.1" % Compile excludeAll(fullExclusionRules: _*)) - - lazy val scalikejdbcDependencies = Seq( - "org.scalikejdbc" %% "scalikejdbc" % scalikeJDBCVersion % Compile excludeAll(fullExclusionRules: _*), - "org.scalikejdbc" %% "scalikejdbc-syntax-support-macro" % scalikeJDBCVersion % Compile excludeAll(fullExclusionRules: _*), - "org.scalikejdbc" %% "scalikejdbc-config" % scalikeJDBCVersion % Compile excludeAll(fullExclusionRules: _*), - "org.scalikejdbc" %% "scalikejdbc-test" % scalikeJDBCVersion % Test - ) - - lazy val servletApiDependencies = Seq( - "javax.servlet" % "javax.servlet-api" % "3.0.1" % Provided - ) - lazy val slf4jApiDependencies = Seq( - "org.slf4j" % "slf4j-api" % slf4jApiVersion % Compile - ) - lazy val jodaDependencies = Seq( - "joda-time" % "joda-time" % "2.9.4" % Compile, - "org.joda" % "joda-convert" % "1.8.1" % Compile - ) - lazy val mailDependencies = slf4jApiDependencies ++ Seq( - "javax.mail" % "mail" % "1.4.7" % Compile, - "org.jvnet.mock-javamail" % "mock-javamail" % "1.9" % Provided - ) - lazy val testDependencies = Seq( - "org.scalatest" %% "scalatest" % scalaTestVersion % Test, - "org.mockito" % "mockito-core" % mockitoVersion % Test, - "ch.qos.logback" % "logback-classic" % logbackVersion % Test, - "org.jvnet.mock-javamail" % "mock-javamail" % "1.9" % Test, - "com.h2database" % "h2" % h2Version % Test, - "org.skinny-framework" % "skinny-logback" % skinnyLogbackVersion % Test, - "com.h2database" % "h2" % h2Version % Test - ) - - def _publishTo(v: String) = { - val nexus = "https://oss.sonatype.org/" - if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots") - else Some("releases" at nexus + "service/local/staging/deploy/maven2") - } - - lazy val _pomExtra = { - http://skinny-framework.org/ - - - MIT License - http://www.opensource.org/licenses/mit-license.php - repo - - - - git@github.com:skinny-framework/skinny-framework.git - scm:git:git@github.com:skinny-framework/skinny-framework.git - - - - seratch - Kazuhiro Sera - http://git.io/sera - - - namutaka - namu - https://github.com/namutaka - - - Arakaki - Yusuke Arakaki - https://github.com/Arakaki - - - cb372 - Chris Birchall - https://github.com/cb372 - - - argius - argius - https://github.com/argius - - - gakuzzzz - Manabu Nakamura - https://github.com/gakuzzzz - - - BlackPrincess - BlackPrincess - https://github.com/BlackPrincess - - - } - -} diff --git a/project/build.properties b/project/build.properties index 43b8278c..35c88bab 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.11 +sbt.version=0.13.12