From 72231250ed81e10d66bfe70701e64fa5fe50f712 Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Wed, 15 Jun 2016 23:09:44 +0200 Subject: Publish --- container-test-jars/jersey-resources/pom.xml | 62 ++++++++++++++++++++++ .../test/jars/jersey/resources/TestResource.scala | 10 ++++ .../jars/jersey/resources/TestResourceBase.scala | 26 +++++++++ .../nestedpackage1/NestedTestResource1.scala | 12 +++++ .../nestedpackage2/NestedTestResource2.scala | 12 +++++ 5 files changed, 122 insertions(+) create mode 100644 container-test-jars/jersey-resources/pom.xml create mode 100644 container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResource.scala create mode 100644 container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.scala create mode 100644 container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.scala create mode 100644 container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.scala (limited to 'container-test-jars/jersey-resources') diff --git a/container-test-jars/jersey-resources/pom.xml b/container-test-jars/jersey-resources/pom.xml new file mode 100644 index 00000000000..5ab4a2480a8 --- /dev/null +++ b/container-test-jars/jersey-resources/pom.xml @@ -0,0 +1,62 @@ + + + + 4.0.0 + + com.yahoo.container.container-test-jars + container-test-jars + 6-SNAPSHOT + + + jersey-resources + container-plugin + + + + org.scala-lang + scala-library + + + + com.yahoo.vespa + vespa_jersey2 + ${project.version} + provided + pom + + + + + + org.scala-tools + maven-scala-plugin + + + + add-source + compile + testCompile + + + + + + -unchecked + -deprecation + -feature + + + + + + com.yahoo.vespa + bundle-plugin + ${project.version} + true + + + + 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 new file mode 100644 index 00000000000..46e15f23b06 --- /dev/null +++ b/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResource.scala @@ -0,0 +1,10 @@ +// Copyright 2016 Yahoo Inc. 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 new file mode 100644 index 00000000000..b9c19af8892 --- /dev/null +++ b/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/TestResourceBase.scala @@ -0,0 +1,26 @@ +// Copyright 2016 Yahoo Inc. 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) + } +} 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/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.scala new file mode 100644 index 00000000000..99cfbba8e16 --- /dev/null +++ b/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.scala @@ -0,0 +1,12 @@ +// Copyright 2016 Yahoo Inc. 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 + +/** + * @author tonytv + */ +@Path("bundle-plugin-test/nested-test-resource1") +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/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.scala new file mode 100644 index 00000000000..1c8d289b1f2 --- /dev/null +++ b/container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.scala @@ -0,0 +1,12 @@ +// Copyright 2016 Yahoo Inc. 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 + +/** + * @author tonytv + */ +@Path("bundle-plugin-test/nested-test-resource2") +class NestedTestResource2 extends TestResourceBase -- cgit v1.2.3