spring-boot/spring-boot-deployment-tests/pom.xml

78 lines
2.5 KiB
XML
Raw Permalink Normal View History

<?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>org.springframework.boot</groupId>
<artifactId>spring-boot-parent</artifactId>
2019-08-06 14:38:07 +08:00
<version>1.5.23.BUILD-SNAPSHOT</version>
<relativePath>../spring-boot-parent</relativePath>
</parent>
<artifactId>spring-boot-deployment-tests</artifactId>
<packaging>pom</packaging>
<name>Spring Boot Deployment Tests</name>
<description>Spring Boot Deployment Tests</description>
<url>https://projects.spring.io/spring-boot/</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/..</main.basedir>
<java.version>1.7</java.version>
<cargo.timeout>300000</cargo.timeout>
<cargo.container.download-dir>${java.io.tmpdir}/cargo/installs</cargo.container.download-dir>
</properties>
<modules>
Work around brittle annotation scanning in Mojarra FacesListener in Mojarra 2.2.12 (used in Glassfish 4.1.1) is a ServletContainerInitializer that’s annotated to handle types annotated with javax.annotation.Resource. OAuth2RestOperationsConfiguration.SessionScopedConfiguration is one such class. This leads to com.sun.faces.config.DelegatingAnnotationProvider calling getAnnotations on SessionScopedConfiguration.class. This fails with a java.lang.ArrayStoreException due to SessionScopedConfiguration being annotated with @ConditionalOnBean(OAuth2ClientConfiguration) and OAuth2ClientConfiguration not being on the classpath. DelegatingAnnotationProvider currently catches NoClassDefFoundErrors thrown during its annotation processing. It needs to be made more robust so that it also copes with an ArrayStoreException, in a similar way to how org.glassfish.apf.impl.AnnotationProcessorImpl was updated to fix GLASSFISH-21265 [1]. I’ve opened an issue to this effect [2]. In the meantime, we can work around the brittleness in DelegatingAnnotationProvider by restructuring SessionScopedConfiguration. This commit moves the use of @Resource into a nested inner class, ClientContextConfiguration, while leaving the use of @ConditionalOnBean on SessionScopedConfiguration. This means that it is now ClientContextConfiguration that is passed to FacesListener and processed by DelegatingAnnotationProcessor, thereby avoiding exposing it to the @ConditionalOnBean annotation that it does not handle gracefully. A Glassfish-based deployment test has also been added to verify the fix. Closes gh-2079 Closes gh-4321 [1] https://java.net/jira/browse/GLASSFISH-21265 [2] https://java.net/jira/browse/JAVASERVERFACES-4076
2015-10-28 20:14:31 +08:00
<module>spring-boot-deployment-test-glassfish</module>
<module>spring-boot-deployment-test-tomee</module>
<module>spring-boot-deployment-test-tomcat</module>
<module>spring-boot-deployment-test-wildfly</module>
<module>spring-boot-deployment-test-wlp</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<container>
<containerId>${cargo.container.id}</containerId>
<timeout>${cargo.timeout}</timeout>
<zipUrlInstaller>
<url>${cargo.container.url}</url>
<downloadDir>${cargo.container.download-dir}</downloadDir>
</zipUrlInstaller>
</container>
<deployables>
<deployable>
<properties>
<context>/bootapp</context>
</properties>
<pingURL>http://localhost:${appserver.port}/bootapp</pingURL>
<pingTimeout>30000</pingTimeout>
</deployable>
</deployables>
</configuration>
<executions>
<execution>
<id>start-cargo</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-cargo</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>