conversion from Java to Scala

This commit is contained in:
2019-08-10 13:31:44 +01:00
parent 1cc066d3f0
commit 49734bf6d1
42 changed files with 1320 additions and 1584 deletions

View File

@@ -10,16 +10,40 @@ version := "2.0"
resolvers += Resolver.mavenLocal
libraryDependencies += "org.tukaani" % "xz" % "1.6"
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.25"
libraryDependencies += "org.hibernate" % "hibernate-jpamodelgen" % "5.4.2.Final" % Provided
libraryDependencies += "org.apache.commons" % "commons-compress" % "1.14"
libraryDependencies += "org.projectlombok" % "lombok" % "1.18.8" % Provided
libraryDependencies += "javax" % "javaee-api" % "7.0" % Provided
libraryDependencies += "org.hibernate" % "hibernate-jpamodelgen" % "5.3.6.Final" % Provided
libraryDependencies += "junit" % "junit" % "4.12" % Test
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test
libraryDependencies += "com.thoughtworks.xstream" % "xstream" % "1.4.10" % Test
libraryDependencies += "commons-io" % "commons-io" % "2.5" % Test
libraryDependencies += "org.jboss" % "jboss-ejb-client" % "4.0.0.CR5" % Test
libraryDependencies += "org.jboss" % "jboss-ejb-client" % "4.0.18.Final" % Test
libraryDependencies += "org.apache.logging.log4j" % "log4j-slf4j-impl" % "2.11.2" % Test
libraryDependencies += "org.apache.logging.log4j" % "log4j-core" % "2.11.2" % Test
libraryDependencies += "org.apache.logging.log4j" % "log4j-api" % "2.11.2" % Test
//libraryDependencies += "org.jboss.resteasy" % "resteasy-undertow" % "3.0.4.Final" % Test
//libraryDependencies += "io.undertow" % "undertow-core" % "2.0.20.Final" % Test
//libraryDependencies += "io.undertow" % "undertow-servlet" % "2.0.20.Final" % Test
//libraryDependencies += "org.jboss.weld.servlet" % "weld-servlet-core" % "3.1.1.Final" % Test
libraryDependencies += "org.jboss.weld.se" % "weld-se-core" % "3.1.1.Final" % Test
libraryDependencies += "com.h2database" % "h2" % "1.4.197" % Test
libraryDependencies += "org.hibernate" % "hibernate-core" % "5.3.6.Final" % Test
//libraryDependencies += "io.smallrye" % "smallrye-config" % "1.3.5" % Test
//libraryDependencies += "org.jboss.logging" % "jboss-logging-processor" % "2.2.0.Final" % Test
//libraryDependencies += "org.eclipse.microprofile.config" % "microprofile-config-api" % "1.3" % Test
//libraryDependencies += "org.jboss.spec.javax.ws.rs" % "jboss-jaxrs-api_2.1_spec" % "1.0.2.Final" % Test
//libraryDependencies += "org.reactivestreams" % "reactive-streams" % "1.0.2" % Test
//libraryDependencies += "org.jboss.spec.javax.xml.bind" % "jboss-jaxb-api_2.3_spec" % "1.0.1.Final" % Test
//libraryDependencies += "javax.activation" % "activation" % "1.1.1" % Test
//libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final" % Test
//
//libraryDependencies += "org.jboss.resteasy" % "resteasy-cdi" % "4.0.0.Final" % Test
libraryDependencies += "org.jboss.resteasy" % "resteasy-jaxrs" % "3.0.11.Final" % Test
libraryDependencies += "org.jboss.resteasy" % "resteasy-client" % "3.0.11.Final" % Test
libraryDependencies += "org.jboss.resteasy" % "resteasy-jackson-provider" % "3.0.11.Final" % Test
@@ -32,6 +56,7 @@ enablePlugins(NimPlugin)
nimCompilerParameters in CompileNim := Seq("-d:release", "-d:serverURL=")
sources in CompileNim := Seq(baseDirectory.value / "nim" / "src" / "jpacrepo.nim")
//fork in Test := true
webappWebInfClasses := true
webappPostProcess := {
@@ -46,17 +71,17 @@ webappPostProcess := {
}
}
lazy val dataSourceJNDI = SettingKey[String]("datasource-jndi", "JNDI name of the application datasource")
lazy val dataBaseAction = SettingKey[String]("database-action",
lazy val datasourceJNDI = SettingKey[String]("datasource-jndi", "JNDI name of the application datasource")
lazy val databaseAction = SettingKey[String]("database-action",
"value of the property \"javax.persistence.schema-generation.database.action\" in the persistence unit")
dataSourceJNDI := "java:/PostgresDS"
dataBaseAction := "none"
datasourceJNDI := "java:/PostgresDS"
databaseAction := "none"
resourceGenerators in Compile += Def.task({
Seq(IO.configureFile(
(sourceDirectory in Compile).value / "resources-template" / "persistence.xml",
(resourceManaged in Compile).value / "META-INF" / "persistence.xml",
Map("dataSourceJNDI" -> dataSourceJNDI.value,
"dataBaseAction" -> dataBaseAction.value)))
Map("dataSourceJNDI" -> datasourceJNDI.value,
"dataBaseAction" -> databaseAction.value)))
}).taskValue