GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: fix addParentPoms=true causes repositories to be ignored. by k-wall · Pull Request #1585 · apache/maven-dependency-plugin Conversation
|
|
Anyone? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I would really like to see this issue resolved, would any commiter be able to comment please? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ProjectBuildingRequest buildingRequest = | ||
| new DefaultProjectBuildingRequest(session.getProjectBuildingRequest()); | ||
| buildingRequest.setProcessPlugins(false); | ||
| if (getProject().getRemoteArtifactRepositories() != null |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
getProject().getRemoteArtifactRepositories() it should be never null
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Keith Wall <[email protected]>
32566ad to
2073584
Compare
| new DefaultProjectBuildingRequest(session.getProjectBuildingRequest()); | ||
| buildingRequest.setProcessPlugins(false); | ||
| if (getProject().getRemoteArtifactRepositories() != null | ||
| && !getProject().getRemoteArtifactRepositories().isEmpty()) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
also getProject().getRemoteArtifactRepositories() should never be empty
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@k-wall thanks, I have rebased with current muster to trigger CI build |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can there be an IT or unit test for this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Great, thanks for picking up. I'll see if I can add a test. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
You can look at my coments |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add integration test to verify that when using copy-dependencies with addParentPoms=true, the plugin correctly propagates the project's remote repositories to the ProjectBuildingRequest when resolving parent POMs. The test uses the "fake-remote-repository" pattern to ensure the custom repository is NOT mirrored by MRM (Mock Repository Manager). This is critical because MRM is configured as a global mirror in src/it/mrm/settings.xml with: <mirrorOf>*,!fake-remote-repository</mirrorOf> By using id "fake-remote-repository", the repository is: - NOT mirrored by MRM - NOT inherited in the session's repository configuration - ONLY available if explicitly propagated via setRemoteRepositories() This ensures the test actually validates the fix. TEST VALIDATION: - WITHOUT fix: Test FAILS with "Could not build project" error at buildProjectFromArtifact() because fake-remote-repository is not propagated - WITH fix: Test PASSES, parent POM successfully resolved and copied Test structure (following copy-from-remote-repository pattern): - repo/: Local repository with test artifacts (test-parent, test-child) - pom.xml: Declares fake-remote-repository and dependency on test-child - setup.bsh: Cleans local cache to force fresh resolution - verify.bsh: Validates parent POM was copied to output Assisted-by: Claude Sonnet 4.5 <[email protected]> Signed-off-by: Keith Wall <[email protected]>
Remove unnecessary null and empty checks for getProject().getRemoteArtifactRepositories() as the reviewer (slawekjaranowski) noted these should never be null or empty in Maven. Signed-off-by: Keith Wall <[email protected]>
There was an error while loading. Please reload this page.
|
I've added an IT and believe I have addressed the feedback. Please take another look. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[MDEP-592] Regression: -Dmdep.addParentPoms=true causes <repositories> to be ignored
There was an error while loading. Please reload this page.