aboutsummaryrefslogtreecommitdiffstats
path: root/container-test-jars
diff options
context:
space:
mode:
authorOlli Virtanen <olli.virtanen@oath.com>2018-05-24 13:22:11 +0200
committerOlli Virtanen <olli.virtanen@oath.com>2018-05-24 13:22:11 +0200
commit50c82b3a07061f636810f1f60b4923f216729d8f (patch)
treef34b281494332762e5b3cdc52842b185c2d3508f /container-test-jars
parent96ebcb01c2719dcf3f267aa2612878b564c7892e (diff)
Scala code converted to Java
Diffstat (limited to 'container-test-jars')
-rw-r--r--container-test-jars/jersey-resources/pom.xml26
-rw-r--r--container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/TestResource.java12
-rw-r--r--container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.java22
-rw-r--r--container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.java (renamed from container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.scala)13
-rw-r--r--container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.java (renamed from container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.scala)13
-rw-r--r--container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResource.scala10
-rw-r--r--container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.scala26
7 files changed, 48 insertions, 74 deletions
diff --git a/container-test-jars/jersey-resources/pom.xml b/container-test-jars/jersey-resources/pom.xml
index 33a3f03a962..2b6761e6411 100644
--- a/container-test-jars/jersey-resources/pom.xml
+++ b/container-test-jars/jersey-resources/pom.xml
@@ -16,11 +16,6 @@
<dependencies>
<dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-library</artifactId>
- </dependency>
-
- <dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>vespa_jersey2</artifactId>
<version>${project.version}</version>
@@ -31,27 +26,6 @@
<build>
<plugins>
<plugin>
- <groupId>net.alchim31.maven</groupId>
- <artifactId>scala-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>add-source</goal>
- <goal>compile</goal>
- <goal>testCompile</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <args>
- <arg>-unchecked</arg>
- <arg>-deprecation</arg>
- <arg>-feature</arg>
- </args>
- </configuration>
- </plugin>
-
- <plugin>
<groupId>com.yahoo.vespa</groupId>
<artifactId>bundle-plugin</artifactId>
<version>${project.version}</version>
diff --git a/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/TestResource.java b/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/TestResource.java
new file mode 100644
index 00000000000..59095d05567
--- /dev/null
+++ b/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/TestResource.java
@@ -0,0 +1,12 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.container.test.jars.jersey.resources;
+
+import javax.ws.rs.Path;
+
+/**
+ * @author Tony Vaagenes
+ * @author ollivir
+ */
+@Path("bundle-plugin-test/test-resource")
+public class TestResource extends TestResourceBase {
+}
diff --git a/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.java b/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.java
new file mode 100644
index 00000000000..c3724723252
--- /dev/null
+++ b/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.java
@@ -0,0 +1,22 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.container.test.jars.jersey.resources;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.Produces;
+import javax.ws.rs.GET;
+
+/**
+ * @author Tony Vaagenes
+ * @author ollivir
+ */
+public class TestResourceBase {
+ @GET
+ @Produces({MediaType.TEXT_PLAIN})
+ public String get() {
+ return content(getClass());
+ }
+
+ public static String content(Class<? extends TestResourceBase> clazz) {
+ return "Response from " + clazz.getName();
+ }
+}
diff --git a/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.scala b/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.java
index 440f2f45cea..ab1c1f8f229 100644
--- a/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.scala
+++ b/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.java
@@ -1,12 +1,13 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.test.jars.jersey.resources.nestedpackage1
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.container.test.jars.jersey.resources.nestedpackage1;
-import javax.ws.rs.Path
+import com.yahoo.container.test.jars.jersey.resources.TestResourceBase;
-import com.yahoo.container.test.jars.jersey.resources.TestResourceBase
+import javax.ws.rs.Path;
/**
- * @author tonytv
+ * @author Tony Vaagenes
*/
@Path("bundle-plugin-test/nested-test-resource1")
-class NestedTestResource1 extends TestResourceBase
+public class NestedTestResource1 extends TestResourceBase {
+}
diff --git a/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.scala b/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.java
index 5fa354dd647..0dfc9e1938b 100644
--- a/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.scala
+++ b/container-test-jars/jersey-resources/src/main/java/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.java
@@ -1,12 +1,13 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.test.jars.jersey.resources.nestedpackage2
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.container.test.jars.jersey.resources.nestedpackage2;
-import javax.ws.rs.Path
+import com.yahoo.container.test.jars.jersey.resources.TestResourceBase;
-import com.yahoo.container.test.jars.jersey.resources.TestResourceBase
+import javax.ws.rs.Path;
/**
- * @author tonytv
+ * @author Tony Vaagenes
*/
@Path("bundle-plugin-test/nested-test-resource2")
-class NestedTestResource2 extends TestResourceBase
+public class NestedTestResource2 extends TestResourceBase {
+}
diff --git a/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResource.scala b/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResource.scala
deleted file mode 100644
index b73a8735789..00000000000
--- a/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResource.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.test.jars.jersey.resources
-
-import javax.ws.rs.Path
-
-/**
- * @author tonytv
- */
-@Path("bundle-plugin-test/test-resource")
-class TestResource extends TestResourceBase
diff --git a/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.scala b/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.scala
deleted file mode 100644
index 5ccd89b30ac..00000000000
--- a/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.scala
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.test.jars.jersey.resources
-
-import javax.ws.rs.core.MediaType
-import javax.ws.rs.{Produces, GET}
-
-import scala.reflect.ClassTag
-
-/**
- * @author tonytv
- */
-class TestResourceBase {
- @GET
- @Produces(Array(MediaType.TEXT_PLAIN))
- def get() = TestResourceBase.content(getClass)
-}
-
-object TestResourceBase {
- def content(clazz: Class[_ <: TestResourceBase]): String =
- "Response from " + clazz.getName
-
- def content[T <: TestResourceBase](implicit classTag: ClassTag[T]): String = {
- val clazz = classTag.runtimeClass.asInstanceOf[Class[_ <: TestResourceBase]]
- content(clazz)
- }
-}