mirror of https://github.com/apache/maven.git
clarify Core ITs vs Core IT Support vs Core ITs Suite
This commit is contained in:
parent
d80e92df2d
commit
fdfc9c581e
|
@ -31,7 +31,7 @@ under the License.
|
|||
|
||||
<artifactId>core-it-suite</artifactId>
|
||||
|
||||
<name>Maven ITs</name>
|
||||
<name>Maven Core ITs suite</name>
|
||||
<description>The effective Maven Integration Tests suite.</description>
|
||||
|
||||
<!--
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
-----
|
||||
Maven Core Integration Tests
|
||||
Maven Core Integration Tests Suite
|
||||
-----
|
||||
Hervé Boutemy
|
||||
-----
|
||||
|
@ -26,12 +26,12 @@
|
|||
~~ NOTE: For help with the syntax of this file, see:
|
||||
~~ http://maven.apache.org/doxia/references/apt-format.html
|
||||
|
||||
Maven Core Integration Tests
|
||||
Maven Core Integration Tests Suite
|
||||
|
||||
This module provides the {{{./testapidocs/org/apache/maven/it/package-summary.html}effective Integration Tests suite}},
|
||||
This module provides the {{{./testapidocs/org/apache/maven/it/package-summary.html}effective Core Integration Tests suite}},
|
||||
starting with {{{./bootstrap.html}bootstrap}}.
|
||||
|
||||
* Running the ITs
|
||||
* Running the Core ITs
|
||||
|
||||
By default, the project just packages the tests in an artifact. To actually run them, activate the <<<run-its>>> profile:
|
||||
|
||||
|
@ -65,7 +65,8 @@ mvn clean test -Prun-its -DmavenVersion=2.2.1
|
|||
<<<maven.it.central>>> to a URL of a local repository manager (anonymous authentication only) that proxies the required
|
||||
artifacts.
|
||||
|
||||
* Results
|
||||
|
||||
* Core ITs Suite Results
|
||||
|
||||
ITs results are displayed on the console and can be published in the site through Surefire Report.
|
||||
|
||||
|
@ -76,3 +77,28 @@ mvn -Preporting site
|
|||
Currently deployed {{{./surefire-report.html}Surefire Report}} was generated with following environment:
|
||||
|
||||
%{snippet|file=${project.build.directory}/info.txt}
|
||||
|
||||
|
||||
* Core ITs and dependencies
|
||||
|
||||
A good IT does not depend on external repos like Central, it uses dedicated test plugins and test repositories.
|
||||
The {{{https://github.com/apache/maven-integration-testing/blob/master/core-it-suite/src/test/resources-filtered/settings.xml}default <<<settings.xml>>>}}
|
||||
used by ITs helps to enforce this by pointing <<<central>>> at <<<file:target/null>>>,
|
||||
which obviously can't resolve anything. This setup using a file-based dummy repo also helps execution time,
|
||||
because this repo produces (expected) <<<404>>>s much faster than a HTTP-based repo.
|
||||
|
||||
The one place where access to Central is desired is in the <<<MavenITBootstrapTest>>>
|
||||
({{{./xref-test/org/apache/maven/it/MavenITBootstrapTest.html}src}},
|
||||
{{{./testapidocs/org/apache/maven/it/MavenITBootstrapTest.html}javadoc}}),
|
||||
which doesn't really test anything but just primes the local repo with any artifacts the ITs will need:
|
||||
you can see {{{./bootstrap.html}here}} the list of plugins and artifacts that are fetched during bootstrap.
|
||||
|
||||
So some care needs to be taken when introducing new dependencies into the ITs themselves or {{{../core-it-support/}the support plugins}}.
|
||||
Many times the failures that we encounter are discrepancies between actual artifact consumption required and
|
||||
what is populated during bootstrapping. When forgetting, typical failures (as seen in ASF CI) will give following traces in log:
|
||||
|
||||
-------
|
||||
[INFO] Downloading from central: file:target/null/...
|
||||
...
|
||||
[ERROR] Failed to execute goal ... (...) on project ...: ... Could not find artifact ... in central (file:target/null) -> [Help 1]
|
||||
-------
|
||||
|
|
|
@ -22,8 +22,6 @@ under the License.
|
|||
<project xmlns="https://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="https://maven.apache.org/DECORATION/1.8.0 https://maven.apache.org/xsd/decoration-1.8.0.xsd">
|
||||
|
||||
<edit>${project.scm.url}</edit>
|
||||
|
||||
<body>
|
||||
<menu name="Overview">
|
||||
<item name="Introduction" href="index.html"/>
|
||||
|
|
|
@ -29,8 +29,8 @@ under the License.
|
|||
<artifactId>core-it-support</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Maven IT Support</name>
|
||||
<description>Maven Integration Tests support tools.</description>
|
||||
<name>Maven Core IT Support</name>
|
||||
<description>Maven Core Integration Tests support tools.</description>
|
||||
|
||||
<modules>
|
||||
<module>core-it-plugins</module>
|
||||
|
@ -42,11 +42,6 @@ under the License.
|
|||
<module>core-it-extension</module>
|
||||
</modules>
|
||||
|
||||
<issueManagement>
|
||||
<system>jira</system>
|
||||
<url>http://jira.codehaus.org/browse/MNG</url>
|
||||
</issueManagement>
|
||||
|
||||
<!-- TODO this needs to be improved, right now it doesn't deploy to releases repo -->
|
||||
<properties>
|
||||
<repositoryUrl>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</repositoryUrl>
|
||||
|
|
|
@ -25,7 +25,7 @@ under the License.
|
|||
<parent>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<version>31</version>
|
||||
<version>33</version>
|
||||
<relativePath>../pom/maven/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -52,6 +52,10 @@ under the License.
|
|||
<system>Jenkins</system>
|
||||
<url>https://builds.apache.org/job/maven-box/job/maven/</url>
|
||||
</ciManagement>
|
||||
<issueManagement>
|
||||
<system>jira</system>
|
||||
<url>https://issues.apache.org/jira/browse/MNG</url>
|
||||
</issueManagement>
|
||||
<distributionManagement>
|
||||
<site>
|
||||
<id>apache.website</id>
|
||||
|
@ -101,7 +105,6 @@ under the License.
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<configuration>
|
||||
<dependencyLocationsEnabled>false</dependencyLocationsEnabled><!-- waiting for MPIR-267 -->
|
||||
<!-- pin down urls to to avoid interpolated values from the modules, waiting for MPIR-290 -->
|
||||
|
|
|
@ -33,31 +33,6 @@ Maven Core ITs
|
|||
|
||||
This project has declared the following modules:
|
||||
|
||||
* {{{./core-it-support/}Maven IT Support}}: Maven Integration Tests support tools, to completely decouple ITs from production plugins.
|
||||
* {{{./core-it-support/}Maven Core IT Support}}: Maven Integration Tests support tools, to completely decouple ITs from production plugins.
|
||||
|
||||
* {{{./core-it-suite/}Maven ITs}}: The effective Maven Integration Tests suite.
|
||||
|
||||
|
||||
* Core ITs and dependencies
|
||||
|
||||
A good IT does not depend on external repos like Central, it uses dedicated test plugins and test repositories.
|
||||
The {{{https://github.com/apache/maven-integration-testing/blob/master/core-it-suite/src/test/resources-filtered/settings.xml}default <<<settings.xml>>>}}
|
||||
used by ITs helps to enforce this by pointing <<<central>>> at <<<file:target/null>>>,
|
||||
which obviously can't resolve anything. This setup using a file-based dummy repo also helps execution time,
|
||||
because this repo produces (expected) <<<404>>>s much faster than a HTTP-based repo.
|
||||
|
||||
The one place where access to Central is desired is in the <<<MavenITBootstrapTest>>>
|
||||
({{{./core-it-suite/xref-test/org/apache/maven/it/MavenITBootstrapTest.html}src}},
|
||||
{{{./core-it-suite/testapidocs/org/apache/maven/it/MavenITBootstrapTest.html}javadoc}}),
|
||||
which doesn't really test anything but just primes the local repo with any artifacts the ITs will need:
|
||||
you can see {{{./core-it-suite/bootstrap.html}here}} the list of plugins and artifacts that are fetched during bootstrap.
|
||||
|
||||
So some care needs to be taken when introducing new dependencies into the ITs themselves or the support plugins.
|
||||
Many times the failures that we encounter are discrepancies between actual artifact consumption required and
|
||||
what is populated during bootstrapping. When forgetting, typical failures will give following traces in log:
|
||||
|
||||
-------
|
||||
[INFO] Downloading from central: file:target/null/...
|
||||
...
|
||||
[ERROR] Failed to execute goal ... (...) on project ...: ... Could not find artifact ... in central (file:target/null) -> [Help 1]
|
||||
-------
|
||||
* {{{./core-it-suite/}Maven Core ITs suite}}: The effective Maven Integration Tests suite.
|
||||
|
|
Loading…
Reference in New Issue