| <?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-RS Server Test</name> |
| <groupId>org.eclipse.persistence</groupId> |
| <artifactId>org.eclipse.persistence.jpars.server.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>../../testing/server/pom.xml</relativePath> |
| </parent> |
| |
| <properties> |
| <!--Properties used for test resources filtering/replacement--> |
| <!--DB connection properties--> |
| <DB_USER>${db.user}</DB_USER> |
| <DB_PWD>${db.pwd}</DB_PWD> |
| <DB_DRIVER>${db.driver}</DB_DRIVER> |
| <DB_URL>${db.url}</DB_URL> |
| <data-source-name>jdbc/EclipseLinkDS</data-source-name> |
| <data-source-name-non-jta>jdbc/ELNonJTADS</data-source-name-non-jta> |
| |
| <test-skip-jpa-jpars-server>${skipTests}</test-skip-jpa-jpars-server> |
| </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.jpars</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>org.glassfish.jersey.core</groupId> |
| <artifactId>jersey-client</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.glassfish.jersey.core</groupId> |
| <artifactId>jersey-common</artifactId> |
| </dependency> |
| <!--Test dependencies--> |
| <!--Test framework--> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <!--<scope>test</scope>--> |
| </dependency> |
| <!--Other modules--> |
| <!--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> |
| <!--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 main properties from Maven into *.xml files.--> |
| <resources> |
| <resource> |
| <directory>src/main/resources</directory> |
| <filtering>true</filtering> |
| </resource> |
| </resources> |
| <!--Filtering enables generate/substitute test properties from Maven into *.xml files.--> |
| <testResources> |
| <testResource> |
| <directory>src/test/resources</directory> |
| <filtering>true</filtering> |
| </testResource> |
| </testResources> |
| |
| <plugins> |
| <!--Run specified tests/test suite--> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <skipTests>true</skipTests> |
| </configuration> |
| </plugin> |
| <!--Run specified tests/test suite--> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-failsafe-plugin</artifactId> |
| <configuration> |
| <!--Set system properties required for tests--> |
| <systemPropertiesFile>${test.properties.file}</systemPropertiesFile> |
| <systemPropertiesFile>${testjee.properties.file}</systemPropertiesFile> |
| </configuration> |
| <executions> |
| <execution> |
| <id>default-test</id> |
| <configuration> |
| <skipTests>${test-skip-jpa-jpars-server}</skipTests> |
| <excludes> |
| <exclude>*</exclude> |
| </excludes> |
| </configuration> |
| </execution> |
| <execution> |
| <id>test-jpa-jpars</id> |
| <goals> |
| <goal>integration-test</goal> |
| </goals> |
| <configuration> |
| <skipTests>${test-skip-jpa-jpars-server}</skipTests> |
| <reportNameSuffix>test-skip-jpa-jpars-server</reportNameSuffix> |
| <includes> |
| <include>org.eclipse.persistence.jpars.test.AllJavaEETests</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> |
| <!--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-jpars-server}</skip> |
| <deployables> |
| <deployable> |
| <groupId>org.eclipse.persistence</groupId> |
| <artifactId>org.eclipse.persistence.jpars.server.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> |
| </project> |