All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nexus.nexus-test-harness-its.2.4.0-1.source-code.pom.xml Maven / Gradle / Ivy

<!--

    Sonatype Nexus (TM) Open Source Version
    Copyright (c) 2007-2012 Sonatype, Inc.
    All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.

    This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,
    which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.

    Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks
    of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
    Eclipse Foundation. All other trademarks are the property of their respective owners.

-->
<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.sonatype.nexus</groupId>
    <artifactId>nexus-test</artifactId>
    <version>2.4.0-1</version>
  </parent>

  <artifactId>nexus-test-harness-its</artifactId>

  <properties>
    <cargo.version>1.3.0</cargo.version>
  </properties>

  <dependencies>

    <!-- The IT Launcher -->
    <dependency>
      <groupId>org.sonatype.nexus</groupId>
      <artifactId>nexus-test-harness-launcher</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>junit</groupId>
          <artifactId>junit-dep</artifactId>
        </exclusion>
        <exclusion>
          <!-- conflict with ant 1.7.1 from cargo tests -->
          <groupId>ant</groupId>
          <artifactId>ant</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.sonatype.nexus</groupId>
      <artifactId>nexus-test-common</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Deps needed by some ITs (they use classes from these below) -->
    <dependency>
      <groupId>org.sonatype.nexus</groupId>
      <artifactId>nexus-oss-edition</artifactId>
    </dependency>


    <!-- NEXUS-2862 -->
    <dependency>
      <groupId>org.sonatype.security.realms</groupId>
      <artifactId>security-url-realm</artifactId>
    </dependency>

    <!-- NEXUS-2490 -->
    <dependency>
      <groupId>org.sonatype.nexus.plugins</groupId>
      <artifactId>nexus-lvo-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- NEXUS-2810 references this -->
    <dependency>
      <groupId>org.sonatype.nexus.plugins</groupId>
      <artifactId>nexus-plugin-console-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- NEXUS-639 (Timeline) -->
    <dependency>
      <groupId>org.sonatype.nexus.plugins</groupId>
      <artifactId>nexus-timeline-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- NEXUS-156 (RRB perms) -->
    <dependency>
      <groupId>org.sonatype.nexus.plugins</groupId>
      <artifactId>nexus-rrb-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- NEXUS-3947 ArchetypeCatalog -->
    <dependency>
      <groupId>org.sonatype.nexus.plugins</groupId>
      <artifactId>nexus-archetype-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- NEXUS-4218 -->
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy</artifactId>
      <version>1.7.8</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
      <version>1.2</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- NEXUS-3082 -->
    <dependency>
      <groupId>org.sonatype.sisu.pr</groupId>
      <artifactId>sisu-pr-testutil</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- nexus3860/* (cargo) tests -->
    <dependency>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-core-api-generic</artifactId>
      <version>${cargo.version}</version>
      <scope>test</scope>
      <exclusions>
        <!-- Omit these dependencies due to enforce rules banning them -->
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-core-container-tomcat</artifactId>
      <version>${cargo.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-core-container-jetty</artifactId>
      <version>${cargo.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!--
      FIXME: This may be needed for the testsuite execution to resolve nexus-plugin types?
      -->
      <plugin>
        <groupId>org.sonatype.nexus</groupId>
        <artifactId>nexus-plugin-bundle-maven-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>testsuite-genshards</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>gmaven-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <phase>test-compile</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <providerSelection>1.7</providerSelection>
                  <classpathIncludes>none</classpathIncludes>
                  <source>file:${project.basedir}/src/test/script/genshards.groovy</source>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>testsuite-shard</id>
      <activation>
        <property>
          <name>testsuite.shardId</name>
        </property>
      </activation>
      <build>
        <plugins>
          <!--
          NOTE: Using patched version of surefire, which supports includes/excludes from files.
          https://jira.codehaus.org/browse/SUREFIRE-925
          TODO: Update to surefire 2.13 when its released, which has this feature.
          -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.13-SONATYPE</version>
            <configuration>
              <includesFile>${settings.localRepository}/org/sonatype/nexus/${project.artifactId}/shards/shard-${testsuite.shardId}.txt</includesFile>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>it</id>
      <activation>
        <property>
          <name>it</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <localRepositoryPath>${project.build.directory}/maven/fake-repo</localRepositoryPath>
              <extraArtifacts>
                <xml>org.apache.maven.plugins:maven-clean-plugin:2.2:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-compiler-plugin:2.0:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-compiler-plugin:2.0.2:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-compiler-plugin:2.3.2:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-dependency-plugin:2.0:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-deploy-plugin:2.3:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-deploy-plugin:2.4:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-deploy-plugin:2.5:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-install-plugin:2.0:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-install-plugin:2.2:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-install-plugin:2.3.1:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-jar-plugin:2.0:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-jar-plugin:2.2:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-jar-plugin:2.3.1:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-resources-plugin:2.0:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-resources-plugin:2.2:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-resources-plugin:2.3:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-resources-plugin:2.4:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-resources-plugin:2.4.3:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-surefire-plugin:2.0:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-surefire-plugin:2.4.2:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-surefire-plugin:2.4.3:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-surefire-plugin:2.5:maven-plugin</xml>
                <xml>org.apache.maven.plugins:maven-surefire-plugin:2.7.2:maven-plugin</xml>
                <xml>org.apache.maven.surefire:surefire-junit3:2.7.2</xml>
                <!-- nexus4218 -->
                <xml>org.apache.maven:apache-maven:3.0.3:tar.gz:bin</xml>
                <xml>org.apache.maven:apache-maven:2.0.6:tar.gz:bin</xml>
                <xml>org.apache.ivy:apache-ivy:2.2.0:tar.gz:bin</xml>
                <xml>org.codehaus.groovy:groovy:1.7.8</xml>
              </extraArtifacts>
            </configuration>
            <executions>
              <execution>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>install</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <!-- Required for nexus3860/* (cargo) tests -->
                    <artifactItem>
                      <groupId>org.sonatype.nexus</groupId>
                      <artifactId>nexus-webapp</artifactId>
                      <type>war</type>
                      <outputDirectory>${project.build.directory}/nexus/webapp</outputDirectory>
                    </artifactItem>
                    <!--
                    Versions here must be kept in sync with nexus3860/* (cargo) tests.
                    Including/excluding only the bits needed for the container tests to function, keep out all other ancillary crud.

                    The Tomcat distributions referenced are not actually available in central, but are in the third-party repository on RSO:
                    https://repository.sonatype.org/content/repositories/third-party/org/apache/tomcat/apache-tomcat/
                    -->
                    <artifactItem>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>apache-tomcat</artifactId>
                      <version>6.0.36</version>
                      <type>zip</type>
                      <outputDirectory>${project.build.directory}/containers</outputDirectory>
                      <includes>*/bin/**,*/conf/**,*/lib/**,*/webapps/*manager/**</includes>
                    </artifactItem>
                    <artifactItem>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>apache-tomcat</artifactId>
                      <version>7.0.32</version>
                      <type>zip</type>
                      <outputDirectory>${project.build.directory}/containers</outputDirectory>
                      <includes>*/bin/**,*/conf/**,*/lib/**,*/webapps/*manager/**</includes>
                    </artifactItem>
                    <artifactItem>
                      <groupId>org.eclipse.jetty</groupId>
                      <artifactId>jetty-distribution</artifactId>
                      <version>8.1.1.v20120215</version>
                      <type>zip</type>
                      <outputDirectory>${project.build.directory}/containers</outputDirectory>
                      <includes>*/start*,*/bin/**,*/etc/**,*/lib/**</includes>
                    </artifactItem>
                    <artifactItem>
                      <groupId>org.eclipse.jetty</groupId>
                      <artifactId>jetty-distribution</artifactId>
                      <version>7.6.0.v20120127</version>
                      <type>zip</type>
                      <outputDirectory>${project.build.directory}/containers</outputDirectory>
                      <includes>*/start*,*/bin/**,*/etc/**,*/lib/**</includes>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.sonatype.nexus.plugins</groupId>
            <artifactId>nexus-test-environment-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>setup-environment</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <setupMaven>true</setupMaven>
              <nexusBundleArtifact>
                <groupId>${it.nexus.bundle.groupId}</groupId>
                <artifactId>${it.nexus.bundle.artifactId}</artifactId>
                <version>${it.nexus.bundle.version}</version>
                <type>zip</type>
                <classifier>bundle</classifier>
              </nexusBundleArtifact>
              <nexusPluginsArtifacts>
                <plugin>
                  <groupId>org.sonatype.nexus</groupId>
                  <artifactId>nexus-it-helper-plugin</artifactId>
                  <classifier>cp</classifier>
                  <type>jar</type>
                </plugin>
                <plugin>
                  <groupId>org.sonatype.nexus</groupId>
                  <artifactId>nexus-it-helper-plugin</artifactId>
                  <classifier>bundle</classifier>
                  <type>zip</type>
                </plugin>
                <jar>
                  <groupId>org.sonatype.security.realms</groupId>
                  <artifactId>security-url-realm</artifactId>
                </jar>
              </nexusPluginsArtifacts>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <!--
              NOTE: Using forkMode=always here for a few reasons...
              Since ATM these are testNG-based tests, when using forkMode=always, instead of surefire reporting a single TestSuite execution it will show each test-class.
              This means that the output (both to console and in the reports directory) are closer to junit (.txt, -output.txt and .xml per test).
              The cargo-based tests (before, not sure if they currently due with updated cargo) required this forkmode and were put into a separate profile to execute.
              This ended up becoming unmaintained and the cargo tests had not been running for a long time because of that.
              The main side-effect is that the testsuite will take a little longer to execute given it has to fork a JVM 650+ times.
              -->
              <forkMode>always</forkMode>
              <argLine>-XX:PermSize=220m -XX:MaxPermSize=220m -Xmx600M -XX:+HeapDumpOnOutOfMemoryError</argLine>
              <excludes>
                <exclude>**Suite*</exclude>
                <exclude>**/*$*.*</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hc4-provider</id>
      <activation>
        <property>
          <name>rrs</name>
          <value>apacheHttpClient4x</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <systemPropertyVariables combine.children="append">
                <nexus.default.http.provider>apacheHttpClient4x</nexus.default.http.provider>
                <nexus.default.http.providerForced>true</nexus.default.http.providerForced>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>hc3-provider</id>
      <activation>
        <property>
          <name>rrs</name>
          <value>apacheHttpClient3x</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <systemPropertyVariables combine.children="append">
                <nexus.default.http.provider>apacheHttpClient3x</nexus.default.http.provider>
                <nexus.default.http.providerForced>true</nexus.default.http.providerForced>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>m2e</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.sonatype.nexus</groupId>
          <artifactId>nexus-it-helper-plugin</artifactId>
          <version>${project.version}</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy