Jooby test pack added

master
Edward M. Kagan 4 years ago
parent fb179b0fd0
commit 4473e6eb1c

1
.gitignore vendored

@ -2,4 +2,5 @@
dependency-reduced-pom.xml dependency-reduced-pom.xml
.classpath .classpath
.settings .settings
.factorypath
target target

@ -0,0 +1,74 @@
<?xml version="1.0"?>
<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">
<parent>
<groupId>twopm.tech.jax-rs-bench</groupId>
<artifactId>bom</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jooby-jetty</artifactId>
<dependencies>
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-jetty</artifactId>
<version>${jooby.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.jooby</groupId>
<artifactId>jooby-maven-plugin</artifactId>
<version>${jooby.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<Main-Class>${app.main.class}</Main-Class>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.jooby</groupId>
<artifactId>jooby-apt</artifactId>
<version>${jooby.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-bom</artifactId>
<version>${jooby.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

@ -0,0 +1,14 @@
package twopm.tech.bench.jaxrs;
import io.jooby.Jooby;
public class Bench extends Jooby {
{
mvc(new TestResource());
}
public static void main(final String[] args) {
runApp(args, Bench::new);
}
}

@ -0,0 +1,28 @@
package twopm.tech.bench.jaxrs;
import io.jooby.annotations.*;
@Path("/test")
public class TestResource {
@GET
@Path("/")
@Produces("application/json")
public String index() {
return "{ \"status\" : \"OK\", \"method\" : \"GET\" }";
}
@GET
@Path("/{id}")
@Produces("application/json")
public String get(@PathParam("id") Long id) {
return "{ \"status\" : \"OK\", \"method\" : \"GET\", \"test\" : " + String.valueOf(id) + " }";
}
@POST
@Path("/{id}")
@Produces("application/json")
public String post(@PathParam("id") Long id) {
return "{ \"status\" : \"OK\", \"method\" : \"POST\", \"test\" : " + String.valueOf(id) + " }";
}
}

@ -0,0 +1,74 @@
<?xml version="1.0"?>
<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">
<parent>
<groupId>twopm.tech.jax-rs-bench</groupId>
<artifactId>bom</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jooby-netty</artifactId>
<dependencies>
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-netty</artifactId>
<version>${jooby.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.jooby</groupId>
<artifactId>jooby-maven-plugin</artifactId>
<version>${jooby.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<Main-Class>${app.main.class}</Main-Class>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.jooby</groupId>
<artifactId>jooby-apt</artifactId>
<version>${jooby.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-bom</artifactId>
<version>${jooby.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

@ -0,0 +1,14 @@
package twopm.tech.bench.jaxrs;
import io.jooby.Jooby;
public class Bench extends Jooby {
{
mvc(new TestResource());
}
public static void main(final String[] args) {
runApp(args, Bench::new);
}
}

@ -0,0 +1,28 @@
package twopm.tech.bench.jaxrs;
import io.jooby.annotations.*;
@Path("/test")
public class TestResource {
@GET
@Path("/")
@Produces("application/json")
public String index() {
return "{ \"status\" : \"OK\", \"method\" : \"GET\" }";
}
@GET
@Path("/{id}")
@Produces("application/json")
public String get(@PathParam("id") Long id) {
return "{ \"status\" : \"OK\", \"method\" : \"GET\", \"test\" : " + String.valueOf(id) + " }";
}
@POST
@Path("/{id}")
@Produces("application/json")
public String post(@PathParam("id") Long id) {
return "{ \"status\" : \"OK\", \"method\" : \"POST\", \"test\" : " + String.valueOf(id) + " }";
}
}

@ -0,0 +1,74 @@
<?xml version="1.0"?>
<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">
<parent>
<groupId>twopm.tech.jax-rs-bench</groupId>
<artifactId>bom</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jooby-undertow</artifactId>
<dependencies>
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-utow</artifactId>
<version>${jooby.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.jooby</groupId>
<artifactId>jooby-maven-plugin</artifactId>
<version>${jooby.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<Main-Class>${app.main.class}</Main-Class>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.jooby</groupId>
<artifactId>jooby-apt</artifactId>
<version>${jooby.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jooby</groupId>
<artifactId>jooby-bom</artifactId>
<version>${jooby.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

@ -0,0 +1,14 @@
package twopm.tech.bench.jaxrs;
import io.jooby.Jooby;
public class Bench extends Jooby {
{
mvc(new TestResource());
}
public static void main(final String[] args) {
runApp(args, Bench::new);
}
}

@ -0,0 +1,28 @@
package twopm.tech.bench.jaxrs;
import io.jooby.annotations.*;
@Path("/test")
public class TestResource {
@GET
@Path("/")
@Produces("application/json")
public String index() {
return "{ \"status\" : \"OK\", \"method\" : \"GET\" }";
}
@GET
@Path("/{id}")
@Produces("application/json")
public String get(@PathParam("id") Long id) {
return "{ \"status\" : \"OK\", \"method\" : \"GET\", \"test\" : " + String.valueOf(id) + " }";
}
@POST
@Path("/{id}")
@Produces("application/json")
public String post(@PathParam("id") Long id) {
return "{ \"status\" : \"OK\", \"method\" : \"POST\", \"test\" : " + String.valueOf(id) + " }";
}
}

@ -20,7 +20,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version> <version>${maven.shade.plugin.version}</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>package</phase>
@ -28,6 +28,7 @@
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>
<configuration> <configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers> <transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries> <manifestEntries>

@ -7,6 +7,9 @@
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>modules/rawnetty</module> <module>modules/rawnetty</module>
<module>modules/jooby-netty</module>
<module>modules/jooby-jetty</module>
<module>modules/jooby-undertow</module>
<module>modules/quarkus-resteasy-jackson</module> <module>modules/quarkus-resteasy-jackson</module>
<module>modules/quarkus-resteasy-jsonb</module> <module>modules/quarkus-resteasy-jsonb</module>
</modules> </modules>
@ -17,7 +20,9 @@
<maven.compiler.parameters>true</maven.compiler.parameters> <maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source> <maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target> <maven.compiler.target>11</maven.compiler.target>
<maven.shade.plugin.version>3.2.4</maven.shade.plugin.version>
<netty.version>4.1.69.Final</netty.version> <netty.version>4.1.69.Final</netty.version>
<jooby.version>2.11.0</jooby.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>

@ -1,21 +1,13 @@
{ {
"folders": [ "folders": [
{
"name": "modules",
"path": "modules"
},
{ {
"name": "jax-rs-bench", "name": "jax-rs-bench",
"path": ".", "path": "."
"files.exclude": ["", ""]
} }
], ],
"settings": { "settings": {
"java.configuration.updateBuildConfiguration": "automatic", "java.configuration.updateBuildConfiguration": "automatic",
"java.dependency.packagePresentation": "hierarchical", "java.dependency.packagePresentation": "hierarchical",
"java.dependency.syncWithFolderExplorer": true, "java.dependency.syncWithFolderExplorer": true
"files.exclude": {
"modules": true
}
} }
} }

Loading…
Cancel
Save