Skip to content

Update bundled maven to 3.10 - #9642

Draft
mbien wants to merge 9 commits into
apache:masterfrom
mbien:maven-310
Draft

mbien wants to merge 9 commits into
apache:masterfrom
mbien:maven-310

Conversation

@mbien

@mbien mbien commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

draft until maven 3.10 is released + manual testing

todo:

  • investigate MavenReloadImplementationTest#testUnresolvableArtifactAppears failure
    • caused by NbArtifactFixer assuming the thread doesn't change between collectPlaceholderArtifacts() and resolve()
    • mvn 3.10 uses now multiple threads for dep tree traversal
    • workaround: switch back to single threading via config property. Would be good to fix the cause though.
  • investigate user property related tests failures, when embedded, user props are ignored (not reproducible standalone)
    • symptom: failures in
      • NbMavenProjectImplTest#testMavenConfig
      • MavenSourceLevelImplTest#testSystemPropertySourceLevel
      • MicronautPackagingArtifactImplTest#testProjectArtifactOptionalNativeAndAction
    • cause:
      • maven's model interpolation is now more defensive, but this can be switched off again
      • it is unclear though if the guards would influence the IDE itself outside of the tests. E.g overwriting properties via setings.xml profiles is recognized by the IDE even in "restricted mode". Couldn't find a usecase which would be affected by this. (possibly effective pom generator?)
      • opened 3.10.0: Model interpolation does not take property activated profiles into account maven#13347 mostly for clarification purposes
  • investigate why local repo indexing is now significantly slower
    • its about 5x slower, have a POC which rewrites ArtifactDependencyIndexCreator without embedder which would resolve this issue but requires regression testing Update bundled maven to 3.10 #9642 (comment) (bonus: migrates away from deprecated API)
  • paperwork will fail. will update the version occurrences once 3.10 is finalized
  • bonus: get rid of more deprecations

@mbien mbien added this to the NB32 milestone Sep 24, 2026
@mbien mbien added Upgrade Library Library (Dependency) Upgrade Maven [ci] enable "build tools" tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Sep 24, 2026
@mbien

mbien commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

local repo scan metrics atm, scanning my current .m2 folder (~500 mb):

    NB 31:
    INFO [org.netbeans.modules.maven.indexer.NexusRepositoryIndexManager]: Indexing [scan] of local took 14.14s.
    mvn 3.10:
    INFO [org.netbeans.modules.maven.indexer.NexusRepositoryIndexManager]: Indexing [scan] of local took 62.11s.
    mvn 3.10 wip rewrite without embedder:
    INFO [org.netbeans.modules.maven.indexer.NexusRepositoryIndexManager]: Indexing [scan] of local took 25.48s.

ideally we should verify that NB 31 and rewrite produce the same results, but it appears to work on first glance. Thinking about printing the whole dep list while its indexing to sout and diff it - probably the quickest smoke test.

@mbien mbien added the ci:all-tests [ci] enable all tests label Oct 1, 2026
@mbien mbien added enterprise [ci] enable enterprise job and removed ci:all-tests [ci] enable all tests labels Oct 1, 2026
@mbien

mbien commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

testProjectArtifactOptionalNativeAndAction in MicronautPackagingArtifactImplTest is also failing.

main difference is the swallowed log line at:

if (!explicitGraalvmGoal && !MicronautMavenConstants.PACKAGING_NATIVE.equals(model.getPackaging())) {
LOG.log(Level.FINE, "Unsupported packaging: {0}", model.getPackaging());
return Collections.emptyList();

the packaging is "jar" but should be "native-image". This could be failing for a similar reason as the user property related failures. The test project pom uses <packaging>${packaging}</packaging> -> which is probably set somewhere in the tests and ignored.

User properties not being picked up might be the primary cause for the test failures, will take a look at that one first.

needed for tests:

 - NbMavenProjectImplTest#testMavenConfig
 - MavenSourceLevelImplTest#testSystemPropertySourceLevel
 - MicronautPackagingArtifactImplTest#testProjectArtifactOptionalNativeAndAction

unclear if it affects ide functionality outside of tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) enterprise [ci] enable enterprise job Maven [ci] enable "build tools" tests Upgrade Library Library (Dependency) Upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant