Skip to content

Commit

Permalink
Custom jsonb serialization it fix (#3976)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem committed Sep 25, 2024
1 parent f3cb1ce commit 833d7cc
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 4 deletions.
5 changes: 5 additions & 0 deletions external/coreprofile-tck/coreprofile/installer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

<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.external.coreprofiletck.coreprofiletck</groupId>
<artifactId>project</artifactId>
<version>24.10.99-SNAPSHOT</version>
</parent>

<artifactId>installer</artifactId>
<packaging>pom</packaging>

<name>Piranha Core Profile - Core Profile TCK - Installer</name>

<properties>
<tck.home>${project.build.directory}/tck</tck.home>
</properties>

<build>
<plugins>
<plugin>
Expand Down
1 change: 1 addition & 0 deletions external/coreprofile-tck/coreprofile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<artifactId>project</artifactId>
<version>24.10.99-SNAPSHOT</version>
</parent>

<groupId>cloud.piranha.external.coreprofiletck.coreprofiletck</groupId>
<artifactId>project</artifactId>
<packaging>pom</packaging>
Expand Down
13 changes: 9 additions & 4 deletions external/coreprofile-tck/coreprofile/runner/pom.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?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">
<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.external.coreprofiletck.coreprofiletck</groupId>
<artifactId>project</artifactId>
<version>24.10.99-SNAPSHOT</version>
</parent>

<artifactId>runner</artifactId>
<packaging>jar</packaging>

<name>Piranha Core Profile - Core Profile TCK - Runner</name>

<properties>
<piranha.version>${project.version}</piranha.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
Expand All @@ -26,7 +29,6 @@
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- Run the installer first. Matters when executing in parallel -->
<dependency>
Expand Down Expand Up @@ -62,16 +64,19 @@
<dependency>
<groupId>org.omnifaces.arquillian</groupId>
<artifactId>glassfish-client-ee10</artifactId>
<version>${glassfish-client-ee10.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-container</artifactId>
<version>${arquillian.version}</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* 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.tck.core;

import org.jboss.arquillian.container.spi.event.container.BeforeDeploy;
import org.jboss.arquillian.core.api.annotation.Observes;
import org.jboss.arquillian.core.spi.LoadableExtension;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;

public class CustomJsonbSerializationITFix implements LoadableExtension {

@Override
public void register(ExtensionBuilder builder) {
builder.observer(CustomJsonbSerializationITFix.class);
}

public void removeService(@Observes BeforeDeploy event) {
Archive<?> archive = event.getDeployment().getArchive();
if (archive instanceof WebArchive webArchive) {
if (webArchive.getName().equals("CustomJsonbSerializationIT.war")) {
webArchive.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cloud.piranha.tck.core.CustomJsonbSerializationITFix
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<epicyro.version>3.1.0</epicyro.version>
<exousia.version>3.0.0-M1.1</exousia.version>
<free-port-finder.version>1.1.1</free-port-finder.version>
<glassfish-client-ee10.version>1.6</glassfish-client-ee10.version>
<grizzly.version>4.1.0-M1</grizzly.version>
<grizzly-npn-api.version>2.0.0</grizzly-npn-api.version>
<!-- kept at 5.4.0 because 5.5.0 adds remote repositories -->
Expand Down

0 comments on commit 833d7cc

Please sign in to comment.