blob: 2b5a6be053dbcfd21bf480dd335abd83ab56382c [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 NoSQL Test</name>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.nosql.test</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.test.server.parent</artifactId>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../../testing/server/pom.xml</relativePath>
</parent>
<properties>
<comp.xlint>-Xlint:all</comp.xlint>
<comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
<comp.test.xlint>-Xlint:all</comp.test.xlint>
<!--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>
<skip-server-test-jpa>true</skip-server-test-jpa>
<skip-server-test-jpa-lrg>true</skip-server-test-jpa-lrg>
<!--Properties used for test resources filtering/replacement.
Default settings could be overriden by server-test-jpa* profile.-->
<puName>default</puName>
<server.factory>${server.initialCtxFactory}</server.factory>
<server.user>${server.usr}</server.user>
<server-platform>${server.platform}</server-platform>
<server-platform-class>${server.platform.class}</server-platform-class>
<!--<transaction-type>JTA</transaction-type>-->
<transaction-type>RESOURCE_LOCAL</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>
<database-platform>${db.platform.oracle.ext}</database-platform>
<server-weaving>true</server-weaving>
<server.testrunner.prefix>${modelname}/${modelname}_ejb/</server.testrunner.prefix>
<db.driver.groupId>org.mongodb</db.driver.groupId>
<db.driver.artifactId>mongo-java-driver</db.driver.artifactId>
<db.driver.version>3.2.0</db.driver.version>
</properties>
<dependencies>
<!--Test dependencies-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!--Required for JPA server test server-test-jpa21-sessionbean.-->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</dependency>
<!--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.jpa.modelgen.processor</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.nosql</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>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.test</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!--EclipseLink NoSQL Extension Tests (model, test classes)-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.nosql</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>
<dependency>
<groupId>jakarta.resource</groupId>
<artifactId>jakarta.resource-api</artifactId>
<scope>test</scope>
</dependency>
<!--Other libraries-->
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-orb</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</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>
<!--JEE thin client (EJB Client) library.-->
<dependency>
<groupId>${jee.client.groupId}</groupId>
<artifactId>${jee.client.artifactId}</artifactId>
<version>${jee.client.version}</version>
<type>${jee.client.type}</type>
<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-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>-Werror</arg>
</compilerArgs>
<proc>none</proc>
</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.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-generated-test-sources-dir</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-test-sources/jpa-runner-src</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!--Required due filtering applied to org.eclipse.persistence.testing.framework.server.TestRunnerBean java class.-->
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<id>filter-test-src-TestRunnerBean</id>
<phase>generate-test-sources</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<file>${project.basedir}/${integration.test.directory}/java-templates/org/eclipse/persistence/testing/framework/server/TestRunnerBean.java_nonjtaDS</file>
<outputFile>${project.build.directory}/generated-test-sources/jpa-runner-src/org/eclipse/persistence/testing/framework/server/TestRunnerBean.java</outputFile>
<replacements>
<replacement>
<token>@puName@</token>
<value>${puName}</value>
</replacement>
</replacements>
</configuration>
</execution>
</executions>
</plugin>
<!--Generate multiple jar files required for tests.-->
<plugin>
<groupId>com.soebes.maven.plugins</groupId>
<artifactId>iterator-maven-plugin</artifactId>
<executions>
<!--Iterator is used there due reuse current assembly/component descriptors property ${item} is used there.-->
<execution>
<id>pack-server</id>
<phase>process-test-classes</phase>
<goals>
<goal>iterator</goal>
</goals>
<configuration>
<skip>${skip-server-test-jpa}</skip>
<itemsWithProperties>
<itemsWithProperty>
<name>${modelname}</name>
<properties>
<default>${puName}</default>
<item.extra-model>${extra-model}</item.extra-model>
</properties>
</itemsWithProperty>
</itemsWithProperties>
<pluginExecutors>
<pluginExecutor>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<goal>single</goal>
<configuration>
<descriptors>
<descriptor>${project.basedir}/${integration.test.directory}/assembly/assembly-ejb.xml</descriptor>
</descriptors>
<finalName>${item}_ejb</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</pluginExecutor>
<pluginExecutor>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<goal>single</goal>
<configuration>
<descriptors>
<descriptor>${project.basedir}/${integration.test.directory}/assembly/assembly-client.xml</descriptor>
</descriptors>
<finalName>${item}_client</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</pluginExecutor>
<!--Apply filtering to the application.xml file.-->
<pluginExecutor>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<goal>copy-resources</goal>
<configuration>
<outputDirectory>${project.build.testOutputDirectory}/server.tmp</outputDirectory>
<resources>
<resource>
<directory>${project.build.testOutputDirectory}/server</directory>
<includes>
<include>application.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</pluginExecutor>
<pluginExecutor>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<goal>single</goal>
<configuration>
<descriptors>
<descriptor>${project.basedir}/${integration.test.directory}/assembly/assembly-ear.xml</descriptor>
</descriptors>
<finalName>${item}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archiverConfig>
<!--Filtering is not available there. It's handled by maven-resources-plugin in previous pluginExecutor-->
<appxml>${project.build.testOutputDirectory}/server.tmp/application.xml</appxml>
</archiverConfig>
</configuration>
</pluginExecutor>
</pluginExecutors>
</configuration>
</execution>
<execution>
<id>test-server-lrg</id>
<phase>integration-test</phase>
<goals>
<goal>invoker</goal>
</goals>
<configuration>
<!--Items/profiles with persistenceUnit name "default".-->
<skip>${skip-server-test-jpa-lrg}</skip>
<itemsWithProperties>
<itemWithProperty>
<name>server-test-jpa-mongo</name>
<properties>
<puName>mongo</puName>
</properties>
</itemWithProperty>
<itemWithProperty>
<name>server-test-jpa-mongo-xml</name>
<properties>
<puName>mongo-xml</puName>
</properties>
</itemWithProperty>
</itemsWithProperties>
<baseDirectory>${project.basedir}</baseDirectory>
<goals>
<goal>clean</goal>
<goal>verify</goal>
</goals>
<profiles>
<profile>@item@</profile>
</profiles>
<properties>
<skip-server-test-jpa>false</skip-server-test-jpa>
<skip-server-test-jpa-lrg>true</skip-server-test-jpa-lrg>
</properties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<skip>skip-server-test-jpa</skip>
</configuration>
<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>
<execution>
<id>default-test-jar</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!--Installation to the local repository is not required. If enabled JDK 11 throws error.-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>default-install</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<!--Skip Unit testing, there are integration tests only-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<!--Itegration tests-->
<!--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</dependency>
<dependency>org.eclipse.persistence:org.eclipse.persistence.jpa.test</dependency>
<dependency>org.eclipse.persistence:org.eclipse.persistence.nosql</dependency>
<dependency>org.eclipse.persistence:org.eclipse.persistence.nosql.test</dependency>
</dependenciesToScan>
<workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
<!--Set system properties required for tests-->
<systemPropertiesFile>${testjee.properties.file}</systemPropertiesFile>
<systemPropertiesFile>${test.mongodb.properties.file}</systemPropertiesFile>
<systemProperties>
<proxy.user.name>${pa.connection.user}</proxy.user.name>
<server.platform>${server.platform}</server.platform>
<server.user>${server.usr}</server.user>
<server.password>${server.pwd}</server.password>
<server.url>${server.rmi.protocol}://${server.host}:${server.rmi.port}</server.url>
<server.testrunner>${server.testrunner.prefix}${server.testrunner.suffix}</server.testrunner>
<server.testrunner1>${server.testrunner.prefix}${server.testrunner1.suffix}</server.testrunner1>
<server.testrunner2>${server.testrunner.prefix}${server.testrunner2.suffix}</server.testrunner2>
<server.testrunner3>${server.testrunner.prefix}${server.testrunner3.suffix}</server.testrunner3>
<server.testrunner4>${server.testrunner.prefix}${server.testrunner4.suffix}</server.testrunner4>
<server.testrunner5>${server.testrunner.prefix}${server.testrunner5.suffix}</server.testrunner5>
<server.testrunner6>${server.testrunner.prefix}${server.testrunner6.suffix}</server.testrunner6>
<server.run>TRUE</server.run>
</systemProperties>
</configuration>
<executions>
<execution>
<id>default-server-test</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skipTests>${skip-server-test-jpa}</skipTests>
<reportNameSuffix>test-jpa-server</reportNameSuffix>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/${modelname}_client.jar</additionalClasspathElement>
</additionalClasspathElements>
<includes>
<include>${test-client-class}</include>
</includes>
</configuration>
</execution>
<execution>
<id>verify-server-test</id>
<goals>
<goal>verify</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>
<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>${skip-server-test-jpa}</skip>
<deployables>
<deployable>
<location>${project.build.directory}/${modelname}.ear</location>
<type>ear</type>
<properties>
<name>${modelname}</name>
</properties>
</deployable>
</deployables>
<container>
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.nosql</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
</dependency>
</dependencies>
<systemPropertiesFile>${test.mongodb.properties.file}</systemPropertiesFile>
<systemProperties>
<db.user>root</db.user>
<db.pwd>root</db.pwd>
</systemProperties>
</container>
</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>
<profile>
<id>weblogic</id>
<properties>
<server.testrunner.prefix></server.testrunner.prefix>
</properties>
</profile>
<profile>
<id>server-test-jpa-lrg</id>
<properties>
<skip-server-test-jpa-lrg>false</skip-server-test-jpa-lrg>
</properties>
</profile>
<profile>
<id>server-test-jpa-mongo</id>
<properties>
<skip-test-jpa-srg>true</skip-test-jpa-srg>
<skip-server-test-jpa>false</skip-server-test-jpa>
<skip-jpa-jse-build>true</skip-jpa-jse-build>
<puName>mongo</puName>
<!--modelname property name is used there due substitution string in application.xml-->
<modelname>eclipselink-mongo-model</modelname>
<extra-model>eclipselink-mongo-model</extra-model>
<packageName>mongo</packageName>
<test-client-class>org.eclipse.persistence.testing.tests.jpa.mongo.MongoTestSuite</test-client-class>
</properties>
</profile>
<profile>
<id>server-test-jpa-mongo-xml</id>
<properties>
<skip-test-jpa-srg>true</skip-test-jpa-srg>
<skip-server-test-jpa>false</skip-server-test-jpa>
<skip-jpa-jse-build>true</skip-jpa-jse-build>
<puName>mongo-xml</puName>
<!--modelname property name is used there due substitution string in application.xml-->
<modelname>eclipselink-mongo-model-xml</modelname>
<extra-model>eclipselink-mongo-model-xml</extra-model>
<packageName>mongo</packageName>
<test-client-class>org.eclipse.persistence.testing.tests.jpa.mongo.MongoXMLTestSuite</test-client-class>
</properties>
</profile>
</profiles>
</project>