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 — Do not take the URL of a model in a JAR for a file path in plugin validation messages (fix #10719) by arturobernalg · Pull Request #13576 · apache/maven

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Oct 16, 2026

Copy link
Copy Markdown
Member

What and why

DefaultPluginValidationManager#pluginDeclaration prints where a plugin is declared. The location of the super POM is the URL of a resource in a JAR, for instance jar:file:/C:/maven/lib/maven-model-builder.jar!/org/apache/maven/model/pom-4.0.0.xml. The existing check only treats a location as a URL when it contains ://, which this one does not, so it was converted to a file path to be printed relative to the project. On Windows that throws an InvalidPathException (illegal :), and the build fails instead of printing the validation warning, as reported for the release-profile of the super POM (#10719).

How

A location with a URL scheme is printed as it is. A new isUrl helper recognises a scheme of at least two characters, so that the drive of a Windows path such as C:\\proj\\pom.xml is not taken for one.

Tests

DefaultPluginValidationManagerTest covers URL and file path locations, including Windows paths. maven-core passes (422 tests) and spotless is clean. I did not reproduce the exception end to end, because it only happens on Windows, and I did not run the integration tests.

This is 3.10.x only. Maven 4 no longer has a release-profile in the super POM.


To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
check one of the following:

  • I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004
  • I hereby declare that I have filed an Apache Individual Contributor License Agreement.

Sorry, something went wrong.

Uh oh!

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

All reactions
@arturobernalg
Do not take the URL of a model in a JAR for a file path when reportin…
2563f3f
…g plugin validation issues (fix apache#10719)

The location of the super POM is the URL of a resource in a JAR, such as jar:file:/C:/maven/lib/maven-model-builder.jar!/org/apache/maven/model/pom-4.0.0.xml. It has no ://, so it was converted to a file path to print it relative to the project, which fails on Windows with an InvalidPathException and fails the build instead of printing the warning, for instance with the release-profile of the super POM.

Fixes apache#10719
@slawekjaranowski

slawekjaranowski commented Oct 16, 2026

Copy link
Copy Markdown
Member

This is 3.10.x only. Maven 4 no longer has a release-profile in the super POM.

release-profile in the super POM is also removed from 3.10.x

  • Remove release-profile from super POM #11999
All reactions

Sorry, something went wrong.

Uh oh!

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

@arturobernalg

arturobernalg commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

Thanks. I checked the super POM of 3.10.x: after #11999 it has no profiles and no plugins, so the release-profile that triggered #10719 is gone, and I could not find another plugin declaration whose location is a JAR URL. Without a remaining trigger this change is not needed on this branch, so I am closing it. I will say so on #10719.

All reactions

Sorry, something went wrong.

Uh oh!

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

@arturobernalg arturobernalg closed this Oct 17, 2026
@arturobernalg arturobernalg mentioned this pull request Oct 17, 2026
[MNG-8504] Maven deploy with "release-profile" fails due to exception in plugin validation #10719
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

2 participants

@arturobernalg @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.