<?xml version="1.0" encoding="ISO-8859-1"?>

<!--
Copyright 2006-2009 Henri Tremblay

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<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.objenesis</groupId>
    <artifactId>objenesis-parent</artifactId>
    <version>1.2</version>
    <relativePath>..</relativePath>
  </parent>
  <artifactId>objenesis-tck</artifactId>
  <name>Objenesis TCK</name>

  <dependencies>
    <dependency>
      <groupId>org.objenesis</groupId>
      <artifactId>objenesis</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- Dependencies below are for the OSGi test -->
  
    <dependency>
      <groupId>org.springframework.osgi</groupId>
      <artifactId>spring-osgi-test</artifactId>
      <version>1.2.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.osgi</groupId>
      <artifactId>spring-osgi-annotation</artifactId>
      <version>1.2.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.osgi</groupId>
      <artifactId>spring-osgi-extender</artifactId>
      <version>1.2.0</version>
      <scope>test</scope>
    </dependency>
    
    <!-- These are just to have a nice logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
      <version>1.5.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>com.springsource.slf4j.api</artifactId>
      <version>1.5.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>com.springsource.slf4j.log4j</artifactId>
      <version>1.5.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>log4j</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>com.springsource.org.apache.log4j</artifactId>
          <groupId>org.apache.log4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.osgi</groupId>
      <artifactId>log4j.osgi</artifactId>
      <version>1.2.15-SNAPSHOT</version>
      <scope>test</scope>
    </dependency>
    
    <!-- And this is our Equinox implementation -->
    <dependency>
      <groupId>org.eclipse.osgi</groupId>
      <artifactId>org.eclipse.osgi</artifactId>
      <version>3.2.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
      <plugin>
        <groupId>com.keyboardsamurais.maven</groupId>
        <artifactId>maven-timestamp-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.google.code.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.objenesis.tck.Main</mainClass>
            </manifest>
          </archive>        
        </configuration>
      </plugin>       
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>        
        <version>1.2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin> 
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links>
            <link>http://objenesis.googlecode.com/svn/docs/apidocs/</link>
          </links>
        </configuration>
      </plugin>      
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>jvm-test</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <id>Sun 1.3</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${sun_jdk1_3.jvm}</jvm>
                </configuration>
              </execution>
              <execution>
                <id>Sun 1.4</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${sun_jdk1_4.jvm}</jvm>
                </configuration>
              </execution>
              <execution>
                <id>Sun 1.5</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${sun_jdk1_5.jvm}</jvm>
                </configuration>
              </execution>
              <execution>
                <id>Sun 1.6</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${sun_jdk1_6.jvm}</jvm>
                </configuration>
              </execution>
              <execution>
                <id>JRockit for Java 1.3</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${jrockit1_3.jvm}</jvm>
                </configuration>
              </execution>
              <execution>
                <id>JRockit for Java 1.4</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${jrockit1_4.jvm}</jvm>
                </configuration>
              </execution>
              <execution>
                <id>JRockit for Java 1.5</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${jrockit1_5.jvm}</jvm>
                </configuration>
              </execution>
              <execution>
                <id>JRockit for Java 1.6</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${jrockit1_6.jvm}</jvm>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- Activate to create a complete release -->
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <inherited>false</inherited>
            <configuration>
              <executable>java</executable>
              <arguments>
                <argument>-jar</argument>
                <argument>${project.build.directory}\${project.build.finalName}.jar</argument>
              </arguments>
            </configuration>
            <executions>
              <execution>
                <id>test-release</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>    
  </profiles>

</project>
