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