<?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.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>9</version>
    <relativePath />
  </parent>

  <groupId>ca.islandora</groupId>
  <artifactId>islandora-parent</artifactId>
  <packaging>pom</packaging>
  <version>0.0.1</version>
  <url>http://islandora.ca/CLAW</url>

  <name>Islandora CLAW :: Parent POM</name>

  <repositories>
    <repository>
      <id>snapshots-repo</id>
      <url>http://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <properties>
    <project_name>Alpaca</project_name>
    <project_organization>Islandora-CLAW</project_organization>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <activemq.version>5.11.1</activemq.version>
    <camel.version>2.15.1</camel.version>
    <camel.version.range>[2.15.1, 3)</camel.version.range>
    <commons-io.version>2.4</commons-io.version>
    <cxf.version>3.1.4</cxf.version>
    <fcrepo.camel.version>4.4.0</fcrepo.camel.version>
    <mustache.version>0.9.0</mustache.version>
    <slf4j.version>1.7.12</slf4j.version>
    <log4j.version>1.2.17</log4j.version>
    <scriptengines-javascript.version>1.1.1</scriptengines-javascript.version>
    <osgi.version>4.3.1</osgi.version>
    <asm.version>4.0</asm.version>
    <!-- plugins -->
    <compiler.plugin.version>2.5.1</compiler.plugin.version>
    <resources.plugin.version>2.6</resources.plugin.version>
    <bundle.plugin.version>2.3.7</bundle.plugin.version>
    <build.helper.plugin.version>1.9.1</build.helper.plugin.version>
    <!-- OSGi -->
    <islandora.osgi.export.pkg>ca.islandora.component;version="${project.version}"</islandora.osgi.export.pkg>
    <islandora.osgi.import.pkg />
    <islandora.osgi.private.pkg />
  </properties>

  <modules>
    <module>sync</module>
    <module>component</module>
    <module>karaf</module>
    <module>indexing</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-core</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-blueprint</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-mustache</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-http4</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-cache</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-servlet</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-cxf</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-script</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-base64</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-exec</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-http</artifactId>
        <version>${camel.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-camel</artifactId>
        <version>${activemq.version}</version>
      </dependency>
      <dependency>
        <groupId>org.fcrepo.camel</groupId>
        <artifactId>fcrepo-camel</artifactId>
        <version>${fcrepo.camel.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-all</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.core</artifactId>
        <version>${osgi.version}</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.compendium</artifactId>
        <version>${osgi.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxrs</artifactId>
        <version>${cxf.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.scriptengines</groupId>
        <artifactId>scriptengines-javascript</artifactId>
        <version>${scriptengines-javascript.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.spullara.mustache.java</groupId>
        <artifactId>compiler</artifactId>
        <version>${mustache.version}</version>
      </dependency>
      <dependency>
        <groupId>ca.islandora.component</groupId>
        <artifactId>islandora-camel-component</artifactId>
        <version>${project.version}</version>
      </dependency>
      <!-- logging -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
      </dependency>
      <!-- Testing & Camel Plugin -->
      <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-test-blueprint</artifactId>
        <version>${camel.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <defaultGoal>install</defaultGoal>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <excludes>
          <exclude>OSGI-INF/**/*</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>OSGI-INF/**/*</include>
        </includes>
      </resource>
    </resources>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${compiler.plugin.version}</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${resources.plugin.version}</version>
          <configuration>
            <encoding>UTF-8</encoding>
          </configuration>
         <executions>
           <execution>
             <id>filter</id>
             <phase>generate-resources</phase>
             <goals>
               <goal>resources</goal>
             </goals>
           </execution>
         </executions>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        
        <!-- MANIFEST-FILE of the bundle -->
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>${bundle.plugin.version}</version>
          <extensions>true</extensions>
          <configuration>
            <instructions>
              <Bundle-Name>${project.artifactId}</Bundle-Name>
              <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
              <Bundle-Version>${project.version}</Bundle-Version>
              <Export-Package>${islandora.osgi.export.pkg}</Export-Package>
              <Import-Package>
                ${islandora.osgi.import.pkg},
                org.apache.camel.*;version="${camel.version.range}",
                *
              </Import-Package>
              <Private-Package>${islandora.osgi.private.pkg}</Private-Package>
              <Implementation-Title>${project.name}</Implementation-Title>
              <Implementation-Version>${project.version}</Implementation-Version>
            </instructions>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${build.helper.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>com.github.github</groupId>
          <artifactId>site-maven-plugin</artifactId>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.1</version>
          <configuration>
            <!-- see http://jira.codehaus.org/browse/MRELEASE-424 -->
            <mavenExecutorId>forked-path</mavenExecutorId>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-provider-gitexe</artifactId>
              <version>1.8.1</version>
            </dependency>
          </dependencies>
				</plugin> 
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
        </plugin>
        <plugin>
          <artifactId>maven-changelog-plugin</artifactId>
        </plugin>
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
          </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
          <configuration>
            <linksource>true</linksource>
            <quiet>true</quiet>
          </configuration>
          <executions>
            <execution>
              <id>verify-javadocs</id>
              <goals>
                <goal>jar</goal>
                <goal>test-jar</goal>
              </goals>
            </execution>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
                <goal>javadoc</goal>
              </goals>
              <phase>site</phase>
            </execution>
          </executions>
				</plugin>
      </plugins>
    </pluginManagement>
  </build>
  
  <prerequisites>
    <maven>3.0.0</maven>
  </prerequisites>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <useAgent>true</useAgent>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <pluginRepositories>
    <pluginRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>

    <pluginRepository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/content/repositories/releases</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>
 
  <developers>
    <developer>
      <id>dannylamb</id>
      <name>Daniel Lamb</name>
      <email>dlamb @ (domain of organization url)</email>
      <organization>Islandora Foundation</organization>
      <organizationUrl>http://islandora.ca</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>-4</timezone>
    </developer>
    <developer>
      <id>ruebot</id>
      <name>Nick Ruest</name>
      <email>ruestn @ (domain of organization url)</email>
      <organization>York University</organization>
      <organizationUrl>http://yorku.ca/</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>-5</timezone>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:Islandora-CLAW/Alpaca.git</connection>
    <developerConnection>scm:git:git@github.com:Islandora-CLAW/Alpaca.git</developerConnection>
    <url>https://github.com/islandora-claw/Alpaca</url>
    <tag>islandora-parent-0.0.1</tag>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/Islandora-CLAW/CLAW/issues</url>
  </issueManagement>

  <licenses>
    <license>
      <name>MIT</name>
      <url>https://opensource.org/licenses/MIT</url>
      <comments>Copyright (c) 2015 Islandora Foundation</comments>
    </license>
  </licenses>

  <distributionManagement>
    <site>
      <id>gh-pages</id>
      <name>Deployment through GitHub's site deployment plugin</name>
      <url>site/${project.version}</url>
    </site>
  </distributionManagement>

  <mailingLists>
    <mailingList>
      <name>islandora-dev</name>
      <subscribe>islandora-dev+subscribe@googlegroups.com</subscribe>
      <unsubscribe>islandora-dev+unsubscribe@googlegroups.com</unsubscribe>
      <post>islandora-dev@googlegroups.com</post>
      <archive>https://groups.google.com/d/forum/islandora-dev</archive>
    </mailingList>
  </mailingLists>

</project>
