Skip to content

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Jul 28, 2025

Backport

This will backport the following commits from master to maven-4.0.x:

Questions ?

Please refer to the Backport tool documentation

Fixes apache#10996

When external tools like IntelliJ launch Maven directly using the
ClassWorlds launcher without setting the maven.mainClass system
property, Maven fails with 'No such property: maven.mainClass'.

This change adds a default value for maven.mainClass in m2.conf
so that external tools can launch Maven without needing to know
about this property. The default value is org.apache.maven.cling.MavenCling
which is the standard Maven CLI entry point.

The fix maintains backward compatibility - Maven launcher scripts
continue to work normally by setting the property explicitly,
while external tools now have a sensible default.

(cherry picked from commit 4e50e95)
@gnodet gnodet added bug Something isn't working backport mvn40 labels Aug 5, 2025
@gnodet gnodet merged commit f77fe3c into apache:maven-4.0.x Aug 5, 2025
19 checks passed
@github-actions github-actions bot added this to the 4.0.0 milestone Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug Something isn't working mvn40

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants