GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [MPLUGIN-522] Prerequisites should be opt-in by cstamas · Pull Request #282 · apache/maven-plugin-tools

Conversation

@cstamas

@cstamas cstamas commented May 7, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

But they are not. In fact, if user does not deal with them, they are way too aggressive and in fact, plain wrong.

Prerequisite was opt-in and should have remain opt-in.

This PR:

  • by default does NOT add prerequisite (as before)
  • user can set "auto" (when it is IMHO wrongly determined)
  • or can set any value needed

https://issues.apache.org/jira/browse/MPLUGIN-522

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cstamas
[MPLUGIN-522] Prerequisites should be opt-in
83832e7
But they are not. In fact, if user does not deal with them, they
are way too aggressive and in fact, plain wrong.

Prerequisite was opt-in and should have remain opt-in.

---

https://issues.apache.org/jira/browse/MPLUGIN-522
@cstamas
cstamas requested review from gnodet, kwin and slawekjaranowski May 7, 2024 07:51
@cstamas cstamas self-assigned this May 7, 2024
gnodet
gnodet approved these changes May 7, 2024
View reviewed changes
@kwin

kwin commented May 7, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

and in fact, plain wrong.

I disagree with this statement, and also disagree that they should be opt in. Details in the JIRA: https://issues.apache.org/jira/browse/MPLUGIN-522?focusedCommentId=17844188&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17844188

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kwin
kwin requested changes May 7, 2024
View reviewed changes

@kwin kwin left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think enforcing and explicitly stating prerequisites is a good thing and the default matches for 99% of the cases. For other cases just overwrite with explicit values. Not stating prerequisites should no longer be supported because it is frustratring for users to figure out the implicit prerequisites through trial and error...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cstamas

cstamas commented May 7, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Ok, then we have similar situation as with prefix: fail the build.

Plugin should be modified to:

  • if none set, fail the build
  • if "auto" set by user, everything happens as now
  • if some value set by user, use that

We must make users aware of this requirement (hence the build failure), as otherwise they implicitly use "auto" and end result is wrong.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gnodet

gnodet commented May 7, 2024

Copy link
Copy Markdown
Contributor

I think enforcing prerequisites is a good thing and the default match for 99% of the cases. For other cases just overwrite with explicit values. Not stating prerequisites should no longer be supported because it is frustratring for users to figure out the implicit prerequisites through trial and error...

Putting prerequisites which are greater than the one actually used to build are, at first, very weird. For example, if you project requires jdk 11, you build with jdk 11, test it with jdk 11, but your prerequisites ends up with jdk 22... ? That's really unexpected, and the user has no real knowledge about the value used.

The prerequisites should not be higher than the target JDK.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cstamas

cstamas commented May 7, 2024

Copy link
Copy Markdown
Member Author

Also, unsure how then this thing works?
https://maven.apache.org/plugins/maven-jar-plugin/plugin-info.html#system-requirements-history

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kwin

kwin commented May 7, 2024

Copy link
Copy Markdown
Member

Putting prerequisites which are greater than the one actually used to build are, at first, very weird.

Let's focus on issue with the automatic detection. Please point me to a concrete example where this is the case and where it is wrong.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cstamas

cstamas commented May 7, 2024

Copy link
Copy Markdown
Member Author

I think enforcing and explicitly stating prerequisites is a good thing and the default matches for 99% of the cases. For other cases just overwrite with explicit values. Not stating prerequisites should no longer be supported because it is frustratring for users to figure out the implicit prerequisites through trial and error...

Just to repeat myself, the prerequisites are documented, so no need for user trial-and-error. This table shows Maven and Java prerequisites clearly:
https://maven.apache.org/plugins/maven-jar-plugin/plugin-info.html#system-requirements-history

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cstamas

cstamas commented May 7, 2024

Copy link
Copy Markdown
Member Author

This PR should be redone once Maven3 and Maven4 m-p-p are split (into maven-3.x and master) branch. And then:

  • default Java prerequisite should pick up from compiler plugin (in pretty much similar way as report does)
  • default Maven prerequisite should be "3.2.5" on maven-3.x branch and "4.0.0" on master branch.

Originally, the lack of prerequisite meant "it works with Maven3" (no range specified). IMO, using "3.2.5" today is completely okay, it covers 10 years of history. If users wants to go more backward, it can explicitly configure prerequisite to "3.1.1" or whatever.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cstamas

cstamas commented May 7, 2024

Copy link
Copy Markdown
Member Author

But just for the record: current m-p-p releases produce broken Maven Plugin XML, in a way that plugin works just fine with Maven3, while Maven4 explodes with invalid error messages.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cstamas
cstamas marked this pull request as draft May 7, 2024 09:24
@kwin

kwin commented Aug 1, 2024

Copy link
Copy Markdown
Member

For the record: The automatic detection in this case was not wrong it was just that the referenced artifact (JLine3) states it is Java8 compatible but contains Java22 bytecode classes (https://the-asf.slack.com/archives/C7Q9JB404/p1715084058873669?thread_ts=1715069202.024659&cid=C7Q9JB404). I think this edge case justifies that the automatic detection should be explicitly overwritten!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cstamas

cstamas commented Aug 1, 2024

Copy link
Copy Markdown
Member Author

Am unsure here... as I do not control is my transitive (2nd level, 3rd level) dependency uses multi-release or not. For me this is magic, and the bad kind of it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jira-importer

jira-importer commented Jun 19, 2025

Copy link
Copy Markdown

Resolve #825

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slawekjaranowski slawekjaranowski added the waiting-for-feedback Waiting for 90 days until issues or pull request will be closed label Oct 17, 2025
@github-actions

github-actions Bot commented Dec 17, 2025

Copy link
Copy Markdown

This pull request is stale because it has been waiting for feedback for 60 days. Remove the stale label or comment on this PR, or it will be automatically closed in 30 days.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the Stale label Dec 17, 2025
@jira-importer jira-importer mentioned this pull request Dec 12, 2024
[MPLUGIN-522] The auto prerequisites are way too aggressive #825
Open
@github-actions

github-actions Bot commented Jan 16, 2026

Copy link
Copy Markdown

This pull request has been closed because no response was received within 90 days.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kwin kwin kwin requested changes
@gnodet gnodet gnodet approved these changes
@slawekjaranowski slawekjaranowski Awaiting requested review from slawekjaranowski

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@cstamas cstamas

Labels

Stale waiting-for-feedback Waiting for 90 days until issues or pull request will be closed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@cstamas @kwin @gnodet @jira-importer @slawekjaranowski
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.