version updates
diff --git a/.gitignore b/.gitignore
index b59638f..ed4d3bc 100755
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@
*.iml
*.log
*~
+*.diff
+*.patch
diff --git a/README.adoc b/README.adoc
index 8895239..ada3e57 100644
--- a/README.adoc
+++ b/README.adoc
@@ -17,7 +17,7 @@
Here's what it provides:
-0. A pom.xml with the dependencies for this sample and meecrowave-maven-plugin setup so you can launch `mvn package meecrowave-run`.
+0. A pom.xml with the dependencies for this sample and meecrowave-maven-plugin setup so you can launch `mvn package meecrowave:run`.
1. A sample JAX-RS application: in src/main/java/com/superbiz/sample/jaxrs
2. A test using JAX-RS client API and the meecrowave mono rule (useful when you run multiple tests) in src/test/java/com/superbiz/sample/jaxrs
3. in src/main/java/com/superbiz/configuration/Defaults some enrichment of the meecrowave Cli options for the application.
diff --git a/docker/pom.xml b/docker/pom.xml
index bfe20c8..5fe54e6 100644
--- a/docker/pom.xml
+++ b/docker/pom.xml
@@ -5,7 +5,7 @@
<parent>
<artifactId>meecrowave-examples</artifactId>
<groupId>org.apache.meecrowave</groupId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/mw_bundle_config/pom.xml b/mw_bundle_config/pom.xml
index 4c0d06d..2ece0c1 100644
--- a/mw_bundle_config/pom.xml
+++ b/mw_bundle_config/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.meecrowave</groupId>
<artifactId>meecrowave-examples</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
</parent>
<artifactId>samples-bundle-config</artifactId>
diff --git a/pom.xml b/pom.xml
index d553529..dcda711 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.meecrowave</groupId>
<artifactId>meecrowave-examples</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Meecrowave Examples</name>
@@ -37,6 +37,7 @@
<modules>
<module>rest-trivial</module>
+ <module>rest-trivial-kotlin</module>
<module>rest</module>
<module>servlet-trivial</module>
<module>mw_bundle_config</module>
@@ -46,7 +47,7 @@
</modules>
<properties>
- <meecrowave.version>1.2.3</meecrowave.version>
+ <meecrowave.version>1.2.5</meecrowave.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
@@ -66,8 +67,6 @@
</properties>
-
-
<!-- Just to disable any accidential deployment to maven.central -->
<distributionManagement>
<repository>
@@ -79,4 +78,17 @@
<url>file://${basedir}/target/snapshot-repo/</url>
</snapshotRepository>
</distributionManagement>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>versions-maven-plugin</artifactId>
+ <version>2.7</version>
+ </plugin>
+ </plugins>
+ </build>
+
+
</project>
diff --git a/rest-trivial-kotlin/README.adoc b/rest-trivial-kotlin/README.adoc
new file mode 100644
index 0000000..7cd08ea
--- /dev/null
+++ b/rest-trivial-kotlin/README.adoc
@@ -0,0 +1,11 @@
+= Apache Meecrowave
+
+== Trivial REST Example (rewritten in Kotlin)
+
+This example shows probably the smallest JavaEE REST Service.
+It is the REST version of the famous 'Hello World' program.
+It contains just a link:src/main/kotlin/com/superbiz/jaxrs/HelloEndpoint.kt[Hello Resource].
+The important part of this class are the `@Path("helloKotlin")` and the `@GET' annotated method.
+
+Note that the Resource is a CDI bean annotated with `@ApplicationScoped`.
+Thus only one instance exists.
diff --git a/rest-trivial-kotlin/pom.xml b/rest-trivial-kotlin/pom.xml
new file mode 100644
index 0000000..5fbca25
--- /dev/null
+++ b/rest-trivial-kotlin/pom.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ 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>org.apache.meecrowave</groupId>
+ <artifactId>meecrowave-examples</artifactId>
+ <version>1.2.5-SNAPSHOT</version>
+ </parent>
+
+
+ <artifactId>samples-rest-trivial-kotlin</artifactId>
+ <name>REST (trivial) - Kotlin</name>
+
+ <properties>
+ <!--<kotlin.version>1.2.71</kotlin.version>-->
+ <kotlin.version>1.3.11</kotlin.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib-jdk8</artifactId>
+ <version>${kotlin.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-test-junit</artifactId>
+ <version>${kotlin.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+
+ <!-- this package contains the javax APIs for CDI, JAX-RS, JSONP, JSONB and Servlet4 -->
+ <dependency>
+ <groupId>org.apache.meecrowave</groupId>
+ <artifactId>meecrowave-specs-api</artifactId>
+ <version>${meecrowave.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.meecrowave</groupId>
+ <artifactId>meecrowave-core</artifactId>
+ <version>${meecrowave.version}</version>
+ </dependency>
+
+ <!-- our test dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit4.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.meecrowave</groupId>
+ <artifactId>meecrowave-junit</artifactId>
+ <version>${meecrowave.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <!--
+ For starting meecrowave via Maven. Just run
+ $> mvn clean install meecrowave:run
+ -->
+ <groupId>org.apache.meecrowave</groupId>
+ <artifactId>meecrowave-maven-plugin</artifactId>
+ <version>${meecrowave.version}</version>
+ </plugin>
+
+ <plugin>
+ <artifactId>kotlin-maven-plugin</artifactId>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <version>${kotlin.version}</version>
+ <configuration>
+ <compilerPlugins>
+ <plugin>all-open</plugin>
+ </compilerPlugins>
+ <pluginOptions>
+ <option>all-open:annotation=javax.enterprise.context.ApplicationScoped</option>
+ </pluginOptions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>compile</id>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <sourceDirs>
+ <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
+ <sourceDir>${project.basedir}/src/main/java</sourceDir>
+ </sourceDirs>
+ </configuration>
+ </execution>
+ <execution>
+ <id>test-compile</id>
+ <goals>
+ <goal>test-compile</goal>
+ </goals>
+ <configuration>
+ <sourceDirs>
+ <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
+ <sourceDir>${project.basedir}/src/test/java</sourceDir>
+ </sourceDirs>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-maven-allopen</artifactId>
+ <version>${kotlin.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <!-- Replacing default-compile as it is treated specially by maven -->
+ <execution>
+ <id>default-compile</id>
+ <phase>none</phase>
+ </execution>
+ <!-- Replacing default-testCompile as it is treated specially by maven -->
+ <execution>
+ <id>default-testCompile</id>
+ <phase>none</phase>
+ </execution>
+ <execution>
+ <id>java-compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>java-test-compile</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/rest-trivial-kotlin/src/main/kotlin/com/superbiz/jaxrs/HelloFromKotlinEndpoint.kt b/rest-trivial-kotlin/src/main/kotlin/com/superbiz/jaxrs/HelloFromKotlinEndpoint.kt
new file mode 100644
index 0000000..06dd85d
--- /dev/null
+++ b/rest-trivial-kotlin/src/main/kotlin/com/superbiz/jaxrs/HelloFromKotlinEndpoint.kt
@@ -0,0 +1,18 @@
+package com.superbiz.jaxrs
+
+import javax.enterprise.context.ApplicationScoped
+import javax.ws.rs.GET
+import javax.ws.rs.Path
+import javax.ws.rs.Produces
+import javax.ws.rs.core.MediaType
+
+@Path("helloKotlin")
+@ApplicationScoped
+class HelloFromKotlinEndpoint {
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ fun sayHi(): String {
+ return "Hello World from Kotlin"
+ }
+}
diff --git a/rest-trivial-kotlin/src/test/kotlin/com/superbiz/jaxrs/HelloFromKotlinEndpointTest.kt b/rest-trivial-kotlin/src/test/kotlin/com/superbiz/jaxrs/HelloFromKotlinEndpointTest.kt
new file mode 100644
index 0000000..43eb970
--- /dev/null
+++ b/rest-trivial-kotlin/src/test/kotlin/com/superbiz/jaxrs/HelloFromKotlinEndpointTest.kt
@@ -0,0 +1,30 @@
+package com.superbiz.jaxrs
+
+import org.apache.meecrowave.Meecrowave
+import org.apache.meecrowave.junit.MonoMeecrowave
+import org.apache.meecrowave.testing.ConfigurationInject
+import org.junit.runner.RunWith
+import javax.ws.rs.client.ClientBuilder
+import javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE
+import kotlin.test.Test
+import kotlin.test.assertEquals
+
+@RunWith(MonoMeecrowave.Runner::class)
+class HelloFromKotlinEndpointTest {
+
+ @ConfigurationInject
+ private lateinit var configuration: Meecrowave.Builder
+
+ @Test
+ fun `client answeres on path "hello"`() {
+ val client = ClientBuilder.newClient()
+ try {
+ assertEquals("Hello World from Kotlin", client.target("http://localhost:" + configuration.httpPort)
+ .path("/helloKotlin")
+ .request(APPLICATION_JSON_TYPE)
+ .get(String::class.java))
+ } finally {
+ client.close()
+ }
+ }
+}
diff --git a/rest-trivial/README.adoc b/rest-trivial/README.adoc
index 7f9b567..1200dc3 100644
--- a/rest-trivial/README.adoc
+++ b/rest-trivial/README.adoc
@@ -5,7 +5,7 @@
This example shows probably the smallest JavaEE REST Service.
It is the REST version of the famous 'Hello World' program.
It contains just a link:src/main/java/com/superbiz/jaxrs/HelloEndpoint.java[Hello Resource].
-The important parst of this class are the @Path(`"hello")` and the `@GET' annotated method.
+The important parts of this class are the `@Path("hello")` and the `@GET` annotated method.
Note that the Resource is a CDI bean annotated with `@ApplicationScoped`.
-Thus only one instance exists.
\ No newline at end of file
+Thus only one instance exists.
diff --git a/rest-trivial/pom.xml b/rest-trivial/pom.xml
index df9eccc..e3b15c1 100644
--- a/rest-trivial/pom.xml
+++ b/rest-trivial/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.apache.meecrowave</groupId>
<artifactId>meecrowave-examples</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
</parent>
diff --git a/rest/pom.xml b/rest/pom.xml
index 4ef7333..b4e454c 100644
--- a/rest/pom.xml
+++ b/rest/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.meecrowave</groupId>
<artifactId>meecrowave-examples</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/servlet-trivial/pom.xml b/servlet-trivial/pom.xml
index d4dc32b..2807a9f 100644
--- a/servlet-trivial/pom.xml
+++ b/servlet-trivial/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.meecrowave</groupId>
<artifactId>meecrowave-examples</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/servlet-vaadin-v08/pom.xml b/servlet-vaadin-v08/pom.xml
index a87cff9..ff22d19 100644
--- a/servlet-vaadin-v08/pom.xml
+++ b/servlet-vaadin-v08/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.meecrowave</groupId>
<artifactId>meecrowave-examples</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -31,7 +31,7 @@
<name>Servlet (Vaadin - V08)</name>
<properties>
- <vaadin.version>8.4.5</vaadin.version>
+ <vaadin.version>8.6.3</vaadin.version>
</properties>
<packaging>jar</packaging>
diff --git a/servlet-vaadin-v10/pom.xml b/servlet-vaadin-v10/pom.xml
index ce43eae..f899b14 100644
--- a/servlet-vaadin-v10/pom.xml
+++ b/servlet-vaadin-v10/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.meecrowave</groupId>
<artifactId>meecrowave-examples</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>