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

  <parent>
    <groupId>org.nuiton</groupId>
    <artifactId>nuiton-jpa</artifactId>
    <version>1.0-rc-1</version>
  </parent>

  <groupId>org.nuiton.jpa</groupId>
  <artifactId>nuiton-jpa-templates</artifactId>

  <name>Nuiton Jpa :: Temlates</name>

  <dependencies>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>nuiton-jpa-api</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.nuiton.eugene</groupId>
      <artifactId>eugene</artifactId>
    </dependency>

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

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>

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

    <dependency>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>

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

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.nuiton.processor</groupId>
        <artifactId>processor-maven-plugin</artifactId>
      </plugin>

      <!-- expose new plexus components -->
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>

    <!-- reporting at release time -->
    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <reporting>
        <plugins>
          <plugin>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-maven-plugin</artifactId>
            <version>${plexusPluginVersion}</version>
          </plugin>

          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>${invokerPluginVersion}</version>
          </plugin>

        </plugins>
      </reporting>

    </profile>

    <profile>
      <id>run-its</id>
      <activation>
        <property>
          <name>skipIts</name>
          <value>!true</value>
        </property>
      </activation>
      <build>
        <defaultGoal>integration-test</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
                <phase>integration-test</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>
</project>
