Skip to content

Commit

Permalink
Merge pull request #3111 from jamezp/back-port-fixes-3.15
Browse files Browse the repository at this point in the history
Back port fixes 3.15
  • Loading branch information
jamezp committed Jun 8, 2022
2 parents 072216d + 3b76273 commit 971afa4
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 34 deletions.
26 changes: 21 additions & 5 deletions jboss-modules/build.xml
Expand Up @@ -17,6 +17,19 @@
</antcall>
</target>

<target name="include-skeleton-keys">
<delete dir="target/mavenized"/>
<antcall target="add-skeleton-key">
<!-- TODO add OSGI later when we can have maven repo references to those jars -->
<param name="mavenized.modules" value="true"/>
<param name="output.dir" value="target/mavenized"/>
</antcall>
<antcall target="add-skeleton-key">
<param name="mavenized.modules" value="false"/>
<param name="output.dir" value="target"/>
</antcall>
</target>


<target name="modules">
<!--
Expand Down Expand Up @@ -166,11 +179,6 @@
<maven-resource group="org.jboss.resteasy" artifact="resteasy-validator-provider"/>
</module-def>

<module-def name="org.jboss.resteasy.skeleton-key">
<maven-resource group="org.jboss.resteasy" artifact="skeleton-key-as7"/>
<maven-resource group="org.jboss.resteasy" artifact="skeleton-key-core"/>
</module-def>

<module-def name="org.jboss.resteasy.resteasy-yaml-provider">
<maven-resource group="org.jboss.resteasy" artifact="resteasy-yaml-provider"/>
</module-def>
Expand All @@ -195,4 +203,12 @@
<delete file="maven-ant-tasks.jar"/>
</target>

<target name="add-skeleton-key">

<module-def name="org.jboss.resteasy.skeleton-key">
<maven-resource group="org.jboss.resteasy" artifact="skeleton-key-as7"/>
<maven-resource group="org.jboss.resteasy" artifact="skeleton-key-core"/>
</module-def>
</target>

</project>
111 changes: 83 additions & 28 deletions jboss-modules/pom.xml
Expand Up @@ -201,24 +201,12 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>skeleton-key-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-validator-provider</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>skeleton-key-as7</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-spring</artifactId>
Expand Down Expand Up @@ -259,22 +247,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<id>build-dist</id>
<goals>
<goal>run</goal>
</goals>
<phase>package</phase>
<configuration>
<target>
<ant antfile="build.xml" inheritRefs="true">
<target name="all"/>
</ant>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
Expand Down Expand Up @@ -351,4 +323,87 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>include-skeleton-key</id>
<activation>
<jdk>(,14]</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>skeleton-key-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>skeleton-key-as7</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>build-dist</id>
<goals>
<goal>run</goal>
</goals>
<phase>package</phase>
<configuration>
<target>
<ant antfile="build.xml" inheritRefs="true">
<target name="all"/>
<target name="include-skeleton-keys"/>
</ant>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>exclude-skeleton-key</id>
<activation>
<jdk>(14,]</jdk>
</activation>
<build>
<resources>
<resource>
<directory>${project.basedir}/main/resources</directory>
<excludes>
<exclude>modules/org/jboss/resteasy/skeleton-key/**</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>build-dist</id>
<goals>
<goal>run</goal>
</goals>
<phase>package</phase>
<configuration>
<target>
<ant antfile="build.xml" inheritRefs="true">
<target name="all"/>
</ant>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
13 changes: 13 additions & 0 deletions pom.xml
Expand Up @@ -35,6 +35,7 @@
<jdk.min.version>${maven.compiler.source}</jdk.min.version>
<!-- maven-surefire-plugin -->
<surefire.system.args>-Xms512m -Xmx512m ${modular.jdk.args}</surefire.system.args>
<additionalJvmArgs/>
<!-- Plugins versions -->
<version.org.jacoco.plugin>0.7.9</version.org.jacoco.plugin>
<version.org.wildfly.jar.plugin>2.0.0.Beta8</version.org.wildfly.jar.plugin>
Expand Down Expand Up @@ -186,6 +187,18 @@
<modular.jdk.args>--add-opens=java.base/java.lang=ALL-UNNAMED</modular.jdk.args>
</properties>
</profile>
<profile>
<id>Windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<surefire.system.args>-Xms512m -Xmx512m -Djdk.io.File.enableADS=true ${modular.jdk.args}</surefire.system.args>
<additionalJvmArgs>-Djdk.io.File.enableADS=true</additionalJvmArgs>
</properties>
</profile>
</profiles>

<contributors>
Expand Down
Expand Up @@ -4,6 +4,7 @@
import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.rest.client.RestClientBuilder;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.jboss.logging.Logger;

import javax.enterprise.context.Dependent;
import javax.enterprise.context.spi.CreationalContext;
Expand Down Expand Up @@ -42,6 +43,7 @@
import java.util.stream.Stream;

public class RestClientDelegateBean implements Bean<Object>, PassivationCapable {
private static final Logger LOGGER = Logger.getLogger(RestClientDelegateBean.class);

public static final String REST_URL_FORMAT = "%s/mp-rest/url";

Expand Down Expand Up @@ -283,6 +285,13 @@ private static URI uriFromString(String uriString) {

@Override
public void destroy(Object instance, CreationalContext<Object> creationalContext) {
if (instance instanceof AutoCloseable) {
try {
((AutoCloseable) instance).close();
} catch (Exception e) {
LOGGER.debugf(e, "Failed to close client %s", instance);
}
}
}

@Override
Expand Down
1 change: 0 additions & 1 deletion testsuite/pom.xml
Expand Up @@ -22,7 +22,6 @@
<!-- Optional property for jacoco report generation -->
<sources.path></sources.path>
<jacoco.agent></jacoco.agent>
<additionalJvmArgs></additionalJvmArgs>
<ipv6ArquillianSettings></ipv6ArquillianSettings>
<jboss.server.config.file.name>standalone-full.xml</jboss.server.config.file.name>
<security.provider>picketbox</security.provider>
Expand Down

0 comments on commit 971afa4

Please sign in to comment.