Adds a test for checking that MavenSession.getProjects() contains the
projects being built and that MavenSession.getProjectDependencyGraph()
is set.
The fix for MNG-6173 changed the way these to properties are
initialised. This integration test verifies that the initialisation is
still correct.
Adds a test for checking that MavenSession.getAllProjects() returns the full
list of projects in the reactor even when only some of them are selected
for being built.
This closes#19
o Updated the ITs to correctly detect parent resolution failures. Maven does
not fail the build when it cannot resolve a parent but instead logs a
warning message. The ITs never checked the log to contain the warning messages
but instead asserted the build to fail when a parent cannot be resolved.
The only Maven version supporting parent version ranges is Maven 3.2.2 due to
this.
o Removed an incorrect test case for local parent resolution. Maven ignored
the '<version>' in '<parent>' elements for local parent resolution. The core
has been updated across various versions to eliminate any differences between
local and remote parent resolution. When local parent resolution had been
updated to match remote parent resolution, an existing IT started to fail
testing incorrect behaviour. As soon as the '<parent>' is referenced using a
version range, the '<version>' element in the project becomes mandatory and
does no longer support using an expression any more. This has been that way
for remote parent resolution from day one. It has never been supported to
inherit a version from a parent when referencing that parent using a version
range intentionally.
o Updated to account for updated error messages.
- This will let us fix broken tests while confirming that the versions of Maven that were released using the broken test contain the bug that escaped the broken test
Maven 3.3.0 through 3.3.3 are expected to have the following tests fail:
```
mng5840ParentVersionRanges(ParentRangeRelativePathPointsToWrongVersion)
mng5840ParentVersionRanges(ParentRangeRelativePathPointsToCorrectVersion)
mng5840RelativePathReactorMatching(RelativePathPointsToWrongVersion)
```
Maven 3.3.4 through 3.3.5 are expected to have the following tests fail:
```
mng5840ParentVersionRanges(ParentRangeRelativePathPointsToWrongVersion)
mng5840ParentVersionRanges(ParentRangeRelativePathPointsToCorrectVersion)
```
As of 25f5143169 in the Maven core repo the following
test results are expected and observed:
```
mng2199ParentVersionRange(ValidParentVersionRangeWithInclusiveUpperBound)OK (3.3 s)
mng2199ParentVersionRange(ValidParentVersionRangeWithExclusiveUpperBound)OK (1.7 s)
mng2199ParentVersionRange(InvalidParentVersionRange)........OK (0.7 s)
mng2199ParentVersionRange(ValidParentVersionRangeInvalidVersionExpression)OK (0.4 s)
mng2199ParentVersionRange(ValidParentVersionRangeInvalidVersionInheritance)OK (0.5 s)
mng2199ParentVersionRange(ValidLocalParentVersionRange).....OK (0.4 s)
mng5840ParentVersionRanges(ParentRangeRelativePathPointsToWrongVersion)FAILURE (0.4 s)
mng5840ParentVersionRanges(ParentRangeRelativePathPointsToCorrectVersion)OK (0.4 s)
mng5840RelativePathReactorMatching(RelativePathPointsToWrongVersion)OK (0.4 s)
```
With the one failure: mng5840ParentVersionRanges(ParentRangeRelativePathPointsToWrongVersion) expected
as the rumoured [validation in the workspace resolver](25f5143169/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java (L938)) does not actually exist.