forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: add IT with maven invoker plugin
Related to quarkusio#6192
- Loading branch information
1 parent
b631b6b
commit ef55e98
Showing
9 changed files
with
428 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
143 changes: 143 additions & 0 deletions
143
integration-tests/spring-data-jpa/src/it/spring-configuration/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
<?xml version="1.0"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.acme</groupId> | ||
<artifactId>spring-configuration</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<properties> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<surefire-plugin.version>2.22.0</surefire-plugin.version> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
<compiler-plugin.version>3.8.1</compiler-plugin.version> | ||
<!-- <maven.compiler.parameters>true</maven.compiler.parameters>--> | ||
<!-- <maven.compiler.source>1.8</maven.compiler.source>--> | ||
<!-- <maven.compiler.target>1.8</maven.compiler.target>--> | ||
<!-- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>--> | ||
<!-- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>--> | ||
<!-- <quarkus-plugin.version>1.1.0.Final</quarkus-plugin.version>--> | ||
<!-- <quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>--> | ||
<!-- <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>--> | ||
<!-- <quarkus.platform.version>1.1.0.Final</quarkus.platform.version>--> | ||
<!-- <surefire-plugin.version>2.22.1</surefire-plugin.version>--> | ||
</properties> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-bom</artifactId> | ||
<version>@project.version@</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.rest-assured</groupId> | ||
<artifactId>rest-assured</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-spring-data-jpa</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-jdbc-h2</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy-jsonb</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>build</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${compiler-plugin.version}</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>${surefire-plugin.version}</version> | ||
<configuration> | ||
<systemProperties> | ||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> | ||
</systemProperties> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>native</id> | ||
<activation> | ||
<property> | ||
<name>native</name> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>native-image</goal> | ||
</goals> | ||
<configuration> | ||
<enableHttpUrlHandler>true</enableHttpUrlHandler> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>${surefire-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
<configuration> | ||
<systemProperties> | ||
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path> | ||
</systemProperties> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<properties> | ||
<quarkus.package.type>native</quarkus.package.type> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</project> |
34 changes: 34 additions & 0 deletions
34
integration-tests/spring-data-jpa/src/it/spring-configuration/src/main/docker/Dockerfile.jvm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#### | ||
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode | ||
# | ||
# Before building the docker image run: | ||
# | ||
# mvn package | ||
# | ||
# Then, build the image with: | ||
# | ||
# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/spring-data-jpa-quickstart-jvm . | ||
# | ||
# Then run the container using: | ||
# | ||
# docker run -i --rm -p 8080:8080 quarkus/spring-data-jpa-quickstart-jvm | ||
# | ||
### | ||
FROM fabric8/java-alpine-openjdk8-jre:1.6.5 | ||
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" | ||
ENV AB_ENABLED=jmx_exporter | ||
|
||
# Be prepared for running in OpenShift too | ||
RUN adduser -G root --no-create-home --disabled-password 1001 \ | ||
&& chown -R 1001 /deployments \ | ||
&& chmod -R "g+rwX" /deployments \ | ||
&& chown -R 1001:root /deployments | ||
|
||
COPY target/lib/* /deployments/lib/ | ||
COPY target/*-runner.jar /deployments/app.jar | ||
EXPOSE 8080 | ||
|
||
# run with user 1001 | ||
USER 1001 | ||
|
||
ENTRYPOINT [ "/deployments/run-java.sh" ] |
22 changes: 22 additions & 0 deletions
22
...ation-tests/spring-data-jpa/src/it/spring-configuration/src/main/docker/Dockerfile.native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#### | ||
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode | ||
# | ||
# Before building the docker image run: | ||
# | ||
# mvn package -Pnative -Dquarkus.native.container-build=true | ||
# | ||
# Then, build the image with: | ||
# | ||
# docker build -f src/main/docker/Dockerfile.native -t quarkus/spring-data-jpa-quickstart . | ||
# | ||
# Then run the container using: | ||
# | ||
# docker run -i --rm -p 8080:8080 quarkus/spring-data-jpa-quickstart | ||
# | ||
### | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal | ||
WORKDIR /work/ | ||
COPY target/*-runner /work/application | ||
RUN chmod 775 /work | ||
EXPOSE 8080 | ||
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] |
16 changes: 16 additions & 0 deletions
16
...jpa/src/it/spring-configuration/src/main/java/org/acme/spring/data/jpa/FruitResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.acme.spring.data.jpa; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
|
||
@Path("/greeting") | ||
public class FruitResource { | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
public String hello() { | ||
return "hello"; | ||
} | ||
} |
Oops, something went wrong.