THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

152 lines
6.2 KiB

  1. import com.typesafe.config._
  2. import java.nio.file.Paths
  3. name := """yona"""
  4. version := "1.11.0"
  5. libraryDependencies ++= Seq(
  6. // Add your project dependencies here,
  7. javaCore,
  8. javaJdbc,
  9. javaEbean,
  10. javaWs,
  11. cache,
  12. // PlayAuthenticat for social login
  13. // https://github.com/joscha/play-authenticate
  14. "com.feth" %% "play-authenticate" % "0.6.9",
  15. // OWASP Java HTML Sanitizer
  16. // https://www.owasp.org/index.php/OWASP_Java_HTML_Sanitizer_Project
  17. "com.googlecode.owasp-java-html-sanitizer" % "owasp-java-html-sanitizer" % "20160628.1",
  18. // Add your project dependencies here,
  19. "com.h2database" % "h2" % "1.3.176",
  20. // JDBC driver for mariadb
  21. "org.mariadb.jdbc" % "mariadb-java-client" % "1.5.5",
  22. // Core Library
  23. "org.eclipse.jgit" % "org.eclipse.jgit" % "4.5.0.201609210915-r",
  24. // Smart HTTP Servlet
  25. "org.eclipse.jgit" % "org.eclipse.jgit.http.server" % "4.5.0.201609210915-r",
  26. // JGit Large File Storage
  27. "org.eclipse.jgit" % "org.eclipse.jgit.lfs" % "4.5.0.201609210915-r",
  28. // JGit Archive Formats
  29. "org.eclipse.jgit" % "org.eclipse.jgit.archive" % "4.5.0.201609210915-r",
  30. // svnkit
  31. "org.tmatesoft.svnkit" % "svnkit" % "1.8.15",
  32. // svnkit-dav
  33. "sonia.svnkit" % "svnkit-dav" % "1.8.15-scm1",
  34. // javahl
  35. "org.tmatesoft.svnkit" % "svnkit-javahl16" % "1.8.15",
  36. "net.sourceforge.jexcelapi" % "jxl" % "2.6.10",
  37. // shiro
  38. "org.apache.shiro" % "shiro-core" % "1.2.1",
  39. // commons-codec
  40. "commons-codec" % "commons-codec" % "1.2",
  41. // apache-mails
  42. "org.apache.commons" % "commons-email" % "1.2",
  43. "info.schleichardt" %% "play-2-mailplugin" % "0.9.1",
  44. "commons-lang" % "commons-lang" % "2.6",
  45. "org.apache.tika" % "tika-core" % "1.2",
  46. "commons-io" % "commons-io" % "2.4",
  47. "org.julienrf" %% "play-jsmessages" % "1.6.2",
  48. "commons-collections" % "commons-collections" % "3.2.1",
  49. "org.jsoup" % "jsoup" % "1.8.3",
  50. "com.googlecode.juniversalchardet" % "juniversalchardet" % "1.0.3",
  51. "org.mockito" % "mockito-all" % "1.10.19" % "test",
  52. "org.powermock" % "powermock-module-junit4" % "1.6.4" % "test",
  53. "org.powermock" % "powermock-api-mockito" % "1.6.4" % "test",
  54. "com.github.zafarkhaja" % "java-semver" % "0.7.2",
  55. "com.google.guava" % "guava" % "19.0",
  56. "com.googlecode.htmlcompressor" % "htmlcompressor" % "1.4",
  57. "org.springframework" % "spring-jdbc" % "4.1.5.RELEASE",
  58. "javax.xml.bind" % "jaxb-api" % "2.3.0"
  59. )
  60. libraryDependencies += "org.apache.subversion" % "svn-javahl-api" % "1.9.0"
  61. val projectSettings = Seq(
  62. // Add your own project settings here
  63. resolvers += "maven central" at "https://repo.maven.apache.org/maven2",
  64. resolvers += "jgit-repository" at "https://repo.eclipse.org/content/groups/releases/",
  65. resolvers += "java-semVer" at "https://oss.sonatype.org/content/repositories/snapshots/",
  66. resolvers += "scm-manager release repository" at "https://maven.scm-manager.org/nexus/content/groups/public",
  67. resolvers += "tmatesoft release repository" at "https://maven.tmatesoft.com/content/repositories/releases",
  68. resolvers += "tmatesoft snapshot repository" at "https://maven.tmatesoft.com/content/repositories/snapshots",
  69. resolvers += "julienrf.github.com" at "http://julienrf.github.com/repo/",
  70. resolvers += "opencast-public" at "http://nexus.opencast.org/nexus/content/repositories/public",
  71. resolvers += "jfrog" at "http://repo.jfrog.org/artifactory/libs-releases/",
  72. TwirlKeys.templateImports in Compile += "models.enumeration._",
  73. TwirlKeys.templateImports in Compile += "scala.collection.JavaConversions._",
  74. TwirlKeys.templateImports in Compile += "play.core.j.PlayMagicForJava._",
  75. TwirlKeys.templateImports in Compile += "java.lang._",
  76. TwirlKeys.templateImports in Compile += "java.util._",
  77. includeFilter in (Assets, LessKeys.less) := "*.less",
  78. excludeFilter in (Assets, LessKeys.less) := "_*.less",
  79. javaOptions in test ++= Seq("-Xmx2g", "-Xms1g", "-Dfile.encoding=UTF-8"),
  80. scalacOptions ++= Seq("-feature")
  81. )
  82. publishArtifact in packageDoc := false
  83. publishArtifact in packageSrc := false
  84. buildInfoSettings
  85. sourceGenerators in Compile <+= buildInfo
  86. buildInfoKeys := Seq[BuildInfoKey](name, version)
  87. buildInfoPackage := "yona"
  88. mappings in Universal :=
  89. (mappings in Universal).value.filterNot { case (_, file) => file.startsWith("conf/") }
  90. NativePackagerKeys.bashScriptExtraDefines += """# Added by build.sbt
  91. |[ -n "$YONA_HOME" ] && addJava "-Duser.dir=$YONA_HOME"
  92. |[ -z "$YONA_HOME" ] && YONA_HOME=$(cd "$(realpath "$(dirname "$(realpath "$0")")")/.."; pwd -P)
  93. |addJava "-Dyobi.home=$YONA_HOME"
  94. |
  95. |[ -z "$YONA_DATA" ] && YONA_DATA=$(cd "$(realpath "$(dirname "$(realpath "$0")")")/.."; pwd -P)
  96. |addJava "-Dyona.data=$YONA_DATA"
  97. |addJava "-Dapplication.home=$YONA_DATA"
  98. |
  99. |yobi_config_file="$YONA_DATA"/conf/application.conf
  100. |yobi_log_config_file="$YONA_DATA"/conf/application-logger.xml
  101. |[ -f "$yobi_config_file" ] && addJava "-Dconfig.file=$yobi_config_file"
  102. |[ -f "$yobi_log_config_file" ] && addJava "-Dlogger.file=$yobi_log_config_file"
  103. |
  104. |addJava "-DapplyEvolutions.default=true"
  105. |""".stripMargin
  106. NativePackagerKeys.batScriptExtraDefines += """
  107. | set "APP_CLASSPATH=%APP_LIB_DIR%\*"
  108. | if NOT "%YONA_DATA%" == "" set "YONA_OPTS=-DapplyEvolutions.default=true -Duser.dir=%YONA_HOME% -Dyona.data=%YONA_DATA% -Dconfig.file=%YONA_DATA%\conf\application.conf -Dlogger.file=%YONA_DATA%\conf\application-logger.xml"
  109. |""".stripMargin
  110. lazy val yobi = (project in file("."))
  111. .enablePlugins(PlayScala)
  112. .enablePlugins(SbtWeb)
  113. .enablePlugins(SbtTwirl)
  114. .settings(projectSettings: _*)
  115. .settings(net.virtualvoid.sbt.graph.Plugin.graphSettings: _*)
  116. .settings(de.johoop.findbugs4sbt.FindBugs.findbugsSettings: _*)
  117. .settings(findbugsExcludeFilters := Some(
  118. <FindBugsFilter>
  119. <!-- Exclude classes generated by PlayFramework. See docs/examples
  120. at http://findbugs.sourceforge.net/manual/filter.html for the
  121. filtering rules. -->
  122. <Match>
  123. <Class name="~views\.html\..*"/>
  124. </Match>
  125. <Match>
  126. <Class name="~Routes.*"/>
  127. </Match>
  128. <Match>
  129. <Class name="~controllers\.routes.*"/>
  130. </Match>
  131. </FindBugsFilter>
  132. )
  133. )
  134. fork in run := true