<?xml version="1.0" encoding="UTF-8"?>
<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>
    <groupId>com.googlecode.redbox-mint</groupId>
    <artifactId>redbox</artifactId>
    <version>1.10.2</version>
    <packaging>pom</packaging>
    <name>ReDBox</name>
    <parent>
        <groupId>com.googlecode.redbox-mint</groupId>
        <artifactId>redbox-project</artifactId>
        <version>1.10.2</version>
        <relativePath>parent/pom.xml</relativePath>
    </parent>
    <modules>
        <module>config</module>
        <module>parent</module>
        <module>plugins/transaction/curation</module>
        <module>plugins/transformer/vital-fedora2</module>
        <module>plugins/transformer/vital-fedora3</module>
        <module>secure-api</module>
    </modules>
    <!-- Typically these would be provided by an institutional build, but these
        are ok for fallback defaults and/or debugging values. -->
    <properties>
        <server.port>9000</server.port>
        <amq.port>9101</amq.port>
        <amq.stomp.port>9102</amq.stomp.port>
        <server.url.base>http://${ip.address}:${server.port}/redbox/</server.url.base>
        <mint.proxy.server>http://localhost:9001</mint.proxy.server>
        <mint.amq.broker>tcp://localhost:9201</mint.amq.broker>
        <dir.home>${project.home}/home</dir.home>
        <dir.portal>${project.home}/portal</dir.portal>
        <dir.data>${project.home}/data</dir.data>
        <dir.server>${project.home}/server</dir.server>
        <dir.solr>${project.home}/solr</dir.solr>
        <dir.storage>${project.home}/storage</dir.storage>
        <smtp.host>localhost</smtp.host>
        <admin.email>admin@localhost</admin.email>
        <groovy.version>2.4.5</groovy.version>
        <!-- Control scripts try to auto-detect proxy. Use this value if you want
            Java to specifically exclude certain hosts from proxying. -->
        <non.proxy.hosts>localhost</non.proxy.hosts>
    </properties>
    <dependencies>
        <!-- Fascinator -->
        <dependency>
            <groupId>com.googlecode.the-fascinator</groupId>
            <artifactId>fascinator-portal</artifactId>
            <type>war</type>
            <classifier>skinny</classifier>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.the-fascinator</groupId>
            <artifactId>fascinator-portal</artifactId>
            <type>jar</type>
            <classifier>classes</classifier>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.the-fascinator</groupId>
            <artifactId>fascinator-config-db</artifactId>
            <version>0.3</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.redbox-mint</groupId>
            <artifactId>redbox-reports</artifactId>
            <version>1.3</version>
        </dependency>
        <!-- Solr Web App -->
        <dependency>
            <groupId>org.apache.solr</groupId>
            <artifactId>solr</artifactId>
            <type>war</type>
            <version>3.3.0</version>
        </dependency>
        <!-- Jetty Web Server -->
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jsp-2.1-jetty</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <!--<dependency>-->
            <!--<groupId>org.eclipse.jetty</groupId>-->
            <!--<artifactId>jetty-jsp</artifactId>-->
            <!--<version>9.2.25.v20180606</version>-->
        <!--</dependency>-->
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-spring</artifactId>
            <version>${jetty.version}</version>
            <exclusions>
                <!-- Facsinator will bring JCL-over-SLF4J. Although the logback JARs
                    must be in Jetty's own /lib folder. http://logback.qos.ch/faq.html#setup_jetty -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>start</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <!-- ReDBox Content -->
        <dependency>
            <groupId>com.googlecode.redbox-mint</groupId>
            <artifactId>redbox-secure-api</artifactId>
            <version>1.10.1</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.redbox-mint</groupId>
            <artifactId>redbox-config</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.redbox-mint</groupId>
            <artifactId>plugin-transaction-curation-redbox</artifactId>
            <version>1.10</version>
        </dependency>
        <!-- Fascinator Plugins -->
        <dependency>
            <groupId>com.googlecode.the-fascinator.plugins</groupId>
            <artifactId>plugin-access-db</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.the-fascinator.plugins</groupId>
            <artifactId>plugin-authentication-internal</artifactId>
            <version>1.4</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.the-fascinator.plugins</groupId>
            <artifactId>plugin-harvester-workflow</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.the-fascinator.plugins</groupId>
            <artifactId>plugin-indexer-solr</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.the-fascinator.plugins</groupId>
            <artifactId>plugin-roles-internal</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.the-fascinator.plugins</groupId>
            <artifactId>plugin-storage-filesystem</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.the-fascinator.plugins</groupId>
            <artifactId>plugin-subscriber-solrEventLog</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.the-fascinator.plugins</groupId>
            <artifactId>plugin-transformer-jsonVelocity</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.the-fascinator.plugins</groupId>
            <artifactId>plugin-transformer-jsonVelocity-pdf</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.redbox-mint</groupId>
            <artifactId>redbox-web-service</artifactId>
            <version>1.1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mailapi</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>au.com.redboxresearchdata</groupId>
            <artifactId>orcid-java-client</artifactId>
            <version>0.12.3</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- This is a workaround to get submodules working with the maven release
                plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <id>invoke build</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>git</executable>
                    <arguments>
                        <argument>submodule</argument>
                        <argument>update</argument>
                        <argument>--init</argument>
                        <argument>--recursive</argument>
                    </arguments>
                </configuration>
            </plugin>
            <!-- Use Groovy to define a clean path to the top level directory. Windows
                pathing can be problematic, so we fix that here too -->
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>default</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <scripts>
                                <script>file:///${project.basedir}/setup.groovy</script>
                            </scripts>
                        </configuration>
                    </execution>
                    <execution>
                        <id>clean</id>
                        <phase>pre-clean</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <scripts>
                                <script>file:///${project.basedir}/setup.groovy</script>
                            </scripts>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>${groovy.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>
                                            exec-maven-plugin
                                        </artifactId>
                                        <versionRange>[1.1,)</versionRange>
                                        <goals>
                                            <goal>exec</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>deploy-server</id>
            <!-- Allows downstream POMs to trigger this profile by adding a marker
                file to the project root -->
            <activation>
                <file>
                    <exists>deploy.server</exists>
                </file>
            </activation>
            <dependencies>
                <!-- Needs the cd plugin, so errors outside this build profile -->
                <dependency>
                    <groupId>com.googlecode.the-fascinator</groupId>
                    <artifactId>fascinator-portal</artifactId>
                    <type>warpath</type>
                    <version>1.6</version>
                </dependency>
            </dependencies>
            <!-- The standard build/deploy process for making a server -->
            <build>
                <resources>
                    <resource>
                        <directory>src/main/config/home</directory>
                    </resource>
                    <resource>
                        <directory>src/main/config/portal</directory>
                    </resource>
                    <resource>
                        <directory>src/main/config/server</directory>
                    </resource>
                    <resource>
                        <directory>src/main/config/data</directory>
                    </resource>
                </resources>
                <plugins>
                    <!-- Support retrieving dependencies from WAR artifacts -->
                    <plugin>
                        <groupId>org.appfuse</groupId>
                        <artifactId>maven-warpath-plugin</artifactId>
                        <version>2.0.2</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>add-classes</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Remove previously deployed files -->
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <version>2.4.1</version>
                        <configuration>
                            <filesets>
                                <fileset>
                                    <directory>${dir.server}</directory>
                                    <includes>
                                        <include>lib/*.jar</include>
                                        <include>plugins/*.jar</include>
                                    </includes>
                                </fileset>
                            </filesets>
                        </configuration>
                    </plugin>
                    <!-- Copy dependencies and configuration resources -->
                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>2.1</version>
                        <executions>
                            <!-- Unpack SKOS harvest config -->
                            <execution>
                                <id>unpack-harvest-config</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>unpack-dependencies</goal>
                                </goals>
                                <configuration>
                                    <includeGroupIds>com.googlecode.the-fascinator.plugins</includeGroupIds>
                                    <includeArtifactIds>plugin-harvester-skos</includeArtifactIds>
                                    <includes>harvest/**,data/**</includes>
                                    <outputDirectory>${dir.home}</outputDirectory>
                                </configuration>
                            </execution>
                            <!-- Unpack common workflow configuration -->
                            <execution>
                                <id>unpack-workflows</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <includes>workflows/**</includes>
                                    <outputDirectory>${dir.home}/harvest</outputDirectory>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>com.googlecode.the-fascinator</groupId>
                                            <artifactId>fascinator-common</artifactId>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                            <!-- Fascinator application -->
                            <execution>
                                <id>copy-webapp</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${dir.server}/webapps</outputDirectory>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>com.googlecode.the-fascinator</groupId>
                                            <artifactId>fascinator-portal</artifactId>
                                            <type>war</type>
                                            <classifier>skinny</classifier>
                                            <destFileName>portal.war</destFileName>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                            <!-- Unpack Solr WAR -->
                            <execution>
                                <id>unpack-solr-war</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <!-- Make sure we don't unpack the bundled logging JAR. Fascinator
                                        will provide logback instead. -->
                                    <excludes>WEB-INF/lib/slf4j-jdk14-1.6.1.jar</excludes>
                                    <outputDirectory>${dir.server}/webapps/solr</outputDirectory>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.apache.solr</groupId>
                                            <artifactId>solr</artifactId>
                                            <type>war</type>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                            <!-- Unpack default Solr configuration -->
                            <execution>
                                <id>unpack-solr-config</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <includes>solr/**</includes>
                                    <outputDirectory>${dir.data}</outputDirectory>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>com.googlecode.the-fascinator.plugins</groupId>
                                            <artifactId>plugin-indexer-solr</artifactId>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                            <!-- Unpack default Fascinator portal -->
                            <execution>
                                <id>unpack-portal</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <includes>portal/**,home/**</includes>
                                    <outputDirectory>${project.home}</outputDirectory>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>com.googlecode.the-fascinator</groupId>
                                            <artifactId>fascinator-portal</artifactId>
                                            <type>war</type>
                                            <classifier>skinny</classifier>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                            <!-- Fascinator plugins (without dependencies) -->
                            <execution>
                                <id>copy-plugins</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <configuration>
                                    <includeGroupIds>com.googlecode.the-fascinator.plugins</includeGroupIds>
                                    <outputDirectory>${dir.server}/plugins</outputDirectory>
                                    <excludeTransitive>true</excludeTransitive>
                                </configuration>
                            </execution>
                            <!-- Plugin dependencies -->
                            <execution>
                                <id>copy-plugin-dependencies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <configuration>
                                    <excludeTypes>war,warpath</excludeTypes>
                                    <excludeGroupIds>com.googlecode.the-fascinator.plugins,org.mortbay.jetty
                                    </excludeGroupIds>
                                    <outputDirectory>${dir.server}/lib</outputDirectory>
                                </configuration>
                            </execution>
                            <!-- Jetty launcher -->
                            <execution>
                                <id>copy-jetty-start</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.mortbay.jetty</groupId>
                                            <artifactId>start</artifactId>
                                        </artifactItem>
                                    </artifactItems>
                                    <outputDirectory>${dir.server}/jetty</outputDirectory>
                                    <stripVersion>true</stripVersion>
                                </configuration>
                            </execution>
                            <!-- Jetty dependencies -->
                            <execution>
                                <id>copy-jetty-dependencies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <configuration>
                                    <includeGroupIds>org.mortbay.jetty</includeGroupIds>
                                    <excludeArtifactIds>start</excludeArtifactIds>
                                    <outputDirectory>${dir.server}/jetty/lib</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <repositories>
        <repository>
            <id>fascinator-snapshots</id>
            <url>http://dev.redboxresearchdata.com.au/nexus/content/repositories/central-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>redbox-nexus</id>
            <url>http://dev.redboxresearchdata.com.au/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <scm>
        <url>https://github.com/redbox-mint/redbox.git</url>
        <connection>scm:git:git@github.com:redbox-mint/redbox.git</connection>
        <developerConnection>scm:git:git@github.com:redbox-mint/redbox.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
</project>
