Xml文件  |  169行  |  4.79 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.5</version>
  </parent>
  <artifactId>objenesis-tck</artifactId>

  <name>Objenesis TCK</name>
  <description>Objenesis' TCK</description>
  <url>http://objenesis.org</url>

  <properties>
    <paxexam.version>3.5.0</paxexam.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.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-junit4</artifactId>
      <version>${paxexam.version}</version>
      <scope>test</scope>
      <exclusions>
        <!-- Use the one bundled in Felix -->
        <exclusion>
          <groupId>org.osgi</groupId>
          <artifactId>org.osgi.core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-container-native</artifactId>
      <version>${paxexam.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-link-mvn</artifactId>
      <version>${paxexam.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- And this is our OSGi container -->
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.framework</artifactId>
      <version>5.6.1</version>
      <scope>test</scope>
    </dependency>

    <!-- This is just to have a nice logging -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.1.7</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.keyboardsamurais.maven</groupId>
        <artifactId>maven-timestamp-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-remote-resources-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.objenesis.tck.Main</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <configuration>
          <createDependencyReducedPom>false</createDependencyReducedPom>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>jvm-test</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <id>specific-jvm</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <jvm>${my.jvm}</jvm>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- Activate to perform integration tests -->
      <id>full</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>