From 7e71d1c86f44617cfd09caedff1107bdcf27b255 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 16 Apr 2020 17:07:59 +0200 Subject: Add Scala compiler. Change-Id: I68ffcf35b1b6ea2e42a479bdb71f868a486781db --- pom.xml | 90 ++++++++++++++++++++++ .../eu/mulk/mulkcms2/cms/about/AboutResource.java | 23 ------ .../eu/mulk/mulkcms2/cms/about/AboutResource.scala | 21 +++++ 3 files changed, 111 insertions(+), 23 deletions(-) delete mode 100644 src/main/java/eu/mulk/mulkcms2/cms/about/AboutResource.java create mode 100644 src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.scala diff --git a/pom.xml b/pom.xml index 5f7a1f1..c5261ca 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,8 @@ 11 11 + 2.13.3 + UTF-8 UTF-8 @@ -21,6 +23,7 @@ 1.7.0.Final 3.1.0 2.0.1 + 4.4.0 quarkus-bom @@ -35,6 +38,7 @@ 1.6.1 5.6.0 1.13.1 + 1.4.0 3.9.0 42.2.14 1.15.0 @@ -121,10 +125,25 @@ + + org.scala-lang + scala-library + ${scala.version} + + + org.scala-lang + scala-reflect + ${scala.version} + + io.quarkus quarkus-agroal + + io.quarkus + quarkus-scala + io.quarkus quarkus-elytron-security-properties-file @@ -368,6 +387,77 @@ + + net.alchim31.maven + scala-maven-plugin + ${scala-plugin.version} + + + + scala-compile-first + process-resources + + add-source + compile + + + + scala-test-compile + process-test-resources + + add-source + testCompile + + + + + + ${scala.version} + false + + + -Xsource:3 + + + + + -Xlint:deprecation + + + + + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + + + + + io.quarkus + quarkus-panache-common + ${quarkus.version} + + + + + org.jetbrains.kotlin + kotlin-annotations-jvm + ${kotlin-annotations.version} + + + + + + + diff --git a/src/main/java/eu/mulk/mulkcms2/cms/about/AboutResource.java b/src/main/java/eu/mulk/mulkcms2/cms/about/AboutResource.java deleted file mode 100644 index 39ecaca..0000000 --- a/src/main/java/eu/mulk/mulkcms2/cms/about/AboutResource.java +++ /dev/null @@ -1,23 +0,0 @@ -package eu.mulk.mulkcms2.cms.about; - -import static javax.ws.rs.core.MediaType.TEXT_HTML; - -import io.quarkus.qute.Template; -import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.ResourcePath; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; - -@Path("/about") -public class AboutResource { - - @ResourcePath("benki/about/index.html") - Template index; - - @GET - @Produces(TEXT_HTML) - public TemplateInstance getIndex() { - return index.instance(); - } -} diff --git a/src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.scala b/src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.scala new file mode 100644 index 0000000..0d70f53 --- /dev/null +++ b/src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.scala @@ -0,0 +1,21 @@ +package eu.mulk.mulkcms2.cms.about; + +import io.quarkus.qute.Template; +import io.quarkus.qute.TemplateInstance; +import io.quarkus.qute.api.ResourcePath; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +@Path("/about") +class AboutResource { + + @ResourcePath("benki/about/index.html") + var index: Template = null; + + @GET + @Produces(Array(MediaType.TEXT_HTML)) + def getIndex(): TemplateInstance = + index.instance(); +} -- cgit v1.2.3