summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle20
-rw-r--r--src/main/java/eu/mulk/mulkcms2/web/ExampleResource.java14
-rw-r--r--src/main/scala/eu/mulk/mulkcms2/ExampleResource.scala12
-rw-r--r--src/native-test/scala/eu/mulk/mulkcms2/NativeExampleResourceIT.scala6
-rw-r--r--src/test/scala/eu/mulk/mulkcms2/ExampleResourceTest.scala21
5 files changed, 14 insertions, 59 deletions
diff --git a/build.gradle b/build.gradle
index 3ab28f4..5cc19c9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,4 @@
plugins {
- id 'scala'
id 'java'
id 'io.quarkus'
id "com.diffplug.gradle.spotless" version "${spotlessPluginVersion}"
@@ -10,25 +9,6 @@ plugins {
sourceCompatibility = 11
targetCompatibility = 11
-sourceSets {
- main {
- scala {
- srcDirs = ['src/main/scala', 'src/main/java']
- }
- java {
- srcDirs = []
- }
- }
- test {
- scala {
- srcDirs = ['src/test/scala', 'src/test/java']
- }
- java {
- srcDirs = []
- }
- }
-}
-
repositories {
mavenLocal()
mavenCentral()
diff --git a/src/main/java/eu/mulk/mulkcms2/web/ExampleResource.java b/src/main/java/eu/mulk/mulkcms2/web/ExampleResource.java
new file mode 100644
index 0000000..4951eb4
--- /dev/null
+++ b/src/main/java/eu/mulk/mulkcms2/web/ExampleResource.java
@@ -0,0 +1,14 @@
+package eu.mulk.mulkcms2.web;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+public class ExampleResource {
+
+ @GET
+ @Produces({MediaType.TEXT_PLAIN})
+ public String hello() {
+ return "hello!";
+ }
+}
diff --git a/src/main/scala/eu/mulk/mulkcms2/ExampleResource.scala b/src/main/scala/eu/mulk/mulkcms2/ExampleResource.scala
deleted file mode 100644
index 6a2db1a..0000000
--- a/src/main/scala/eu/mulk/mulkcms2/ExampleResource.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-package eu.mulk.mulkcms2
-
-import javax.ws.rs.core.MediaType
-import javax.ws.rs.{GET, Path, Produces}
-
-@Path("/hello")
-class ExampleResource {
-
- @GET
- @Produces(Array[String](MediaType.TEXT_PLAIN))
- def hello() = "hello!"
-}
diff --git a/src/native-test/scala/eu/mulk/mulkcms2/NativeExampleResourceIT.scala b/src/native-test/scala/eu/mulk/mulkcms2/NativeExampleResourceIT.scala
deleted file mode 100644
index 9ad5288..0000000
--- a/src/native-test/scala/eu/mulk/mulkcms2/NativeExampleResourceIT.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package eu.mulk.mulkcms2
-
-import io.quarkus.test.junit.NativeImageTest
-
-@NativeImageTest
-class NativeExampleResourceIT extends ExampleResourceTest
diff --git a/src/test/scala/eu/mulk/mulkcms2/ExampleResourceTest.scala b/src/test/scala/eu/mulk/mulkcms2/ExampleResourceTest.scala
deleted file mode 100644
index 9b86f27..0000000
--- a/src/test/scala/eu/mulk/mulkcms2/ExampleResourceTest.scala
+++ /dev/null
@@ -1,21 +0,0 @@
-package eu.mulk.mulkcms2
-
-import io.quarkus.test.junit.QuarkusTest
-import io.restassured.RestAssured.given
-import org.hamcrest.CoreMatchers.`is`
-import org.junit.jupiter.api.Test
-
-@QuarkusTest
-class ExampleResourceTest {
-
- @Test
- def testHelloEndpoint() = {
- given()
- .`when`()
- .get("/hello")
- .`then`()
- .statusCode(200)
- .body(`is`("hello"))
- }
-
-}