Xml文件  |  276行  |  8.67 KB

<?xml version="1.0" encoding="ISO-8859-1"?>
<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>2.0-SNAPSHOT</version>
  </parent>
  <artifactId>objenesis-tck</artifactId>
  
  <name>Objenesis TCK</name>
  <description>Objenesis' TCK</description>
  <url>http://objenesis.org</url>  
  
  <properties>
    <!-- These versions are also used to filter boot-bundles.properties -->
    <log4j.version>1.2.17</log4j.version>
    <spring.osgi.version>1.2.1</spring.osgi.version>
    <slf4j.version>1.7.2</slf4j.version>  
  </properties>

  <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>${spring.osgi.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.osgi</groupId>
      <artifactId>spring-osgi-annotation</artifactId>
      <version>${spring.osgi.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.osgi</groupId>
      <artifactId>spring-osgi-extender</artifactId>
      <version>${spring.osgi.version}</version>
      <scope>test</scope>
    </dependency>
    
    <!-- These are just to have a nice logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <version>${slf4j.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>${log4j.version}</version>
      <scope>test</scope>
    </dependency>
    
    <!-- And this is our Equinox implementation -->
    <dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>org.eclipse.osgi</artifactId>
      <version>3.8.0.v20120529-1548</version>
      <scope>test</scope>      
    </dependency>    
  </dependencies>
  
  <build>
    <testResources>
      <testResource>
        <directory>test</directory>   
        <filtering>true</filtering>
      </testResource>
    </testResources>  
    <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.6</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>Sun 1.7</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${sun_jdk1_7.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>
            <version>1.2.1</version>
            <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>