<?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.modeshape</groupId>
    <artifactId>modeshape-parent</artifactId>
    <version>3.0.0.Alpha1</version>
    <relativePath>../modeshape-parent</relativePath>
  </parent>

  <!-- The groupId and version values are inherited from parent -->
  <artifactId>modeshape-jcr</artifactId>
  <packaging>jar</packaging>
  <name>ModeShape JCR Repository</name>
  <description>ModeShape implementation of the JCR API</description>
  <url>http://www.modeshape.org</url>
  <!--
    Define the dependencies. Note that all version and scopes default to those defined in the dependencyManagement section of the
    parent pom.
  -->
  <dependencies>
    <!-- Public API (beyond JCR 2.0) -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>modeshape-jcr-api</artifactId>
    </dependency>
    <!-- This should eventually get refactored into this project -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>modeshape-common</artifactId>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
    </dependency>
    <!-- Infinispan -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>modeshape-schematic</artifactId>
    </dependency>
    <!-- Hibernate Search engine (does not use Hibernate Core or JPA!) -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-search-engine</artifactId>
      <version>${hibernate.search.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-search-analyzers</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- Hibernate Search engine (does not use Hibernate Core or JPA!) -->
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-core</artifactId>
      <version>${lucene.version}</version>
    </dependency>
    
    <!--  Used in tests -->
    <dependency>
      <groupId>org.modeshape</groupId>
      <artifactId>modeshape-common</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <!-- Infinispan -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>modeshape-schematic</artifactId>
    </dependency>
    <!-- MIME-type detection. This dependency can be omitted by clients, either by removing the aperture.jar or excluding it from their pom-->
    <dependency>
        <groupId>org.semanticdesktop</groupId>
        <artifactId>aperture</artifactId>
        <version>1.1.0.Beta1</version>
        <!-- Exclude these since they are not needed for MIME-type detection -->
        <exclusions>
            <exclusion>
                <groupId>javax.activation</groupId>
                <artifactId>activation</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.gnowsis</groupId>
                <artifactId>applewrapper</artifactId>
            </exclusion>
            <exclusion>
                <groupId>bouncycastle</groupId>
                <artifactId>bcmail-jdk14</artifactId>
            </exclusion>
            <exclusion>
                <groupId>bouncycastle</groupId>
                <artifactId>bcprov-jdk14</artifactId>
            </exclusion>
            <exclusion>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
            </exclusion>
            <exclusion>
                <groupId>commons-httpclient</groupId>
                <artifactId>commons-httpclient</artifactId>
            </exclusion>
            <exclusion>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.semanticdesktop</groupId>
                <artifactId>demork</artifactId>
            </exclusion>
            <exclusion>
                <groupId>de.dfki</groupId>
                <artifactId>utils</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.aetrion</groupId>
                <artifactId>flickr</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.fontbox</groupId>
                <artifactId>fontbox</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.htmlparser</groupId>
                <artifactId>htmlparser</artifactId>
            </exclusion>
            <exclusion>
                <groupId>ical4j</groupId>
                <artifactId>ical4j</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.semanticdesktop.nepomuk</groupId>
                <artifactId>infsail</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.jacob</groupId>
                <artifactId>jacob</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.media</groupId>
                <artifactId>jai-core</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.sun.media</groupId>
                <artifactId>jai-codec</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.jaudiotagger</groupId>
                <artifactId>jaudiotagger</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl104-over-slf4j</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
            </exclusion>
            <exclusion>
                <groupId>net.wimpi</groupId>
                <artifactId>pim</artifactId>
            </exclusion>
            <exclusion>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.beetstra.jutf7</groupId>
                <artifactId>jutf7</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.mail</groupId>
                <artifactId>mail</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.drewnoakes</groupId>
                <artifactId>metadata-extractor</artifactId>
            </exclusion>
            <exclusion>
                <groupId>mstor</groupId>
                <artifactId>mstor</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.semanticdesktop.nepomuk</groupId>
                <artifactId>nrlvalidator</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.openrdf</groupId>
                <artifactId>openrdf-sesame-onejar-osgi</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
            </exclusion>
            <exclusion>
                <groupId>pdfbox</groupId>
                <artifactId>pdfbox</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-scratchpad</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.semweb4j</groupId>
                <artifactId>rdf2go.impl.base</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.semweb4j</groupId>
                <artifactId>rdf2go.impl.sesame20</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.semweb4j</groupId>
                <artifactId>rdf2go.impl.util</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-jdk14</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
            </exclusion>
            <exclusion>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.semanticdesktop.nepomuk</groupId>
                <artifactId>unionsail</artifactId>
            </exclusion>
            <exclusion>
                <groupId>winlaf</groupId>
                <artifactId>winlaf</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <!--  Used in tests -->
    <dependency>
      <groupId>org.modeshape</groupId>
      <artifactId>modeshape-common</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
       <groupId>org.infinispan</groupId>
       <artifactId>infinispan-core</artifactId>
       <version>${infinispan.version}</version>
       <type>test-jar</type>
       <scope>test</scope>
    </dependency>
    <dependency>
       <groupId>org.infinispan</groupId>
       <artifactId>infinispan-cachestore-bdbje</artifactId>
       <version>${infinispan.version}</version>
       <scope>test</scope>
    </dependency>
    <dependency>
       <groupId>org.infinispan</groupId>
       <artifactId>infinispan-cachestore-jdbm</artifactId>
       <version>${infinispan.version}</version>
       <scope>test</scope>
    </dependency>
    <dependency>
       <groupId>org.infinispan</groupId>
       <artifactId>infinispan-cachestore-jdbc</artifactId>
       <version>${infinispan.version}</version>
       <scope>test</scope>
    </dependency>
    <dependency>
       <groupId>com.h2database</groupId>
       <artifactId>h2</artifactId>
       <version>1.1.117</version>
       <scope>test</scope>
    </dependency>
    <!--
    These following are defined as 'provided' in the parent POM, since ModeShape
    has code that is optional if these APIs are available.
    -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.security.jacc</groupId>
      <artifactId>jboss-jacc-api_1.4_spec</artifactId>
    </dependency>

    <!-- 
    Testing (note the scope)
    -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.jbossts</groupId>
      <artifactId>jbossjta</artifactId>
      <version>4.15.1.Final</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>commons-httpclient</artifactId>
          <groupId>commons-httpclient</groupId>
        </exclusion>
        <exclusion>
          <artifactId>ironjacamar-spec-api</artifactId>
          <groupId>org.jboss.ironjacamar</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-logging-spi</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-logging</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-logging-processor</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-logging-generator</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jbossws-native-core</artifactId>
          <groupId>org.jboss.ws.native</groupId>
        </exclusion>
        <exclusion>
          <artifactId>emma</artifactId>
          <groupId>emma</groupId>
        </exclusion>
        <exclusion>
          <artifactId>emma_ant</artifactId>
          <groupId>emma</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hornetq-core</artifactId>
          <groupId>org.hornetq</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty</artifactId>
          <groupId>org.jboss.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>wrapper</artifactId>
          <groupId>tanukisoft</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jacorb</artifactId>
          <groupId>jacorb</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jfreechart</artifactId>
          <groupId>jfree</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-corba-ots-spi</artifactId>
          <groupId>org.jboss.integration</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-server-manager</artifactId>
          <groupId>org.jboss.jbossas</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-ejb-api_3.1_spec</artifactId>
          <groupId>org.jboss.spec.javax.ejb</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jnp-client</artifactId>
          <groupId>org.jboss.naming</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-servlet-api_3.0_spec</artifactId>
          <groupId>org.jboss.spec.javax.servlet</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jbossws-common</artifactId>
          <groupId>org.jboss.ws</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jcl-over-slf4j</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>stax-api</artifactId>
          <groupId>stax</groupId>
        </exclusion>
        <exclusion>
          <artifactId>idl</artifactId>
          <groupId>jacorb</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-logging-tools</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-connector-api_1.5_spec</artifactId>
          <groupId>org.jboss.spec.javax.resource</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-transaction-spi</artifactId>
          <groupId>org.jboss.integration</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-remoting</artifactId>
          <groupId>org.jboss.remoting</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>dom4j</artifactId>
          <groupId>dom4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-codec</artifactId>
          <groupId>commons-codec</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-logmanager</artifactId>
          <groupId>org.jboss.logmanager</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hibernate-jpa-2.0-api</artifactId>
          <groupId>org.hibernate.javax.persistence</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-logging</artifactId>
          <groupId>commons-logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jcommon</artifactId>
          <groupId>jfree</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-transaction-api_1.1_spec</artifactId>
          <groupId>org.jboss.spec.javax.transaction</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- 
    Logging (require SLF4J API for compiling, but use Log4J and its SLF4J binding for testing) 
    -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- 
      Apache JCR API unit tests (for any JCR implementation), which is a subset of the official TCK
    -->
    <dependency>
      <groupId>org.apache.jackrabbit</groupId>
      <artifactId>jackrabbit-jcr-tests</artifactId>
    </dependency>
		<!--
		PicketBox (JAAS implementation used in test cases)
		-->
    <dependency>
      <groupId>org.picketbox</groupId>
	    <artifactId>picketbox-bare</artifactId>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/resources</directory>
        <includes>
          <include>*</include>
          <include>**/*</include>
        </includes>
      </resource>
	    <!-- Apply the properties set in the POM to the resource files -->
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/repository.properties</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <!--
    	Adding OSGI metadata to the JAR without changing the packaging type.
      -->
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
		</plugins>
  </build>
	<profiles>
		<profile>
			<id>assembly</id>
			<build>
	    	<plugins>
		      <plugin>
		        <artifactId>maven-assembly-plugin</artifactId>
		        <configuration>
              <descriptors>
                <descriptor>src/main/assembly/with-dependencies.xml</descriptor>
              </descriptors>
		        </configuration>
		        <executions>
		          <execution>
		            <phase>package</phase>
		            <goals>
		              <goal>single</goal>
		            </goals>
		          </execution>
		        </executions>
		      </plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
