<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>16</version>
    </parent>

    <groupId>org.jboss.openjdk-orb</groupId>
    <artifactId>openjdk-orb</artifactId>
    <version>8.0.6.Final</version>
    <packaging>jar</packaging>
    <description>JBoss repackaging of the OpenJDK ORB</description>

    <name>OpenJDK ORB</name>

    <licenses>
        <license>
            <name>gpl</name>
            <url>http://openjdk.java.net/legal/gplv2+ce.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:${openjdk.orb.scm.url}</connection>
        <developerConnection>scm:git:${openjdk.orb.scm.url}</developerConnection>
        <url>${openjdk.orb.scm.url}</url>
      <tag>openjdk-orb-8.0.6.Final</tag>
  </scm>

    <properties>
        <openjdk.orb.scm.connection>git@github.com:jboss/openjdk-orb.git</openjdk.orb.scm.connection>
        <openjdk.orb.scm.url>https://github.com/jboss/openjdk-orb</openjdk.orb.scm.url>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <source.code.dir>src/share/classes</source.code.dir>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jboss.spec.javax.transaction</groupId>
            <artifactId>jboss-transaction-api_1.2_spec</artifactId>
            <version>1.0.0.Final</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>idlj-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourceDirectory>${source.code.dir}</sourceDirectory>
                    <sources>
                        <source>
                            <excludes>
                                <exclude>**/orb.idl</exclude>
                                <exclude>**/corba.idl</exclude>
                                <exclude>**/CORBAX.idl</exclude>
                                <exclude>com/sun/tools/corba/**/*.idl</exclude>
                            </excludes>
                            <emitStubs>true</emitStubs>
                            <emitSkeletons>true</emitSkeletons>
                            <packagePrefixes>
                                <packagePrefix>
                                    <type>CosNaming</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>CSI</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>CSIIOP</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>Dynamic</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>DynamicAny</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>GSSUP</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>IOP</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>Messaging</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>PortableInterceptor</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>PortableServer</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>Security</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>SSLIOP</type>
                                    <prefix>org.omg</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>activation</type>
                                    <prefix>com.sun.corba.se.spi</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>GIOP</type>
                                    <prefix>com.sun.corba.se.spi</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>messages</type>
                                    <prefix>com.sun.corba.se.spi</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>PortableActivationIDL</type>
                                    <prefix>com.sun.corba.se.spi</prefix>
                                </packagePrefix>
                            </packagePrefixes>
                            <compatible>false</compatible>
                            <defines>
                                <define>
                                    <symbol>CORBA3</symbol>
                                </define>
                            </defines>
                            <additionalArguments>
                                <additionalArgument>-corba</additionalArgument>
                                <additionalArgument>3.0</additionalArgument>
                            </additionalArguments>
                        </source>
                    </sources>
                    <includeDirs>
                        <includeDir>src/share/classes/org/omg/CORBA</includeDir>
                        <includeDir>src/share/classes/org/omg/CSI</includeDir>
                        <includeDir>src/share/classes/org/omg/IOP</includeDir>
                        <includeDir>src/share/classes/org/omg/PortableServer</includeDir>
                        <includeDir>src/share/classes/org/omg/PortableInterceptor</includeDir>
                        <includeDir>src/share/classes/org/omg/Security</includeDir>
                    </includeDirs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>logutil/generate_loggers.sh</executable>
                    <environmentVariables>
                        <JAVA_HOME>${java.home}</JAVA_HOME>
                        <BASE_DIR>${basedir}</BASE_DIR>
                        <SOURCE_DIR>${basedir}/${source.code.dir}</SOURCE_DIR>
                        <TARGET_DIR>${project.build.directory}</TARGET_DIR>
                    </environmentVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${source.code.dir}</source>
                                <source>${project.build.directory}/generated-sources/idl</source>
                                <source>${project.build.directory}/generated-sources/log</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>${project.build.directory}/generated-sources/log</directory>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
        </resources>
    </build>
</project>
