-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WFLY-18383 Quickstart for MicroProfile LRA
- Loading branch information
Showing
14 changed files
with
1,525 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,8 @@ | ||
batch | ||
/extension=org.wildfly.extension.microprofile.lra-coordinator:add | ||
/extension=org.wildfly.extension.microprofile.lra-participant:add | ||
/subsystem=microprofile-lra-coordinator:add | ||
/subsystem=microprofile-lra-participant:add | ||
run-batch | ||
|
||
reload |
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,317 @@ | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.wildfly.quickstarts</groupId> | ||
<artifactId>wildfly-quickstart-parent</artifactId> | ||
<!-- | ||
Maintain separation between the artifact id and the version to help prevent | ||
merge conflicts between commits changing the GA and those changing the V. | ||
--> | ||
<version>3</version> | ||
<relativePath/> | ||
</parent> | ||
|
||
<artifactId>microprofile-lra</artifactId> | ||
<version>30.0.0.Beta1-SNAPSHOT</version> | ||
<packaging>war</packaging> | ||
|
||
<name>Quickstart: microprofile-lra</name> | ||
|
||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
<management.http.url>http://localhost:9990</management.http.url> | ||
<!-- The versions for BOMs, Dependencies and Plugins --> | ||
<version.microprofile.bom>29.0.0.Final</version.microprofile.bom> | ||
<version.server.bom>29.0.0.Final</version.server.bom> | ||
<version.server.bootable-jar>29.0.0.Final</version.server.bootable-jar> | ||
<version.wildfly-jar.maven.plugin>10.0.0.Final</version.wildfly-jar.maven.plugin> | ||
<version.jkube.maven.plugin>1.0.1</version.jkube.maven.plugin> | ||
<jkube.generator.from>registry.redhat.io/ubi8/openjdk-11:latest</jkube.generator.from> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>jboss-public-maven-repository</id> | ||
<name>JBoss Public Maven Repository</name> | ||
<url>https://repository.jboss.org/nexus/content/groups/public/</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
<updatePolicy>never</updatePolicy> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
<updatePolicy>never</updatePolicy> | ||
</snapshots> | ||
<layout>default</layout> | ||
</repository> | ||
<repository> | ||
<id>redhat-ga-maven-repository</id> | ||
<name>Red Hat GA Maven Repository</name> | ||
<url>https://maven.repository.redhat.com/ga/</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
<updatePolicy>never</updatePolicy> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
<updatePolicy>never</updatePolicy> | ||
</snapshots> | ||
<layout>default</layout> | ||
</repository> | ||
</repositories> | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>jboss-public-maven-repository</id> | ||
<name>JBoss Public Maven Repository</name> | ||
<url>https://repository.jboss.org/nexus/content/groups/public/</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</pluginRepository> | ||
<pluginRepository> | ||
<id>redhat-ga-maven-repository</id> | ||
<name>Red Hat GA Maven Repository</name> | ||
<url>https://maven.repository.redhat.com/ga/</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<!-- importing the microprofile BOM adds MicroProfile specs --> | ||
<dependency> | ||
<groupId>org.wildfly.bom</groupId> | ||
<artifactId>wildfly-microprofile</artifactId> | ||
<version>${version.microprofile.bom}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<!-- importing the ee-with-tools BOM adds specs and other useful artifacts as managed dependencies --> | ||
<dependency> | ||
<groupId>org.wildfly.bom</groupId> | ||
<artifactId>wildfly-ee-with-tools</artifactId> | ||
<version>${version.server.bom}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<!-- Import the MicroProfile LRA API, we use provided scope as the API is included in WildFly --> | ||
<dependency> | ||
<groupId>org.eclipse.microprofile.lra</groupId> | ||
<artifactId>microprofile-lra-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- Import the Jakarta REST API, we use provided scope as the API is included in the server --> | ||
<dependency> | ||
<groupId>jakarta.ws.rs</groupId> | ||
<artifactId>jakarta.ws.rs-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- Import logging by JBoss --> | ||
<dependency> | ||
<groupId>org.jboss.logging</groupId> | ||
<artifactId>jboss-logging</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- Needed for running tests (you may also use TestNG) --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<!-- Arquillian allows you to test enterprise code such as EJBs and | ||
Transactional(JTA) JPA from JUnit/TestNG --> | ||
<dependency> | ||
<groupId>org.jboss.arquillian.junit</groupId> | ||
<artifactId>arquillian-junit-container</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.wildfly.arquillian</groupId> | ||
<artifactId>wildfly-arquillian-common</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.resteasy</groupId> | ||
<artifactId>resteasy-client</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<!-- Set the name of the archive --> | ||
<finalName>${project.artifactId}</finalName> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.asciidoctor</groupId> | ||
<artifactId>asciidoctor-maven-plugin</artifactId> | ||
<configuration> | ||
<!-- adds versions properties as attributes for substitutions in README.adoc source blocks --> | ||
<attributes> | ||
<versionMicroprofileBom>${version.microprofile.bom}</versionMicroprofileBom> | ||
</attributes> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>bootable-jar</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.wildfly.plugins</groupId> | ||
<artifactId>wildfly-jar-maven-plugin</artifactId> | ||
<version>${version.wildfly-jar.maven.plugin}</version> | ||
<configuration> | ||
<feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#${version.server.bootable-jar}</feature-pack-location> | ||
<layers> | ||
<layer>jaxrs-server</layer> | ||
<layer>microprofile-lra-coordinator</layer> | ||
<layer>microprofile-lra-participant</layer> | ||
</layers> | ||
<plugin-options> | ||
<jboss-fork-embedded>true</jboss-fork-embedded> | ||
</plugin-options> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>package</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>bootable-jar-openshift</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.wildfly.plugins</groupId> | ||
<artifactId>wildfly-jar-maven-plugin</artifactId> | ||
<version>${version.wildfly-jar.maven.plugin}</version> | ||
<configuration> | ||
<feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#${version.server.bootable-jar}</feature-pack-location> | ||
<layers> | ||
<layer>jaxrs-server</layer> | ||
<layer>microprofile-lra-coordinator</layer> | ||
<layer>microprofile-lra-participant</layer> | ||
</layers> | ||
<plugin-options> | ||
<jboss-fork-embedded>true</jboss-fork-embedded> | ||
</plugin-options> | ||
<cloud/> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>package</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.jkube</groupId> | ||
<artifactId>openshift-maven-plugin</artifactId> | ||
<version>${version.jkube.maven.plugin}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>resource</goal> | ||
<goal>build</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<enricher> | ||
<config> | ||
<jkube-service> | ||
<type>NodePort</type> | ||
</jkube-service> | ||
</config> | ||
</enricher> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<!-- An optional Arquillian testing profile that executes tests in your JBoss EAP instance. | ||
This profile will start a new JBoss EAP instance, and execute the test, shutting it down when done. | ||
Run with: mvn clean verify -Parq-managed --> | ||
<id>arq-managed</id> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.wildfly.arquillian</groupId> | ||
<artifactId>wildfly-arquillian-container-managed</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>${version.failsafe.plugin}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<!-- An optional Arquillian testing profile that executes tests in a remote JBoss EAP instance. | ||
Run with: mvn clean verify -Parq-remote --> | ||
<id>arq-remote</id> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.wildfly.arquillian</groupId> | ||
<artifactId>wildfly-arquillian-container-remote</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>${version.failsafe.plugin}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
30 changes: 30 additions & 0 deletions
30
...oprofile-lra/src/main/java/org/wildfly/quickstarts/microprofile/lra/JaxRsApplication.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,30 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source. | ||
* Copyright 2023, Red Hat, Inc., and individual contributors | ||
* as indicated by the @author tags. See the copyright.txt file in the | ||
* distribution for a full listing of individual contributors. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
|
||
package org.wildfly.quickstarts.microprofile.lra; | ||
|
||
import jakarta.ws.rs.ApplicationPath; | ||
import jakarta.ws.rs.core.Application; | ||
|
||
@ApplicationPath("/") | ||
public class JaxRsApplication extends Application { | ||
} |
Oops, something went wrong.