blob: 66f87392f686046dae670cdac5c50f29fe23cbb5 [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 CORBA Extension</name>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.corba</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>
<corba.server.host>localhost</corba.server.host>
<corba.server.port>1122</corba.server.port>
<corba.server.startup.timeout>5</corba.server.startup.timeout>
<naming.factory>com.sun.enterprise.naming.SerialInitContextFactory</naming.factory>
<test-skip-corba>${skipTests}</test-skip-corba>
</properties>
<dependencies>
<!--Other modules-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
</dependency>
<!--Test dependencies-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</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>
<!--JDBC driver (test dependency)-->
<dependency>
<groupId>${db.driver.groupId}</groupId>
<artifactId>${db.driver.artifactId}</artifactId>
<version>${db.driver.version}</version>
<scope>test</scope>
</dependency>
<!-- need javax.tranasaction packages to start corba on Java SE 11 -->
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-orb</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>1.3.3</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-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<compilerArgs>
<arg>--add-reads</arg>
<arg>org.eclipse.persistence.corba=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<configuration>
<release>8</release>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Fragment-Host>org.eclipse.persistence.core</Fragment-Host>
<Import-Package>
javax.rmi;version=!,
javax.rmi.CORBA;version=!,
org.omg.CORBA;version=!,
org.omg.CORBA.portable;version=!,
org.omg.CORBA_2_3.portable;version=!,
*
</Import-Package>
</instructions>
</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-javadoc-plugin</artifactId>
<configuration>
<additionalOptions>--add-reads org.eclipse.persistence.corba=ALL-UNNAMED</additionalOptions>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- see https://github.com/eclipse-ee4j/orb-gmbal/issues/22 -->
<id>corba-tests</id>
<activation>
<jdk>[8,14)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>start-corba-server</id>
<phase>process-test-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<skip>${test-skip-corba}</skip>
<executable>java</executable>
<classpathScope>test</classpathScope>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>com.sun.corba.ee.impl.naming.cosnaming.TransientNameServer</argument>
<argument>-ORBInitialPort</argument>
<argument>${corba.server.port}</argument>
</arguments>
<async>true</async>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>wait-for-corba-server-start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<sleep seconds="${corba.server.startup.timeout}"/>
</target>
</configuration>
</execution>
</executions>
</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-classes</workingDirectory>
<!--Set system properties required for tests-->
<systemPropertiesFile>${test.properties.file}</systemPropertiesFile>
<systemPropertyVariables>
<java.security.policy>./java.policy.allpermissions</java.security.policy>
<java.naming.factory.initial>${naming.factory}</java.naming.factory.initial>
<java.naming.provider.url>iiop://${corba.server.host}:${corba.server.port}</java.naming.provider.url>
<org.omg.CORBA.ORBInitialHost>${corba.server.host}</org.omg.CORBA.ORBInitialHost>
<org.omg.CORBA.ORBInitialPort>${corba.server.port}</org.omg.CORBA.ORBInitialPort>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<id>clear-database</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skipTests>${test-skip-corba}</skipTests>
<includes>
<include>org.eclipse.persistence.testing.tests.ClearDatabaseSchemaTest</include>
</includes>
</configuration>
</execution>
<execution>
<id>test-corba</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skipTests>${test-skip-corba}</skipTests>
<includes>
<include>org.eclipse.persistence.testing.tests.corba.CorbaTestModel</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>
</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>
</profile>
<profile>
<id>test-corba</id>
<properties>
<test-skip-corba>false</test-skip-corba>
</properties>
</profile>
</profiles>
</project>