You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/09/23 21:44:57 UTC
[PR] MINSTALL-315: add IT for pom-packaged project with jar:jar then install:install [maven-install-plugin]
gnodet opened a new pull request, #456:
URL: https://github.com/apache/maven-install-plugin/pull/456
## Problem
When `jar:jar` is run on a `pom`-packaged project followed by `install:install`, the JAR produced by `jar:jar` gets installed at the POM coordinates instead of the actual POM file. See [MINSTALL-315](https://issues.apache.org/jira/browse/MINSTALL-315).
## Fix
The root cause is in `DefaultArtifactManager.getPath()` in Maven core — see apache/maven#13256.
## This PR
Adds a regression IT (`minstall-315-pom-packaged-jar-jar`) that:
1. Runs `jar:jar install:install` on a `pom`-packaged project
2. Verifies the installed file at the POM coordinates is an XML file (not a ZIP/JAR)
3. Verifies no `.jar` was installed under the POM coordinates
The IT requires the Maven core fix (apache/maven#13256) to pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINSTALL-315: add IT for pom-packaged project with jar:jar then install:install [maven-install-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #456:
URL: https://github.com/apache/maven-install-plugin/pull/456#issuecomment-5804320173
Closing after thorough investigation of why the IT passes on rc-6.
**Root cause of the false green:**
In rc-6, not only stores the path in the map but **also** back-propagates it to the legacy layer: . This is still the case in master (same block).
So even without our priority fix:
1. calls → legacy state is JAR
2. calls → overwrites legacy state back to POM via
3. hits the project loop → returns from the now-corrected
The fix is correct (checking the map first is the right invariant), but **the bug cannot be reproduced as a failing IT** with this scenario, because fixes the legacy state before is called.
A failing IT would require a scenario where is called between a invocation (which sets the JAR file) and a call that hasn't happened yet — which doesn't happen in the normal flow.
The maven core fix (apache/maven#13256) still stands as a correctness improvement.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINSTALL-315: add IT for pom-packaged project with jar:jar then install:install [maven-install-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #456:
URL: https://github.com/apache/maven-install-plugin/pull/456#issuecomment-5804206827
After investigating the reviewer's observation: the IT is indeed a false green, not a false negative from a missing fix.
Root cause: in `DefaultProject.getArtifacts()`, for a `pom`-packaged project, `ArtifactIdUtils.equalsVersionlessId(pomArtifact, projectArtifact)` is `true` (same coordinates), so the returned list has only one element — the POM artifact. `getMainArtifact()` returns `Optional.empty()`.
This means `install:install` only ever deals with the POM artifact, whose path comes from `project.getPomPath()` via `setPath(project.getPomArtifact(), project.getPomPath())` — and the install proceeds correctly regardless of the `DefaultArtifactManager.getPath()` fix.
So the bug either does not manifest on Maven 4 with `pom` packaging + `jar:jar`, or it only manifests in a specific scenario I haven't yet identified. Closing this PR — the core fix in apache/maven#13256 stands (it's a correctness issue in the priority order of the `paths` map vs project artifact file), but I'll need to either find a concrete reproducer or re-scope the fix accordingly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINSTALL-315: add IT for pom-packaged project with jar:jar then install:install [maven-install-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed pull request #456: MINSTALL-315: add IT for pom-packaged project with jar:jar then install:install
URL: https://github.com/apache/maven-install-plugin/pull/456
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org