<?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>

  <parent>
    <groupId>org.fcrepo</groupId>
    <artifactId>fcrepo</artifactId>
    <version>3.8.1</version>
  </parent>

  <artifactId>fcrepo-installer</artifactId>
  <packaging>jar</packaging>
  <name>Fedora Installer</name>

  <build>

    <resources>
      <resource>
        <directory>${project.build.directory}/maven-shared-archive-resources/server</directory>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>${project.build.directory}/maven-shared-archive-resources/webapp-context</directory>
        <filtering>false</filtering>
      </resource>
    </resources>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>utilities-main</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>

            <configuration>

              <classifier>utilities-main</classifier>
              <archive>
                <manifest>
                  <mainClass>org.fcrepo.utilities.install.Installer</mainClass>
                </manifest>
              </archive>

              <includes>
                <include>org/fcrepo/utilities/**</include>
                <include>org/fcrepo/server/**</include>
                <include>**/fedorausers-mapping.xml</include>
                <include>**/webxml-mapping.xml</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>

          <!-- Create the fedorahome.zip -->
          <execution>
            <id>fedora-home-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>

            <configuration>
              <filters>
                <filter>${basedir}/src/main/filters/filter.properties</filter>
              </filters>
              <descriptors>
                <descriptor>${basedir}/src/main/assembly/fedora-home.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>

          <!-- Create the fedora installer -->
          <execution>
            <id>fedora-installer-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>

            <configuration>

              <appendAssemblyId>false</appendAssemblyId>
              <finalName>fcrepo-installer-${project.version}</finalName>

              <descriptors>
                <descriptor>src/main/assembly/fedora-installer.xml</descriptor>
              </descriptors>
              <archive>
                <manifest>
                  <mainClass>com.simontuffs.onejar.Boot</mainClass>
                </manifest>
              </archive>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>process-remote-resources</id>
            <goals>
              <goal>process</goal>
            </goals>
	        <configuration>
	          <resourceBundles>
	            <resourceBundle>org.fcrepo:fcrepo-shared-resources:${project.version}</resourceBundle>
	          </resourceBundles>
	        </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-betwixt</groupId>
      <artifactId>commons-betwixt</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
      <version>1.1.1</version>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-webapp-fedora</artifactId>
      <version>${project.version}</version>
      <type>war</type>
    </dependency>

    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat</artifactId>
      <version>7.0.55</version>
      <type>zip</type>
    </dependency>

    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derbyclient</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
      <version>1.7</version>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>log4j-over-slf4j</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4.1</version>
    </dependency>

    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.21</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-common</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-security-pdp</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-webapp-democontent</artifactId>
      <type>war</type>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-webapp-fop</artifactId>
      <type>war</type>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-webapp-saxon</artifactId>
      <type>war</type>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-webapp-imagemanip</artifactId>
      <type>war</type>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-client-admin</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-client-messaging</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-client-messaging</artifactId>
      <version>${project.version}</version>
      <classifier>fedora-messaging</classifier>
      <type>zip</type>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>one-jar-boot</artifactId>
      <version>0.96</version>
    </dependency>
    <dependency>
      <groupId>org.openrdf.sesame</groupId>
      <artifactId>sesame-model</artifactId>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>mulgara-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.security</groupId>
      <artifactId>jboss-sunxacml</artifactId>
    </dependency>

    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>9.3-1102-jdbc41</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
    </dependency>

    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>

  </dependencies>
</project>
