Skip to content

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Jul 7, 2023

JIRA issue: https://issues.apache.org/jira/browse/MNG-7838
IT PR: apache/maven-integration-testing#278

I'm not sure yet it solves the original reported problem though.

@gnodet
Copy link
Contributor Author

gnodet commented Jul 7, 2023

A similar problem can easily be reproduced in maven master:

> cd maven-settings
> mvn install
[INFO] --- japicmp:0.17.2:cmp (default) @ maven-settings ---
[WARNING] File 'maven-settings/target/classes/org/apache/maven/settings/WrapperList.class' is more recent than the packaged artifact for 'maven-settings', please run a full `mvn package` build
[WARNING] File 'maven-settings/target/classes/org/apache/maven/settings/WrapperList.class' is more recent than the packaged artifact for 'maven-settings', please run a full `mvn package` build
Listening for transport dt_socket at address: 8000
[INFO] Written file '/Users/gnodet/work/git/maven/maven-settings/target/japicmp/japicmp.diff'.
[INFO] Written file '/Users/gnodet/work/git/maven/maven-settings/target/japicmp/japicmp.xml'.
[INFO] Written file '/Users/gnodet/work/git/maven/maven-settings/target/japicmp/japicmp.html'.

In this case, the japicmp:cmp goal is executed after the jar goal, but before the install goal. And the artifacts are copied into the project local repo after the project is fully built. With this PR, the project's artifacts take precedence over the ones from the project local repo, so it actually fixes the above problem.

@gnodet
Copy link
Contributor Author

gnodet commented Jul 7, 2023

@rmannibucau it would be nice if you could build this branch and see if this reproduces your actual problem. A small reproducer project would be even better !

@rmannibucau
Copy link
Contributor

@gnodet does not look helping much (and didnt manage to get it functional), guess it is cause it does not take the highest "lastModified" value from [local-repo, m2/repo] - last one being the aether resolver indeed.

@gnodet gnodet requested a review from cstamas July 20, 2023 06:14
@gnodet gnodet added this to the 4.0.0 milestone Sep 26, 2023
@gnodet gnodet modified the milestones: 4.0.0, 4.x Jul 6, 2024
@gnodet gnodet modified the milestones: 4.x, 4.0.0-beta-4 Aug 29, 2024
@gnodet gnodet merged commit c0813a2 into apache:master Aug 29, 2024
@jira-importer
Copy link

Resolve #9080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants