Skip to content

Commit

Permalink
Fixes piranhacloud#3762 - Move Eclipse Tyrus into its own Piranha Ext…
Browse files Browse the repository at this point in the history
…ension (piranhacloud#3763)
  • Loading branch information
mnriem authored Jun 15, 2024
1 parent 244fd9a commit 392b270
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 48 deletions.
3 changes: 2 additions & 1 deletion COMPONENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Components

The table below lists all the 3-rd party components that are used by Piranha to
The table below lists all the 3rd party components that are used by Piranha to
deliver various bits and pieces of functionality. See their respective projects
for more information about each of them.

Expand All @@ -16,6 +16,7 @@ for more information about each of them.
| Eclipse JSTL | 3.0.1 |
| Eclipse Mojarra | 4.0.7 |
| Eclipse Parsson | 1.1.5 |
| Eclipse Tyrus | 2.1.5 |
| Eclipse Yasson | 3.0.3 |
| Netty | 4.1.108.Final |
| Project CRaC | 0.1.3 |
Expand Down
39 changes: 39 additions & 0 deletions extension/eclipse-tyrus/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cloud.piranha.extension</groupId>
<artifactId>project</artifactId>
<version>24.6.0-SNAPSHOT</version>
</parent>
<artifactId>piranha-extension-eclipse-tyrus</artifactId>
<packaging>jar</packaging>
<name>Piranha - Extension - Eclipse Tyrus</name>
<properties>
<tyrus.version>2.1.5</tyrus.version>
</properties>
<dependencies>
<!-- compile -->
<dependency>
<groupId>cloud.piranha.core</groupId>
<artifactId>piranha-core-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- provided -->
<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-scinitializer</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- runtime -->
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-servlet</artifactId>
<version>${tyrus.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright (c) 2002-2024 Manorrock.com. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package cloud.piranha.extension.tyrus;

import cloud.piranha.core.api.WebApplication;
import cloud.piranha.core.api.WebApplicationExtension;
import java.lang.System.Logger;
import static java.lang.System.Logger.Level.TRACE;

/**
* The extension that delivers Eclipse Tyrus to Piranha.
*
* @author Manfred Riem ([email protected])
*/
public class TyrusExtension implements WebApplicationExtension {

/**
* Stores the logger.
*/
private static final Logger LOGGER = System.getLogger(TyrusExtension.class.getName());

/**
* Configure the extension.
*
* @param webApplication the web application.
*/
@Override
public void configure(WebApplication webApplication) {
LOGGER.log(TRACE, "Configuring Eclipse Tyrus extension");
}
}
42 changes: 42 additions & 0 deletions extension/eclipse-tyrus/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2002-2024 Manorrock.com. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

/**
* This module delivers the Eclipse Tyrus integration extension.
*
* <p>
* This extension integrates Eclipse Tyrus into Piranha.
* </p>
*
* @author Manfred Riem ([email protected])
*/
module cloud.piranha.extension.tyrus {

requires cloud.piranha.core.api;
requires static cloud.piranha.extension.scinitializer;
}
13 changes: 6 additions & 7 deletions extension/micro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
<artifactId>piranha-extension-eclipse-soteria</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-eclipse-tyrus</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-eclipse-wasp</artifactId>
Expand Down Expand Up @@ -192,13 +198,6 @@
<artifactId>jakarta.activation-api</artifactId>
</dependency>

<!-- Jakarta WebSocket implementation -->
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-servlet</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-eclipselink</artifactId>
Expand Down
1 change: 1 addition & 0 deletions extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<module>eclipse-mojarra</module>
<module>eclipse-parsson</module>
<module>eclipse-soteria</module>
<module>eclipse-tyrus</module>
<module>eclipse-yasson</module>
<module>eclipse-wasp</module>
<module>eclipselink</module>
Expand Down
5 changes: 0 additions & 5 deletions extension/scinitializer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down
11 changes: 6 additions & 5 deletions extension/servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-eclipse-tyrus</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-eclipse-wasp</artifactId>
Expand Down Expand Up @@ -116,10 +122,5 @@
<artifactId>jakarta.annotation-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-servlet</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
11 changes: 6 additions & 5 deletions extension/webprofile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-eclipse-tyrus</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-eclipse-wasp</artifactId>
Expand Down Expand Up @@ -152,11 +158,6 @@
<artifactId>jakarta.annotation-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-servlet</artifactId>
<scope>runtime</scope>
</dependency>
<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
20 changes: 1 addition & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
<shrinkwrap-resolver.version>3.3.0</shrinkwrap-resolver.version>
<spring-boot.version>3.2.3</spring-boot.version>
<transact-cdi-beans.version>1.0.1</transact-cdi-beans.version>
<tyrus.version>2.1.5</tyrus.version>
<!-- plugins -->
<build-helper-maven-plugin.version>3.5.0</build-helper-maven-plugin.version>
<clirr-maven-plugin.version>2.8</clirr-maven-plugin.version>
Expand Down Expand Up @@ -162,24 +161,7 @@
<artifactId>maven-plugin-tools-annotations</artifactId>
<version>${maven-plugin-tools-annotations.version}</version>
</dependency>

<!-- Eclipse Tyrus -->
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-client</artifactId>
<version>${tyrus.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-grizzly-client</artifactId>
<version>${tyrus.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-servlet</artifactId>
<version>${tyrus.version}</version>
</dependency>


<!-- Freeport Finder -->
<dependency>
<groupId>me.alexpanov</groupId>
Expand Down
6 changes: 0 additions & 6 deletions test/debug/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,6 @@
<artifactId>maven-plugin-annotations</artifactId>
</dependency>

<!-- Eclipse Tyrus -->
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-servlet</artifactId>
</dependency>

<!-- Freeport Finder -->
<dependency>
<groupId>me.alexpanov</groupId>
Expand Down

0 comments on commit 392b270

Please sign in to comment.