Skip to content

Commit

Permalink
clarify Core ITs vs Core IT Support vs Core ITs Suite
Browse files Browse the repository at this point in the history
  • Loading branch information
hboutemy committed Aug 23, 2019
1 parent 6e480ac commit 5f32015
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 44 deletions.
2 changes: 1 addition & 1 deletion core-it-suite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

<!--
Expand Down
36 changes: 31 additions & 5 deletions core-it-suite/src/site/apt/index.apt.vm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-----
Maven Core Integration Tests
Maven Core Integration Tests Suite
-----
Hervé Boutemy
-----
Expand All @@ -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:

Expand Down Expand Up @@ -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.

Expand All @@ -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]
-------
2 changes: 0 additions & 2 deletions core-it-suite/src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down
9 changes: 2 additions & 7 deletions core-it-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
7 changes: 5 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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>
Expand Down Expand Up @@ -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 -->
Expand Down
29 changes: 2 additions & 27 deletions src/site/apt/index.apt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 5f32015

Please sign in to comment.