blob: bd77a138da143dadb74dcc083097592e74a961bb [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0,
or the Eclipse Distribution License v. 1.0 which is available at
http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-->
<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">
<modelVersion>4.0.0</modelVersion>
<name>EclipseLink JPA JAXRS Test</name>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.jaxrs.test</artifactId>
<packaging>war</packaging>
<parent>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.test.server.parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<relativePath>../../pom_test_server.xml</relativePath>
</parent>
<properties>
<test-skip-jpa-jaxrs>${skipTests}</test-skip-jpa-jaxrs>
<transaction-type>JTA</transaction-type>
<datasource-type>jta-data-source</datasource-type>
<data-source-name>jdbc/EclipseLinkDS</data-source-name>
<data-source-name-non-jta>jdbc/ELNonJTADS</data-source-name-non-jta>
<session-data-source-name>${data-source-name}</session-data-source-name>
</properties>
<dependencies>
<!--Other modules-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
</dependency>
<!--API dependencies-->
<dependency>
<groupId>jakarta.ejb</groupId>
<artifactId>jakarta.ejb-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</dependency>
<!--Test dependencies-->
<!--Test framework-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!--EclipseLink Core test framework-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core.test.framework</artifactId>
<scope>test</scope>
</dependency>
<!--EclipseLink JPA test framework-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.test.framework</artifactId>
<scope>test</scope>
</dependency>
<!--EclipseLink Core test-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core.test</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!--EclipseLink JPA test-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.test</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!--JDBC driver (test dependency)-->
<dependency>
<groupId>${db.driver.groupId}</groupId>
<artifactId>${db.driver.artifactId}</artifactId>
<version>${db.driver.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!--Filtering enables generate/substitute test properties from Maven into *.xml files.-->
<testResources>
<testResource>
<directory>${integration.test.resources.directory}</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!--Resolve dependencies into Maven properties like ${org.eclipse.persistence:org.eclipse.persistence.jpa:jar} for JPA module-->
<execution>
<id>get-test-classpath-to-properties</id>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<!--Run specified tests/test suite-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<dependenciesToScan>
<dependency>org.eclipse.persistence:org.eclipse.persistence.core.test.framework</dependency>
</dependenciesToScan>
<!--Set system properties required for tests-->
<systemPropertiesFile>${testjee.properties.file}</systemPropertiesFile>
<systemPropertiesFile>${test.properties.file}</systemPropertiesFile>
</configuration>
<executions>
<execution>
<id>default-test</id>
<configuration>
<skipTests>${test-skip-jpa-jaxrs}</skipTests>
<excludes>
<exclude>*</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>clear-database</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<!--<skipTests>${skip-test-jpa-srg}</skipTests>-->
<argValue>-Dignore</argValue>
<includes>
<include>org.eclipse.persistence.testing.tests.ClearDatabaseSchemaTest</include>
</includes>
</configuration>
</execution>
<execution>
<id>test-jpa-jaxrs</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skipTests>${test-skip-jpa-jaxrs}</skipTests>
<reportNameSuffix>test-skip-jpa-jaxrs</reportNameSuffix>
<includes>
<include>org.eclipse.persistence.testing.jaxrs.JAXRSTestSuite</include>
</includes>
</configuration>
</execution>
<execution>
<id>verify-server-test</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<!--Must be before cargo-maven2-plugin to start DB before JEE server and stop after.-->
<plugin>
<groupId>org.carlspring.maven</groupId>
<artifactId>derby-maven-plugin</artifactId>
<executions>
<execution>
<id>start-derby</id>
<phase>process-test-resources</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-derby</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!--Skip WildFly configuration if server binaries are not available.-->
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<executions>
<execution>
<id>check-wildfly-home-existence</id>
<phase>pre-integration-test</phase>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
</plugin>
<!--Set current EclipseLink JARs into JBoss/WildFly org.eclipse.persistence system module-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-wildfly-modules</id>
<phase>pre-integration-test</phase>
<goals>
<goal>transform</goal>
</goals>
</execution>
</executions>
</plugin>
<!--Start selected JEE server configure there datasource and deploy test application-->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<skip>${test-skip-jpa-jaxrs}</skip>
<deployables>
<deployable>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.jaxrs.test</artifactId>
<type>war</type>
</deployable>
</deployables>
</configuration>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>restart</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!--JAXRS related profiles-->
<profile>
<id>test-jpa-jaxrs</id>
<properties>
<test-skip-jpa-jaxrs>false</test-skip-jpa-jaxrs>
</properties>
</profile>
</profiles>
</project>