keycloak-scim/testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml
2021-07-30 14:56:10 +02:00

390 lines
20 KiB
XML

<?xml version="1.0"?>
<!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<parent>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-servers-app-server</artifactId>
<version>16.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-tomcat</artifactId>
<packaging>pom</packaging>
<name>App Server - Tomcat</name>
<properties>
<common.resources>${project.parent.basedir}/common/common-files</common.resources>
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
<app.server.tomcat.home>${containers.home}/${app.server.tomcat.unpacked.folder.name}</app.server.tomcat.home>
<tomcat.resteasy.version>${resteasy.version}</tomcat.resteasy.version>
<skip.dependencies.for.tomcat>false</skip.dependencies.for.tomcat>
<tomcat.reactive-streams.version>1.0.2</tomcat.reactive-streams.version>
<tomcat.javax.json.bind-api.version>1.0</tomcat.javax.json.bind-api.version>
<tomcat.validation-api.version>1.0.0.GA</tomcat.validation-api.version>
</properties>
<profiles>
<profile>
<id>app-server-tomcat-submodules</id>
<activation>
<file>
<exists>src/tomcat-submodule</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>app.server.tomcat</property>
<property>app.server.tomcat.groupId</property>
<property>app.server.tomcat.artifactId</property>
<property>app.server.tomcat.version</property>
<property>app.server.tomcat.unpacked.folder.name</property>
<property>app.server.oidc.adapter.artifactId</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-tomcat-and-adapter</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${app.server.tomcat.groupId}</groupId>
<artifactId>${app.server.tomcat.artifactId}</artifactId>
<version>${app.server.tomcat.version}</version>
<type>zip</type>
<outputDirectory>${containers.home}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>${app.server.oidc.adapter.artifactId}</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${app.server.tomcat.home}/lib</outputDirectory>
</artifactItem>
</artifactItems>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
<execution>
<id>libs-for-tomcat-8-and-9</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<skip>${skip.dependencies.for.tomcat}</skip>
<artifactItems>
<artifactItem>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_2.1_spec</artifactId>
<version>${jboss-jaxrs-api_2.1_spec}</version>
</artifactItem>
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>${tomcat.resteasy.version}</version>
</artifactItem>
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-servlet-initializer</artifactId>
<version>${tomcat.resteasy.version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>${apache.httpcomponents.httpcore.version}</version>
</artifactItem>
<artifactItem>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams</artifactId>
<version>${tomcat.reactive-streams.version}</version>
</artifactItem>
<artifactItem>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</artifactItem>
<artifactItem>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>${jboss.logging.version}</version>
</artifactItem>
<artifactItem>
<groupId>javax.json.bind</groupId>
<artifactId>javax.json.bind-api</artifactId>
<version>${tomcat.javax.json.bind-api.version}</version>
</artifactItem>
<artifactItem>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${tomcat.validation-api.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${app.server.tomcat.home}/lib</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>add-tomcat-manager-user</id>
<phase>process-test-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${app.server.tomcat.home}/conf</dir>
<stylesheet>${common.resources}/tomcat-users.xsl</stylesheet>
<includes>
<include>tomcat-users.xml</include>
</includes>
<outputDir>${app.server.tomcat.home}/conf</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${assembly.xml}</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>app-server-saml-supported</id>
<activation>
<file>
<exists>src/saml-adapter-supported</exists>
</file>
</activation>
<properties>
<app.server.saml.adapter.supported>true</app.server.saml.adapter.supported>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>app.server.saml.adapter.artifactId</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-saml-adapter</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>${app.server.saml.adapter.artifactId}</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${app.server.tomcat.home}/lib</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-keycloak-truststore</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${app.server.tomcat.home}/lib</outputDirectory>
<resources>
<resource>
<directory>${common.resources}</directory>
<includes>
<include>keycloak.truststore</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>truststore</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>app-server-tomcat7</id>
<modules>
<module>tomcat7</module>
<module>common</module>
</modules>
</profile>
<profile>
<id>app-server-tomcat8</id>
<modules>
<module>tomcat8</module>
<module>common</module>
</modules>
</profile>
<profile>
<id>app-server-tomcat9</id>
<modules>
<module>tomcat9</module>
<module>common</module>
</modules>
</profile>
<profile>
<id>configure-ssl</id>
<activation>
<property>
<name>app.server.ssl.required</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-https-connector</id>
<phase>process-test-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${app.server.tomcat.home}/conf</dir>
<stylesheet>${common.resources}/tomcat-add-connector.xsl</stylesheet>
<includes>
<include>server.xml</include>
</includes>
<outputDir>${app.server.tomcat.home}/conf</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-keycloak-truststore</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${app.server.tomcat.home}/lib</outputDirectory>
<resources>
<resource>
<directory>${common.resources}/keystore</directory>
<includes>
<include>keycloak.truststore</include>
<include>adapter.jks</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>truststore</nonFilteredFileExtension>
<nonFilteredFileExtension>jks</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>