-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[MNG-8646] Make IT tests use "outer" Mimir caching as well #2176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ITs used settings.xml redefines Central to allow snapshots, hence Mimir refuses to touch IT used Central (while still being loaded). This PR now fixes settings.xml to NOT do this. OTOH, there are two ITs that needs now fix, one is wrongly assuming it can get snapshots from Central (cannot anymore), and other is basically affected by change in ordering. Signed-off-by: Tamas Cservenak <[email protected]>
The failures are caused by the m-assembly-p trying to create Not sure what's the best way to fix that yet though...
|
Heuristic:
Am unsure why "process plugins" matters here, I'd rather go: |
Formatting. But the change is too "big" IMO. |
So m-assembly-p does the following return new DefaultProjectBuildingRequest(configSource.getMavenSession().getProjectBuildingRequest())
.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL)
.setProcessPlugins(false); so we need to remove both conditions, else it will have no effect. The actual problem is that there's no different made by m-assembly-p between loading a pom from the repository (as a consumer) and loading from the projects being built. Maybe that's the one that needs to be fixed ? |
I'm going to experiment with apache/maven-assembly-plugin#217 |
It seems to work locally for me. @cstamas could you double check when you have some time ? |
I dislike it. It means we need to modify legacy code base to make it work with Maven 4? Are we sure we cannot make it work by improving the heuristic instead? |
And add some bugfixes, npe fixes and alike.
* initProject sets remote reposes (was not before) * parent reposes are ADDED not replacing (as now models are not sure to have remote repository as it is not in super pom anymore) * injectPlugins method made clear it RE-sets remote reposes (but that is invoked only for build MP instances)
This reverts commit 2c2a0ff.
As it turned out, ITs were not using Mimir as they redefined Maven Central to allow snapshots, and that made Mimir not handle the IT used Maven Central (while those did not contain snapshots, it was still pointing at canonical Maven Central URL).
Fixing this revealed several other (related or unrelated) issues:
several ProjectModelBuilder (detailed below) had no remote repositories set anymore (as central is not in super POM anymore)
The
org.apache.maven.project.DefaultProjectBuilder issues
fixed:At the end of the day, all issues were fixed but one IT that we declared "invalid" was disabled (w/ remark about why's).
https://issues.apache.org/jira/browse/MNG-8646