blob: 8d9586102e83abe963b29fee958eccb3b9e54064 [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 Spring Test</name>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.spring.test</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
<!--Properties used for test resources filtering/replacement-->
<!--DB connection properties-->
<dbPlatform>${db.platform}</dbPlatform>
<dbUser>${db.user}</dbUser>
<dbPassword>${db.pwd}</dbPassword>
<driverClass>${db.driver}</driverClass>
<dbURL>${db.url}</dbURL>
<!--Log level-->
<loglevel>${logging.level}</loglevel>
<test-skip-jpa-spring>true</test-skip-jpa-spring> <!-- Spring 4 is not supported with jakarta.persistence -->
</properties>
<dependencies>
<!--Test dependencies-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!--Other modules-->
<!--EclipseLink JPA-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</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>
<!--API dependencies-->
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<scope>test</scope>
</dependency>
<!--Other libraries dependencies-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-instrument</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<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-resources-plugin</artifactId>
<configuration>
<delimiters>
<!--TODO Update project/module files to use standard pattern @*@ -->
<delimiter>%%*%%</delimiter>
</delimiters>
<useDefaultDelimiters>true</useDefaultDelimiters>
</configuration>
</plugin>
<!--Required for EL Weaving (-javaagent:${org.eclipse.persistence:org.eclipse.persistence.jpa:jar})-->
<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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<workingDirectory>${project.build.directory}/test-run</workingDirectory>
<!--Set system properties required for tests-->
<systemPropertiesFile>${test.properties.file}</systemPropertiesFile>
</configuration>
<executions>
<execution>
<id>test-jpa-spring-local</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<!--EclipseLink Weaving is enabled.
When it will be disabled by -Dignore it leads into test errors
...SpringJunitTestCase.testAddressVH:182 Exception when Address value holder retrieved-->
<!--<argLine>-Dignore</argLine>-->
<argLine>-javaagent:${org.eclipse.persistence:org.eclipse.persistence.jpa:jar}</argLine>
<skipTests>${test-skip-jpa-spring}</skipTests>
<reportNameSuffix>test-jpa-spring</reportNameSuffix>
<includes>
<include>**.spring.TestLocalEMF</include>
<include>**.spring.TestLocalEMFtransactional</include>
<include>**.spring.dao.TestLocalEMFwithDao</include>
</includes>
</configuration>
</execution>
<execution>
<id>test-jpa-spring-container</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<argLine>-javaagent:${org.springframework:spring-instrument:jar}</argLine>
<!--EclipseLink Weaving is enabled.
When it will be disabled by -Dignore it leads into test errors
...SpringJunitTestCase.testAddressVH:182 Exception when Address value holder retrieved-->
<!--<argLine>-Dignore</argLine>-->
<skipTests>${test-skip-jpa-spring}</skipTests>
<reportNameSuffix>test-jpa-spring</reportNameSuffix>
<includes>
<include>**.spring.TestContainerEMF</include>
<include>**.spring.TestContainerEMFtransactional</include>
<include>**.spring.dao.TestContainerEMFwithDao</include>
</includes>
</configuration>
</execution>
<execution>
<id>verify-integration-tests</id>
<goals>
<goal>verify</goal>
</goals>
<configuration>
<skip>${integration.test.skip.verify}</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.carlspring.maven</groupId>
<artifactId>derby-maven-plugin</artifactId>
<executions>
<execution>
<id>start-derby</id>
<phase>pre-integration-test</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>
</plugins>
</build>
<profiles>
<profile>
<id>oracle</id>
<dependencies>
<!--db.platform=org.eclipse.persistence.platform.database.oracle.Oracle12Platform comes from there-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.oracle</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>test-jpa-spring</id>
<properties>
<test-skip-jpa-spring>false</test-skip-jpa-spring>
</properties>
</profile>
</profiles>
</project>