diff options
-rw-r--r-- | pom.xml | 77 | ||||
-rw-r--r-- | src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.java | 22 | ||||
-rw-r--r-- | src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.scala | 18 |
3 files changed, 22 insertions, 95 deletions
@@ -13,8 +13,6 @@ <maven.compiler.source>11</maven.compiler.source> <maven.compiler.target>11</maven.compiler.target> - <scala.version>2.13.3</scala.version> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> @@ -23,9 +21,7 @@ <processor-plugin.version>4.2</processor-plugin.version> <quarkus.version>1.7.0.Final</quarkus.version> <resources-plugin.version>3.1.0</resources-plugin.version> - <scalafmt.version>2.6.3</scalafmt.version> <spotless-plugin.version>2.0.3</spotless-plugin.version> - <scala-plugin.version>4.4.0</scala-plugin.version> <!-- <quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id> --> <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> @@ -128,31 +124,11 @@ <dependencies> <dependency> - <groupId>org.scala-lang</groupId> - <artifactId>scala-library</artifactId> - <version>${scala.version}</version> - </dependency> - <dependency> - <groupId>org.scala-lang</groupId> - <artifactId>scala-reflect</artifactId> - <version>${scala.version}</version> - </dependency> - <dependency> - <groupId>org.scala-lang</groupId> - <artifactId>scala-compiler</artifactId> - <version>${scala.version}</version> - </dependency> - - <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-agroal</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> - <artifactId>quarkus-scala</artifactId> - </dependency> - <dependency> - <groupId>io.quarkus</groupId> <artifactId>quarkus-elytron-security-properties-file</artifactId> </dependency> <dependency> @@ -372,13 +348,6 @@ <style>GOOGLE</style> </googleJavaFormat> </java> - - <scala> - <scalafmt> - <version>${scalafmt.version}</version> - <file>${basedir}/.scalafmt.conf</file> - </scalafmt> - </scala> </configuration> </plugin> @@ -422,52 +391,6 @@ </executions> </plugin> - <plugin> - <groupId>net.alchim31.maven</groupId> - <artifactId>scala-maven-plugin</artifactId> - <version>${scala-plugin.version}</version> - - <executions> - <execution> - <id>scala-compile-first</id> - <phase>process-resources</phase> - <goals> - <goal>add-source</goal> - <goal>compile</goal> - </goals> - </execution> - <execution> - <id>scala-test-compile</id> - <phase>process-test-resources</phase> - <goals> - <goal>add-source</goal> - <goal>testCompile</goal> - </goals> - </execution> - </executions> - - <configuration> - <scalaVersion>${scala.version}</scalaVersion> - <localInstall>false</localInstall> - <!--<recompileMode>incremental</recompileMode>--> - <args> - <arg>-Xsource:3</arg> - <!-- - <arg>-deprecation</arg> - <arg>-feature</arg> - <arg>-explaintypes</arg> - <arg>-target:jvm-1.8</arg> - --> - </args> - - <javacArgs> - <javacArg>-Xlint:deprecation</javacArg> - <javacArg>-proc:none</javacArg> - </javacArgs> - </configuration> - - </plugin> - </plugins> <resources> diff --git a/src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.java b/src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.java new file mode 100644 index 0000000..a1da033 --- /dev/null +++ b/src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.java @@ -0,0 +1,22 @@ +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") +public class AboutResource { + + @ResourcePath("benki/about/index.html") + Template index; + + @GET + @Produces(MediaType.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 deleted file mode 100644 index f7b3261..0000000 --- a/src/main/scala/eu/mulk/mulkcms2/cms/about/AboutResource.scala +++ /dev/null @@ -1,18 +0,0 @@ -package eu.mulk.mulkcms2.cms.about - -import io.quarkus.qute.{Template, TemplateInstance} -import io.quarkus.qute.api.ResourcePath -import javax.ws.rs.{GET, Path, Produces} -import javax.ws.rs.core.MediaType - -@Path("/about") -class AboutResource { - - @ResourcePath("benki/about/index.html") - var index: Template = _ - - @GET - @Produces(Array(MediaType.TEXT_HTML)) - def getIndex: TemplateInstance = - index.instance() -} |