<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>nvx-hornet-parent</artifactId>
    <packaging>pom</packaging>
    <version>2.0-SNAPSHOT</version>
    <name>Hornet Parent (X Platform Topic Oriented Applications)</name>

    <parent>
        <groupId>com.neeve</groupId>
        <artifactId>nvx-os-parent</artifactId>
        <version>1.1.4</version>
    </parent>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <organization>
        <name>Neeve Research, LLC</name>
        <url>http://www.neeveresearch.com</url>
    </organization>

    <scm>
        <url>https://github.com/neeveresearch/nvx-hornet</url>
        <connection>scm:git:git://github.com/neeveresearch/nvx-hornet.git</connection>
    </scm>

    <properties>
        <nvx.rumi.version>4.0.629</nvx.rumi.version>
        <nvx.rumi.minorversion>4.0</nvx.rumi.minorversion>
        <build.version.display>${project.version}</build.version.display>
    </properties>

    <modules>
        <module>nvx-hornet</module>
        <module>nvx-hornet-hk2</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <target>1.8</target>
                    <source>1.8</source>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <!-- This configures the generic javadoc configuration for submodules -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>aggregate-javadoc</id>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                    <execution>
                        <id>javadoc-jar</id>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                        <phase>package</phase>
                    </execution>
                </executions>
                <inherited>false</inherited>
                <configuration>
                    <doctitle><![CDATA[<h1>Hornet ${project.version} API</h1>]]></doctitle>
                    <windowtitle><![CDATA[Hornet ${project.version} API]]></windowtitle>
                    <links>
                        <link>http://build.neeveresearch.com/rumi/javadoc/${nvx.rumi.minorversion}/${nvx.rumi.version}/</link>
                    </links>
                    <groups>
                        <group>
                            <title>Hornet Core (X Platform Topic Oriented Applications)</title>
                            <packages>
                                com.neeve.toa:com.neeve.toa.opt:com.neeve.managed:com.neeve.managed.*:com.neeve.toa.service:com.neeve.toa.spi
                            </packages>
                        </group>
                        <group>
                            <title>Hornet HK2 (HK2 Plugin for Hornet)</title>
                            <packages>
                                com.neeve.managed.hk2
                            </packages>
                        </group>
                    </groups>
                    <subpackages>
                        <!-- Core Hornet -->
                        com.neeve.managed
                        com.neeve.managed.annotations
                        com.neeve.toa
                        com.neeve.toa.opt
                        com.neeve.toa.service
                        com.neeve.toa.spi
                        <!-- Hornet HK2 -->
                        com.neeve.managed.hk2
                    </subpackages>
                    <excludePackageNames>
                        com.neeve.toa.service.jaxb
                        com.neeve.toa.tools
                        com.neeve.toa.opt.impl
                    </excludePackageNames>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>

                <!-- Copy xsd to target directory so they can be published -->
                <executions>
                    <execution>
                        <id>copy-xsds</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/schema</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${project.build.directory}/classes</directory>
                                    <includes>
                                        <include>**/*.xsd</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <!-- This configures the generic javadoc configuration for submodules -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.2.0</version>
                    <executions>
                        <execution>
                            <id>javadoc-jar</id>
                            <goals>
                                <goal>jar</goal>
                                <goal>resource-bundle</goal>
                            </goals>
                            <phase>package</phase>
                        </execution>
                    </executions>
                    <configuration>
                        <doctitle><![CDATA[<h1>${project.name}</h1>]]></doctitle>
                        <windowtitle><![CDATA[${project.name} API]]></windowtitle>
                        <bottom><![CDATA[<i>Copyright &#169; 2016 ${vendor.name}. All Rights Reserved.</i>]]></bottom>
                        <quiet>true</quiet>
                        <show>protected</show>
                        <breakiterator>true</breakiterator>
                        <linksource>false</linksource>
                        <author>true</author>
                        <version>true</version>
                        <use>false</use>
                        <tags>
                            <tag>
                                <name>threading</name>
                                <head>Threading:</head>
                                <placement>a</placement>
                            </tag>
                        </tags>
                        <links>
                            <link>http://build.neeveresearch.com/rumi/javadoc/${nvx.rumi.minorversion}/${nvx.rumi.version}/</link>
                        </links>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.10</version>
                    <configuration>
                        <workingDirectory>${project.build.directory}/testbed</workingDirectory>
                        <forkMode>always</forkMode>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.7</version>
                    <configuration>
                        <properties>
                            <property>
                                <name>nvx.rumi.version</name>
                                <version>[4.0.0,4.0.10000]</version>
                                <dependencies>
                                    <dependency>
                                        <groupId>com.neeve</groupId>
                                        <artifactId>nvx-rumi</artifactId>
                                    </dependency>
                                </dependencies>
                            </property>
                        </properties>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>com.neeve</groupId>
                    <artifactId>nvx-rumi-adm-maven-plugin</artifactId>
                    <version>${nvx.rumi.version}</version>
                </plugin>

                <!-- Skip enforcer plugin (caused problems withe javadoc fork) -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>

                <!-- For releases -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <version>1.9.5</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <repositories>
        <repository>
            <id>neeve-public-release</id>
            <url>http://nexus.neeveresearch.com/nexus/content/repositories/public-releases/</url>
            <name>Neeve Public Release Repo</name>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        <repository>
            <id>neeve-public-milestone</id>
            <url>http://nexus.neeveresearch.com/nexus/content/repositories/public-milestones/</url>
            <name>Neeve Public Milestones Repo</name>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        <repository>
            <id>neeve-public-snapshot</id>
            <url>http://nexus.neeveresearch.com/nexus/content/repositories/public-snapshots/</url>
            <name>Neeve Public Snapshots Repo</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
        <repository>
            <id>neeve-central</id>
            <url>http://nexus.neeveresearch.com/nexus/content/groups/public/</url>
            <name>Neeve Central</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        <repository>
            <id>neeve-snapshot</id>
            <url>http://nexus.neeveresearch.com/nexus/content/repositories/snapshots/</url>
            <name>Neeve Snapshot Repo</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>


    <pluginRepositories>
        <pluginRepository>
            <id>neeve-central</id>
            <url>http://nexus.neeveresearch.com/nexus/content/repositories/public/</url>
            <name>Neeve Milestones Repo</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
        <pluginRepository>
            <id>neeve-public-snapshot</id>
            <url>http://nexus.neeveresearch.com/nexus/content/repositories/public-snapshots/</url>
            <name>Neeve Public Snapshot Repo</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
        <pluginRepository>
            <id>neeve-public-release</id>
            <url>http://nexus.neeveresearch.com/nexus/content/repositories/public-releases/</url>
            <name>Neeve Public Release Repo</name>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
        <pluginRepository>
            <id>neeve-public-milestone</id>
            <url>http://nexus.neeveresearch.com/nexus/content/repositories/public-milestones/</url>
            <name>Neeve Public Milestones Repo</name>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    <profiles>
        <profile>
            <!-- Bundles up entire project as a zip -->
            <id>project-bundle</id>
            <properties>
                <buildDocs>true</buildDocs>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.2</version>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>project-bundle</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <inherited>false</inherited>
                                <configuration>
                                    <attach>true</attach>
                                    <tarLongFileMode>gnu</tarLongFileMode>
                                    <descriptor>project-bundle-descriptor.xml</descriptor>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
