<?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-client</artifactId>
    <version>3.7.1</version>
  </parent>

  <artifactId>fcrepo-client-messaging</artifactId>
  <packaging>jar</packaging>
  <name>Fedora Messaging Client Library</name>

  <build>

    <resources>
      <resource>
        <directory>**/resources</directory>
        <excludes>
          <exclude>*</exclude>
        </excludes>
      </resource>
    </resources>
    
    <plugins>

      <!-- 
      To be re-evaluated when ANT is no longer supported.
      TestMessagingClient does not work in ANT or Maven2 
      -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <!-- 
        All unit tests in 'client' begin with 'Test*' 
        (that is reserved for integration-tests) 
        -->
        <configuration>
          <includes>
            <include>**/*Test*</include>
          </includes>
          <excludes>
            <exclude>${nestedClassTests}</exclude>
            <exclude>**/TestMessagingClient*</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>fcrepo-client-messaging-jar</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <finalName>${project.artifactId}-${project.version}</finalName>
              <archive>
                <addMavenDescriptor>false</addMavenDescriptor>
                <manifest>
                  <!-- <addClasspath>true</addClasspath> -->
                  <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                </manifest>
                <manifestEntries>
                  <Version>${project.version}</Version>
                  <Build>${timestamp}</Build>
                </manifestEntries>
              </archive>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          
          <!-- Create the client-messaging.zip -->
          <execution>
            <id>fcrepo-messaging-zip-assembly</id> 
            <phase>package</phase> 
            <goals>
              <goal>single</goal> 
            </goals>
            <configuration>
              <descriptors>
                <descriptor>${basedir}/src/main/resources/assemblies/client-messaging.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
          
          <execution>
            <id>fcrepo-messaging-jar-assembly</id> 
            <phase>package</phase> 
            <goals>
              <goal>single</goal> 
            </goals>
            <configuration>
              <descriptors>
                <descriptor>${basedir}/src/main/resources/assemblies/client-messaging-jar.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
          
        </executions>
      </plugin>

    </plugins>

  </build>

  <dependencies>

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

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

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-server</artifactId>
      <version>${project.version}</version>
    </dependency>
    
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-all</artifactId>
    </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>com.sun.xml.stream</groupId>
      <artifactId>sjsxp</artifactId>
      <version>1.0.1</version>
    </dependency>

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

    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-i18n</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.abdera</groupId>
      <artifactId>abdera-parser</artifactId>
    </dependency>
    
    <dependency>
      <groupId>org.apache.ws.commons.axiom</groupId>
      <artifactId>axiom-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.ws.commons.axiom</groupId>
      <artifactId>axiom-impl</artifactId>
    </dependency>

  </dependencies>
</project>
