Skip to content

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Oct 10, 2025

Defining maven.compiler.source and maven.compiler.target properties when
running on JDK >= 9 has some side effects.

Fixes #503
Follow-up on apache/maven-apache-parent#543 and apache/maven-apache-parent#550

@gnodet gnodet marked this pull request as ready for review October 13, 2025 09:37
@gnodet
Copy link
Contributor Author

gnodet commented Oct 13, 2025

@slachiewicz @slawekjaranowski Note that those could be potentially moved to apache-parent if we want. Thoughts ?

@gnodet gnodet added the enhancement New feature or request label Oct 13, 2025
@gnodet gnodet added this to the 46 milestone Oct 13, 2025
@gnodet gnodet changed the title Enhance target JDK definition for JDK >= 1 Enhance target JDK definition for JDK >= 9 Oct 13, 2025
@gnodet
Copy link
Contributor Author

gnodet commented Oct 15, 2025

I've raised apache/maven-apache-parent#543 but we'll need to keep this PR.
The reason is that the apache parent only defines maven.compiler.source, maven.compiler.target, maven.compiler.release, and minimalJavaBuildVersion. The other properties are specific to the maven-parent, so we need this PR anyway.

Defining maven.compiler.source and maven.compiler.target properties when
running on JDK >= 9 has some side effects.

Fixes apache#503

Follow-up to apache/maven-apache-parent#543 and apache/maven-apache-parent#550
@slawekjaranowski
Copy link
Member

slawekjaranowski commented Nov 13, 2025

Looks too much complicated, as I mentioned in apache/maven-apache-parent#543
we should introduce on property lik javaVersion and only this one should be used in child project
maven.compiler.* should be only set in ASF parent and not used in childs

and then childs will not need an additional profiles

@slawekjaranowski
Copy link
Member

@slawekjaranowski
Copy link
Member

@gnodet I update to simply use javaVersion property

@slachiewicz slachiewicz removed their request for review November 14, 2025 22:40
@slawekjaranowski slawekjaranowski merged commit 5636c0f into apache:master Nov 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The maven parent should avoid setting maven.compiler.source and maven.compiler.target for JDK >= 11

3 participants