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 — [MNG-8494] Restore Maven 3 compatibility by gnodet · Pull Request #2031 · apache/maven

Conversation

@gnodet

@gnodet gnodet commented Jan 7, 2025

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

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

All reactions
gnodet added 4 commits January 7, 2025 23:10
@gnodet
[MNG-8494] Restore Maven 3 compatibility
bee7e85
@gnodet
Fix javadoc
73d8652
@gnodet
Add missing constant
f04fc52
@gnodet
Fixes
dc84751
elharo
elharo reviewed Jan 8, 2025
View reviewed changes
Comment thread api/maven-api-model/src/main/mdo/maven.mdo Outdated
<codeSegment>
<version>4.0.0/4.0.99</version>
<code>
<![CDATA[

@elharo elharo Jan 8, 2025

Copy link
Copy Markdown
Contributor

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.

not sure what CDATA is doing here. It's not needed

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread api/maven-api-toolchain/src/main/mdo/toolchains.mdo Outdated
<codeSegment>
<version>1.0.0/1.1.0</version>
<code>
<![CDATA[

@elharo elharo Jan 8, 2025

Copy link
Copy Markdown
Contributor

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.

not sure what CDATA is doing here. It's not needed

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread ...aven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java

protected AbstractMavenTransferListener(MessageBuilderFactory messageBuilderFactory, PrintWriter out) {
this.messageBuilderFactory = messageBuilderFactory;
protected PrintStream out;

@elharo elharo Jan 8, 2025

Copy link
Copy Markdown
Contributor

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.

PrintStream is wonky for multiple reasons. Can we just use an output stream writer instead?

Sorry, something went wrong.

Uh oh!

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

All reactions

@gnodet gnodet Jan 8, 2025

Copy link
Copy Markdown
Contributor Author

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 fully agree, however the code has already been cleaned up in the non deprecated version:

maven/impl/maven-cli/src/main/java/org/apache/maven/cling/transfer/AbstractMavenTransferListener.java

Line 36 in 698614e

public abstract class AbstractMavenTransferListener extends AbstractTransferListener {

That class is purely for compatibility, so no protected stuff should be changed.

The maven-embedder is here for compatibility and not used when launching Maven from CLI directly.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread compat/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelCache.java
/**
* Puts the specified data into the cache.
*
* @param groupId The group id of the cache record, must not be {@code null}.

@elharo elharo Jan 8, 2025

Copy link
Copy Markdown
Contributor

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.

Oracle javadoc guidelines are no initial capitalization on Javadoc comments and period only after or before a complete sentence

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread compat/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelCacheTag.java

/**
* Creates a copy of the data suitable for retrieval from the cache. The retrieved data can be mutated after the
* cache is queried but the state of the cache must not change so we need to make a copy.

@elharo elharo Jan 8, 2025

Copy link
Copy Markdown
Contributor

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.

queried,

Sorry, something went wrong.

Uh oh!

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

All reactions
@cstamas cstamas added this to the 4.0.0-rc-3 milestone Jan 8, 2025
@gnodet

gnodet commented Jan 8, 2025

Copy link
Copy Markdown
Contributor Author

99% of the code here is copy/pasted from maven-3.9.x branch to restore compatibility... so I'm fine with any change you suggest, but I really don't expect you to closely review all the changed files.

All reactions

Sorry, something went wrong.

Uh oh!

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

@cstamas

cstamas commented Jan 8, 2025

Copy link
Copy Markdown
Member

These are literally copies of Maven 3 classes.

All reactions

Sorry, something went wrong.

Uh oh!

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

cstamas
cstamas approved these changes Jan 8, 2025
View reviewed changes
@cstamas

cstamas commented Jan 9, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

IMHO last commit should be undone:

  • Maven2 "way" was to use SecDispatcher directlly
  • since Maven3 the "official way" was provided in Maven3 API and SecDispatcher is not even published as core component, see https://issues.apache.org/jira/browse/MNG-4384 Sadly this workaround got picked up despite there is official Maven 3 API for that, even in things like our gpg plugin [MGPG-138] Drop direct use of plexus-cipher and secdispatcher maven-gpg-plugin#115
  • IMHO in Maven4 we should not support Maven2 "way", only Maven 3 API
gnodet reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@gnodet
gnodet force-pushed the m3-full-compat branch from c03d95e to dc84751 Compare January 9, 2025 18:53
@gnodet
Remove CDATA sections
0974d5e
@gnodet
gnodet merged commit 5cef91e into apache:master Jan 10, 2025
@jira-importer

jira-importer commented Jul 7, 2025

Copy link
Copy Markdown

Resolve #9943

All reactions

Sorry, something went wrong.

Uh oh!

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

@gnodet
gnodet deleted the m3-full-compat branch October 26, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@elharo elharo elharo left review comments
@cstamas cstamas cstamas approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.0.0-rc-3

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

4 participants

@gnodet @cstamas @jira-importer @elharo
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.