Upgrade to Apache Maven 3.8.4 - #3328
Conversation
matthiasblaesing
left a comment
There was a problem hiding this comment.
Seems to work ok from a quick test (got new dependencies, dependencies could be explored, downloading sources and javadoc worked. I left a tow inline comments.
| # These are used independently, different functional goals | ||
| java/java.lsp.server/external/commons-io-2.5.jar java/maven.embedder/external/apache-maven-3.6.3-bin.zip | ||
| # maven 3.8.4 use common-io-2.6 java/java.lsp.server/external/commons-io-2.5.jar java/maven.embedder/external/apache-maven-3.6.3-bin.zip | ||
| platform/o.apache.commons.io/external/commons-io-2.6.jar java/maven.embedder/external/apache-maven-3.8.4-bin.zip |
There was a problem hiding this comment.
The alternative would be to add a dependency on the netbeans module. maven.embedder already seems to depend on commons-logging (this could most probably be removed)
There was a problem hiding this comment.
not sure to get the point.
There was a problem hiding this comment.
Maven embedder could use the NetBeans wide installation of commons-io, but this might not even fix the reported error. Anyway - ignore this.
matthiasblaesing
left a comment
There was a problem hiding this comment.
I ran with this the last few days and did not see an issue.
In maven 3.6 the method
ModelBuilder#build(ModelBuildingRequest, ModelBuildingResult)
at the end of the call to
ModelBuilder#build(ModelBuildingRequest)
In 3.8.X the call chain was modified, so a private method of
DefaultModelBuilder is called instead of the two parameter public
method.
The implementation in NBModelBuilder called first the super
implementation. So in essence the sequence in the past was:
- NBModelBuilder#build(ModelBuildingRequest)
- DefaultModelBuilder#build(ModelBuildingRequest)
- NBModelBuilder#build(ModelBuildingRequest, ModelBuildingResult)
- DefaultModelBuilder#build(ModelBuildingRequest, ModelBuildingResult)
- [NB Extensions]
- [NB Extensions]
The modified implementation ensures, that the post processing happens
independend from the call chain.
|
Ok - this can't be merged yet, as the unittests for maven fail reproducible (also locallly reproducible!). The issue can be tracked down into a behavioral change in the ModelBuilder implementation of maven. NetBeans overrides a method in the ModelBuilder to enrich the metadata generated. This method was called in 3.6.X from both possible call flows, but is now not called by the default flow anymore. Please have a look at this implementation: I suggest to get that into this PR and see what the build will do (locally unittests for maven.embedder and maven ran successfully). |
|
I will merge this today. Seems unit test on maven is broken but not PR related. |
|
Up to you. However the run says: |
There was a problem hiding this comment.
I point to #3328 (comment): This update as is breaks maven functionality reproducibly. That needs a fix first.
|
sorry just show other pending PR having the same ant $OPTS -f java/maven test" exited with 1 on java/maven. |
|
@matthiasblaesing I'm sorry but I'm not sure how to add your work on Model into this PR. I guess 3.8.4 introduce On master we still have that |
|
@ebarboni when in doubt I do this:
There is at least one flaky test in maven and I think two, that fail for me locally and work ok in tests. For the difference test, that does not matter much though. |
---------- RunJarStartupArgsTest ---------- Without maven.compiler.source and maven.compiler.target set, they are defaulted to 1.5. This will fail on recent JDKs. Instead use the java version from the running JDK, which can be assumed to be a save default. ---------- ShellConstructorTest --------- The test is flaky and it was found, that sometimes the maven CLI version is reported to be NULL. Closed analysis showed, that this is caused by a IOException, referencing to an unexpected end of zlib input stream. The issue seems to be, that the ArchiveURLMapper caches jars and the test in rapid succession deletes jars and recreates them. This change moves dummy JAR creation from per Test to per Testcase. This shoud stabilize the test.
|
I had a look at the tests, that either failed locally (RunJarStartupArgsTest) or are flaky (ShellConstructorTest): matthiasblaesing@d4b4f5f To get them into this PR, pull the changes like this: # Ensure the branch backing this PR is checked out
git checkout maven384
# Pull in changes from my branch
git pull https://github.com/matthiasblaesing/netbeans pr-3328
# Push to github
git push |
|
thanks a lot @matthiasblaesing . except the windows check seems ok now. |
matthiasblaesing
left a comment
There was a problem hiding this comment.
Reran tests locally with this branch and all is green and tavis and github agree to. I think this is good to go.
As #3239 maven version was broken this is an update to the fixed Maven 3.8.4. Let's have the modern version embedded.