summaryrefslogtreecommitdiffstats
path: root/container-test-jars
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
commit72231250ed81e10d66bfe70701e64fa5fe50f712 (patch)
tree2728bba1131a6f6e5bdf95afec7d7ff9358dac50 /container-test-jars
Publish
Diffstat (limited to 'container-test-jars')
-rw-r--r--container-test-jars/bundle-with-provided-bundle/pom.xml75
-rw-r--r--container-test-jars/jersey-resources/pom.xml62
-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
-rw-r--r--container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage1/NestedTestResource1.scala12
-rw-r--r--container-test-jars/jersey-resources/src/main/scala/com/yahoo/container/test/jars/jersey/resources/nestedpackage2/NestedTestResource2.scala12
-rw-r--r--container-test-jars/pom.xml22
7 files changed, 219 insertions, 0 deletions
diff --git a/container-test-jars/bundle-with-provided-bundle/pom.xml b/container-test-jars/bundle-with-provided-bundle/pom.xml
new file mode 100644
index 00000000000..8f37f4041f2
--- /dev/null
+++ b/container-test-jars/bundle-with-provided-bundle/pom.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.yahoo.container.container-test-jars</groupId>
+ <artifactId>container-test-jars</artifactId>
+ <version>6-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>bundle-with-provided-bundle</artifactId>
+ <packaging>container-plugin</packaging>
+ <description>
+ This will trigger bugs in our bundle plugins that assumes that artifact.getFile is a jar file.
+ Normally, artifact.getFile points to a jar file,
+ but in multi-module projects when running phases not including package,
+ this will be a directory.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.yahoo.container.container-test-jars</groupId>
+ <artifactId>jersey-resources</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <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>
+ <scope>provided</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.scala-tools</groupId>
+ <artifactId>maven-scala-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>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
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 @@
+<?xml version="1.0"?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.yahoo.container.container-test-jars</groupId>
+ <artifactId>container-test-jars</artifactId>
+ <version>6-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>jersey-resources</artifactId>
+ <packaging>container-plugin</packaging>
+
+ <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>
+ <scope>provided</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.scala-tools</groupId>
+ <artifactId>maven-scala-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>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
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
diff --git a/container-test-jars/pom.xml b/container-test-jars/pom.xml
new file mode 100644
index 00000000000..9d14c4b3de2
--- /dev/null
+++ b/container-test-jars/pom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.yahoo.vespa</groupId>
+ <artifactId>parent</artifactId>
+ <version>6-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+ <groupId>com.yahoo.container.container-test-jars</groupId>
+ <artifactId>container-test-jars</artifactId>
+ <version>6-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>jersey-resources</module>
+ <module>bundle-with-provided-bundle</module>
+ </modules>
+</project>