blob: 14189049b0270b5bd5b2bf2ae0ad6ecf9f98735e [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 Oracle JPA Test</name>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.oracle.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.oracle.ext}</dbPlatform>
<dbUser>${db.user}</dbUser>
<dbPassword>${db.pwd}</dbPassword>
<driverClass>${db.driver}</driverClass>
<dbURL>${db.url}</dbURL>
<!--Log level-->
<loglevel>${logging.level}</loglevel>
<!--Properties used in proxy-authentication test-->
<proxyUser>PAS_PROXY</proxyUser>
<NONJTA_DS_NAME>${data-source-name-non-jta}</NONJTA_DS_NAME>
<pa.connection.user>PAS_CONN</pa.connection.user>
<pa.connection.password>${db.pwd}2</pa.connection.password>
<pa.proxyuser>${proxyUser}</pa.proxyuser>
<pa.proxyuser.password>password</pa.proxyuser.password>
<pa.proxyuser2>${pa.proxyuser}2</pa.proxyuser2>
<pa.proxyuser2.password>${pa.proxyuser.password}2</pa.proxyuser2.password>
<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>
<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>
</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.oracle</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>
<!--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 Oracle Extension Tests (model, test classes)-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.oracle</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.oracle.spatial</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>
<!--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>
<!--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>
<!--Oracle proprietary dependencies-->
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>simplefan</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ons</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>xmlparserv2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>xdb</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>orai18n</artifactId>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>com.oracle.spatial</groupId>
<artifactId>sdoapi</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.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</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-oracle-timestamptz</name>
<properties>
<puName>timestamptz</puName>
</properties>
</itemWithProperty>
<itemWithProperty>
<name>server-test-jpa-custom-features</name>
<properties>
<puName>customfeatures</puName>
</properties>
</itemWithProperty>
<!--TODO Not functional yet
<itemWithProperty>
<name>server-test-jpa-proxy-authentication</name>
<properties>
<puName>proxyauthentication</puName>
</properties>
</itemWithProperty>
-->
<itemWithProperty>
<name>server-test-jpa-jgeometry</name>
<properties>
<puName>structConverter</puName>
</properties>
</itemWithProperty>
<itemWithProperty>
<name>server-test-jpa-struct-converter</name>
<properties>
<puName>structConverter</puName>
</properties>
</itemWithProperty>
</itemsWithProperties>
<baseDirectory>${project.basedir}</baseDirectory>
<goals>
<goal>clean</goal>
<goal>verify</goal>
</goals>
<profiles>
<profile>@item@</profile>
<profile>oracle</profile>
<profile>weblogic</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.test.framework</dependency>
<dependency>org.eclipse.persistence:org.eclipse.persistence.jpa.test</dependency>
<dependency>org.eclipse.persistence:org.eclipse.persistence.oracle</dependency>
<dependency>org.eclipse.persistence:org.eclipse.persistence.oracle.spatial</dependency>
</dependenciesToScan>
<workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
<!--Set system properties required for tests-->
<systemPropertiesFile>${testjee.properties.file}</systemPropertiesFile>
<systemPropertiesFile>${test.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>
<pa.connection.user>${pa.connection.user}</pa.connection.user>
<pa.connection.password>${pa.connection.password}</pa.connection.password>
<pa.proxyuser>${pa.proxyuser}</pa.proxyuser>
<pa.proxyuser.password>${pa.proxyuser.password}</pa.proxyuser.password>
<pa.proxyuser2>${pa.proxyuser2}</pa.proxyuser2>
<pa.proxyuser2.password>${pa.proxyuser2.password}</pa.proxyuser2.password>
<com.ibm.SSL.ConfigURL>${com.ibm.SSL.ConfigURL}</com.ibm.SSL.ConfigURL>
<com.ibm.CORBA.ConfigURL>${com.ibm.CORBA.ConfigURL}</com.ibm.CORBA.ConfigURL>
<run.metadata.cache.test.suite>${run.metadata.cache.test.suite}</run.metadata.cache.test.suite>
</systemProperties>
</configuration>
<executions>
<execution>
<id>clear-database</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skipTests>${skip-server-test-jpa}</skipTests>
<argValue>-Dignore</argValue>
<includes>
<include>org.eclipse.persistence.testing.tests.ClearDatabaseSchemaTest</include>
</includes>
</configuration>
</execution>
<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>
<container>
<dependencies>
<dependency>
<groupId>com.oracle.spatial</groupId>
<artifactId>sdoapi</artifactId>
</dependency>
</dependencies>
<systemProperties>
<pa.connection.user>${pa.connection.user}</pa.connection.user>
<pa.connection.password>${pa.connection.password}</pa.connection.password>
<pa.proxyuser>${pa.proxyuser}</pa.proxyuser>
<pa.proxyuser.password>${pa.proxyuser.password}</pa.proxyuser.password>
<pa.proxyuser2>${pa.proxyuser2}</pa.proxyuser2>
<pa.proxyuser2.password>${pa.proxyuser2.password}</pa.proxyuser2.password>
</systemProperties>
</container>
<deployables>
<deployable>
<location>${project.build.directory}/${modelname}.ear</location>
<type>ear</type>
<properties>
<name>${modelname}</name>
</properties>
</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>
<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>
<!--Server tests with Oracle dependencies (jdbc driver, org.eclipse.persistence.oracle module).-->
<profile>
<id>server-test-jpa-partitioned-gridlink</id>
<properties>
<skip-server-test-jpa>false</skip-server-test-jpa>
<puName>partitioned</puName>
<!--modelname property name is used there due substitution string in application.xml-->
<modelname>eclipselink-partitioned-model</modelname>
<extra-model>eclipselink-partitioned-model</extra-model>
<packageName>partitioned</packageName>
<test-client-class>org.eclipse.persistence.testing.tests.jpa.partitioned.PartitionedTestSuite</test-client-class>
</properties>
</profile>
<profile>
<id>server-test-jpa-oracle-timestamptz</id>
<properties>
<skip-server-test-jpa>false</skip-server-test-jpa>
<puName>timestamptz</puName>
<!--modelname property name is used there due substitution string in application.xml-->
<modelname>eclipselink-timestamptz-model</modelname>
<extra-model>common-server-generic</extra-model>
<packageName>timestamptz</packageName>
<test-client-class>org.eclipse.persistence.testing.tests.jpa.timestamptz.TimeStampTZJUnitTestSuite</test-client-class>
</properties>
</profile>
<profile>
<id>server-test-jpa-custom-features</id>
<properties>
<skip-server-test-jpa>false</skip-server-test-jpa>
<puName>customfeatures</puName>
<!--modelname property name is used there due substitution string in application.xml-->
<modelname>eclipselink-custom-features-model</modelname>
<extra-model>common-server-generic</extra-model>
<packageName>customfeatures</packageName>
<test-client-class>org.eclipse.persistence.testing.tests.jpa.customfeatures.CustomFeaturesJUnitTestSuite</test-client-class>
</properties>
</profile>
<profile>
<id>server-test-jpa-jgeometry</id>
<properties>
<skip-server-test-jpa>false</skip-server-test-jpa>
<puName>structConverter</puName>
<!--modelname property name is used there due substitution string in application.xml-->
<modelname>eclipselink-jgeometry-model</modelname>
<extra-model>common-server-generic</extra-model>
<packageName>jgeometry</packageName>
<test-client-class>org.eclipse.persistence.testing.tests.jpa.jgeometry.SpatialJPQLTestSuite</test-client-class>
</properties>
</profile>
<profile>
<id>server-test-jpa-struct-converter</id>
<properties>
<skip-server-test-jpa>false</skip-server-test-jpa>
<puName>structConverter</puName>
<!--modelname property name is used there due substitution string in application.xml-->
<modelname>eclipselink-struct-converter-model</modelname>
<extra-model>common-server-generic</extra-model>
<packageName>structconverter</packageName>
<test-client-class>org.eclipse.persistence.testing.tests.jpa.structconverter.StructConverterTestSuite</test-client-class>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<!-- common configuration shared by all executions -->
<configuration>
<username>${db.user}</username>
<password>${db.pwd}</password>
<autocommit>true</autocommit>
<onError>continue</onError>
</configuration>
<executions>
<!-- prepare DB object (type) for struct-converter-->
<execution>
<id>struct-converter-sql</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<sqlCommand>
CREATE OR REPLACE TYPE MY_GEOMETRY AS OBJECT (id NUMBER, geom MDSYS.SDO_GEOMETRY);
</sqlCommand>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>server-test-jpa-proxy-authentication</id>
<properties>
<skip-server-test-jpa>false</skip-server-test-jpa>
<puName>proxyauthentication</puName>
<!--modelname property name is used there due substitution string in application.xml-->
<modelname>eclipselink-proxyauthentication-model</modelname>
<extra-model>eclipselink-proxyauthentication-model</extra-model>
<packageName>proxyauthentication</packageName>
<test-client-class>org.eclipse.persistence.testing.tests.jpa.proxyauthentication.ProxyAuthenticationServerTestSuite</test-client-class>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<!-- common configuration shared by all executions -->
<configuration>
<username>${db.sys.user} as sysdba</username>
<password>${db.sys.pwd}</password>
<autocommit>true</autocommit>
<onError>continue</onError>
</configuration>
<executions>
<!-- create proxy user and grant permissions -->
<execution>
<id>setup-connuser</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<sqlCommand>
DROP USER ${pa.connection.user} CASCADE;
CREATE USER ${pa.connection.user} IDENTIFIED BY ${pa.connection.password} ACCOUNT UNLOCK;
GRANT CONNECT TO ${pa.connection.user};
GRANT RESOURCE TO ${pa.connection.user};
GRANT CREATE SESSION TO ${pa.connection.user};
GRANT UNLIMITED TABLESPACE TO ${pa.connection.user};
GRANT CREATE ANY VIEW TO ${pa.connection.user};
GRANT CREATE ANY context TO ${pa.connection.user};
GRANT DROP ANY context TO ${pa.connection.user};
GRANT EXECUTE ON dbms_flashback TO ${pa.connection.user};
GRANT EXECUTE ON dbms_rls TO ${pa.connection.user};
GRANT EXECUTE ON dbms_session TO ${pa.connection.user};
GRANT change notification TO ${pa.connection.user};
GRANT CREATE ANY directory TO ${pa.connection.user};
GRANT DROP ANY directory TO ${pa.connection.user};
</sqlCommand>
</configuration>
</execution>
<execution>
<id>setup-proxy-authentication</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<sqlCommand>
DROP USER ${pa.proxyuser} CASCADE;
DROP USER ${pa.proxyuser2} CASCADE;
CREATE USER ${pa.proxyuser} IDENTIFIED BY ${pa.proxyuser.password} ACCOUNT UNLOCK;
CREATE USER ${pa.proxyuser2} IDENTIFIED BY ${pa.proxyuser2.password} ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO ${pa.proxyuser};
GRANT UNLIMITED TABLESPACE TO ${pa.proxyuser2};
GRANT CONNECT TO ${pa.proxyuser};
GRANT CONNECT TO ${pa.proxyuser2};
GRANT RESOURCE TO ${pa.proxyuser};
GRANT CREATE SESSION TO ${pa.proxyuser};
ALTER USER ${pa.proxyuser} GRANT CONNECT THROUGH ${pa.connection.user};
ALTER USER ${pa.proxyuser2} GRANT CONNECT THROUGH ${pa.connection.user};
</sqlCommand>
</configuration>
</execution>
<execution>
<id>setup-proxy-authentication-create-employee-table</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<username>${pa.connection.user}</username>
<password>${pa.connection.password}</password>
<sqlCommand>
CREATE TABLE JPA_PROXY_EMPLOYEE (
EMP_ID NUMBER (15) NOT NULL,
F_NAME VARCHAR2 (40) NULL,
L_NAME VARCHAR2 (40) NULL,
PRIMARY KEY (EMP_ID)
);
CREATE TABLE PROXY_EMPLOYEE_SEQ (
SEQ_NAME VARCHAR2 (50) NOT NULL,
SEQ_COUNT NUMBER (38) NULL,
PRIMARY KEY (SEQ_NAME)
);
INSERT INTO PROXY_EMPLOYEE_SEQ (SEQ_NAME, SEQ_COUNT) VALUES ('PROXY_EMPLOYEE_SEQ', 1);
</sqlCommand>
</configuration>
</execution>
<execution>
<id>setup-proxy-authentication-create-phonenumber-table</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<username>${pa.proxyuser}</username>
<password>${pa.proxyuser.password}</password>
<sqlCommand>
CREATE TABLE PROXY_PHONENUMBER (
OWNER_ID NUMBER (15) NOT NULL,
TYPE VARCHAR2 (15) NOT NULL,
AREA_CODE VARCHAR2 (3) NULL,
NUMB VARCHAR2 (8) NULL,
PRIMARY KEY (OWNER_ID, TYPE)
);
</sqlCommand>
</configuration>
</execution>
<execution>
<id>grant-permissions-to-proxyuser</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<sqlCommand>
GRANT ALTER ON ${pa.connection.user}.JPA_PROXY_EMPLOYEE TO ${pa.proxyuser};
GRANT DELETE ON ${pa.connection.user}.JPA_PROXY_EMPLOYEE TO ${pa.proxyuser};
GRANT INSERT ON ${pa.connection.user}.JPA_PROXY_EMPLOYEE TO ${pa.proxyuser};
GRANT SELECT ON ${pa.connection.user}.JPA_PROXY_EMPLOYEE TO ${pa.proxyuser};
GRANT UPDATE ON ${pa.connection.user}.JPA_PROXY_EMPLOYEE TO ${pa.proxyuser};
GRANT INDEX ON ${pa.connection.user}.JPA_PROXY_EMPLOYEE TO ${pa.proxyuser};
GRANT ALTER ON ${pa.connection.user}.PROXY_EMPLOYEE_SEQ TO ${pa.proxyuser};
GRANT DELETE ON ${pa.connection.user}.PROXY_EMPLOYEE_SEQ TO ${pa.proxyuser};
GRANT INSERT ON ${pa.connection.user}.PROXY_EMPLOYEE_SEQ TO ${pa.proxyuser};
GRANT SELECT ON ${pa.connection.user}.PROXY_EMPLOYEE_SEQ TO ${pa.proxyuser};
GRANT UPDATE ON ${pa.connection.user}.PROXY_EMPLOYEE_SEQ TO ${pa.proxyuser};
GRANT INDEX ON ${pa.connection.user}.PROXY_EMPLOYEE_SEQ TO ${pa.proxyuser};
</sqlCommand>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>