<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>net.objectlab.kit</groupId>
    <artifactId>kit-parent</artifactId>
    <version>1.2.0</version>
  </parent>

  <artifactId>datecalc-jdk</artifactId>
  <packaging>bundle</packaging>

  <name>Date Calculator for JDK</name>
  <description>Date Calculator methods for JDK</description>

  <dependencies>
    <dependency>
      <groupId>net.objectlab.kit</groupId>
      <artifactId>datecalc-common</artifactId>
    </dependency>
    <dependency>
      <groupId>net.objectlab.kit</groupId>
      <artifactId>datecalc-common</artifactId>
      <scope>test</scope>
      <classifier>tests</classifier>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- UNIT tests -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <skip>true</skip>
        </configuration>
        <executions>
          <execution>
            <id>surefire-test</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <skip>false</skip>
              <excludes>
                <exclude>**/perf/**</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Export-Package>net.objectlab.kit.*;version="${pom.version}"</Export-Package>
            <Private-Package />
            <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
            <Bundle-Version>${pom.version}</Bundle-Version>
            <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>perf-testing</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.5</version>
            <configuration>
              <skip>true</skip>
            </configuration>
            <executions>
              <execution>
                <id>surefire-perf</id>
                <!-- use it mvn test -P perf-testing -->
                <phase>test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <argLine>-Xms256m -Xmx1024m</argLine>
                  <skip>false</skip>
                  <includes>
                    <include>**/perf/*Test.java</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>