blob: 8590198987cc488e3b86e8247006191bb2da5d9e [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 WDF Test</name>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.wdf.test</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.parent</artifactId>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
<!--Properties used for test resources filtering/replacement-->
<data-source-name>jdbc/EclipseLinkDS</data-source-name>
<database-platform>${db.platform}</database-platform>
<server-platform-property>&lt;property name="eclipselink.target-server" value="${server.platform}"/&gt;</server-platform-property>
<test-skip-jpa-wdf>${skipTests}</test-skip-jpa-wdf>
</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 Core test framework-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core.test.framework</artifactId>
<scope>test</scope>
</dependency>
<!--EclipseLink Core test classes-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core.test</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!--EclipseLink JPA (test framework)-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.test</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!--API dependecies-->
<dependency>
<groupId>jakarta.ejb</groupId>
<artifactId>jakarta.ejb-api</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>
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
<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>
<!--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-assembly-plugin</artifactId>
<executions>
<execution>
<id>eclipselink-wdf-jpa1-model.jar</id>
<phase>process-test-classes</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.basedir}/${integration.test.directory}/assembly/eclipselink-wdf-jpa1-model.jar.xml</descriptor>
</descriptors>
<finalName>eclipselink-wdf-jpa1-model</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
<execution>
<id>eclipselink-wdf-jpa2-model.jar</id>
<phase>process-test-classes</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.basedir}/${integration.test.directory}/assembly/eclipselink-wdf-jpa2-model.jar.xml</descriptor>
</descriptors>
<finalName>eclipselink-wdf-jpa2-model</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
<execution>
<id>eclipselink-wdf-tests.jar</id>
<phase>process-test-classes</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.basedir}/${integration.test.directory}/assembly/eclipselink-wdf-tests.jar.xml</descriptor>
</descriptors>
<finalName>eclipselink-wdf-tests</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
<execution>
<id>eclipselink-wdf.ear</id>
<phase>process-test-classes</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.basedir}/${integration.test.directory}/assembly/eclipselink-wdf.ear.xml</descriptor>
</descriptors>
<finalName>eclipselink-wdf</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archiverConfig>
<appxml>${project.build.testOutputDirectory}/ear/application.xml</appxml>
</archiverConfig>
</configuration>
</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>
<dependenciesToScan>
<dependency>org.eclipse.persistence:org.eclipse.persistence.core.test.framework</dependency>
</dependenciesToScan>
<workingDirectory>${project.build.directory}/test-run</workingDirectory>
<!--Set system properties required for tests-->
<systemPropertiesFile>${test.properties.file}</systemPropertiesFile>
</configuration>
<executions>
<execution>
<id>clear-database</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skipTests>${test-skip-jpa-wdf}</skipTests>
<argValue>-Dignore</argValue>
<includes>
<include>org.eclipse.persistence.testing.tests.ClearDatabaseSchemaTest</include>
</includes>
</configuration>
</execution>
<execution>
<id>test-jpa-wdf-local</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<argLine>-Dignore</argLine>
<!--<argLine>-javaagent:${org.eclipse.persistence:org.eclipse.persistence.jpa:jar}</argLine>-->
<skipTests>${test-skip-jpa-wdf}</skipTests>
<reportNameSuffix>test-jpa-wdf</reportNameSuffix>
<systemPropertyVariables>
<orm.testing>jpa</orm.testing>
<dummy2>dummy</dummy2>
<eclipselink.logging.level>info</eclipselink.logging.level>
<servertest>false</servertest>
</systemPropertyVariables>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/eclipselink-wdf-jpa1-model.jar</additionalClasspathElement>
<additionalClasspathElement>${project.build.directory}/eclipselink-wdf-jpa2-model.jar</additionalClasspathElement>
</additionalClasspathElements>
<includes>
<include>org.eclipse.persistence.testing.tests.wdf.**.*Test*</include>
</includes>
<excludes>
<exclude>org.eclipse.persistence.testing.tests.wdf.jpa1.query.QueryTest</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>verify-integration-tests</id>
<goals>
<goal>verify</goal>
</goals>
<configuration>
<skip>${integration.test.skip.verify}</skip>
</configuration>
</execution>
</executions>
</plugin>
<!--TODO Tests are not functional against Derby now-->
<!--
<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>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<!--Some classifier is required there. Otherwise maven-jar-plugin throw error.-->
<classifier>client</classifier>
</configuration>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>derby</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>mysql</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<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>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>test-jpa-wdf</id>
<properties>
<test-skip-jpa-wdf>false</test-skip-jpa-wdf>
</properties>
</profile>
</profiles>
</project>