<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/xsd/maven-4.0.0.xsd">

  <parent>
    <groupId>com.force.sdk</groupId>
    <artifactId>force-sdk</artifactId>
    <version>22.0.9-BETA</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.force.sdk</groupId>
  <artifactId>force-jpa</artifactId>
  <name>force-jpa</name>

  <build>

    <plugins>

      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <!-- Register force-jpa as a Datanucleus plugin -->
            <manifestEntries>
              <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
              <Bundle-Name>force.com</Bundle-Name>
              <Bundle-SymbolicName>com.force.sdk.jpa</Bundle-SymbolicName>
              <Bundle-Version>${force.sdk.version}</Bundle-Version>
              <Bundle-Vendor>SalesForce</Bundle-Vendor>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <archive>
            <!-- Register force-jpa-jar-with-dependencies as a Datanucleus plugin -->
            <manifestEntries>
              <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
              <Bundle-Name>force.com</Bundle-Name>
              <Bundle-SymbolicName>com.force.sdk.jpa</Bundle-SymbolicName>
              <Bundle-Version>${force.sdk.version}</Bundle-Version>
              <Bundle-Vendor>SalesForce</Bundle-Vendor>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.datanucleus</groupId>
        <artifactId>maven-datanucleus-plugin</artifactId>
        <executions>
          <execution>
            <id>Force_JPA_Model</id>
            <phase>process-classes</phase>
            <goals>
              <goal>enhance</goal>
            </goals>
            <configuration>
              <metadataIncludes>com/force/sdk/jpa/model/**/*.class</metadataIncludes>
              <mappingIncludes>com/force/sdk/jpa/model/**/*.class</mappingIncludes>
            </configuration>
          </execution>
          <execution>
            <id>Force_JPA_Test</id>
            <phase>process-test-classes</phase>
            <goals>
              <goal>enhance</goal>
            </goals>
            <configuration>
              <metadataDirectory>${basedir}/target/test-classes</metadataDirectory>
              <metadataIncludes>com/force/sdk/jpa/entities/**/*.class</metadataIncludes>
              <mappingIncludes>com/force/sdk/jpa/entities/**/*.class</mappingIncludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <configuration>
          <!-- Use Findbugs exclude filter from test resources -->
          <excludeFilterFile>${project.build.testOutputDirectory}/findbugs-exclude.xml</excludeFilterFile>
        </configuration>
      </plugin>
    </plugins>

  </build>


  <dependencies>
    <dependency>
      <groupId>com.force.api</groupId>
      <artifactId>force-metadata-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.force.api</groupId>
      <artifactId>force-partner-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.force.api</groupId>
      <artifactId>force-wsc</artifactId>
    </dependency>
    <dependency>
      <groupId>com.force.sdk</groupId>
      <artifactId>force-connector</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.inject</groupId>
      <artifactId>guice</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.jdo</groupId>
      <artifactId>jdo2-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.googlecode.jmockit</groupId>
      <artifactId>jmockit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jpa_2.0_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.datanucleus</groupId>
      <artifactId>datanucleus-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.datanucleus</groupId>
      <artifactId>datanucleus-jpa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.datanucleus</groupId>
      <artifactId>datanucleus-enhancer</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>
