Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNG-7741] Track missing files, plugin and parent pom dependencies #1058

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

grgrzybek
Copy link

@grgrzybek grgrzybek commented Mar 16, 2023

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY,
    where you replace MNG-XXX and SUMMARY with the appropriate JIRA issue.
  • Also format the first line of the commit message like [MNG-XXX] SUMMARY.
    Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Path trackingFile = trackingDir.resolve(collectStepTrace
} else if (collectStepTrace != null) {
baseName =
collectStepTrace.getPath().get(0).getArtifact().toString().replace(":", "_");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a generic to ID function, I would rather prefer that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for comment - I'll review on Monday.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michael-o after quick look ... can you point me to the right "to ID function"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see org.eclipse.aether.internal.impl.synccontext.named.GAVNameMapper.fileGav()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, org.eclipse.aether.artifact.AbstractArtifact#toString() also uses extension and classifier, but org.eclipse.aether.internal.impl.synccontext.named.GAVNameMapper#getArtifactName() does not (and it's private, but using nameLocks() sounds like mixing concepts here - I don't deal with locks...)

Is there any other sanitizing method?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, meant this one and wasn't able to register. Then the colon can be exchanges for a tilde.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And ArtifactIdUtils uses SEP = ':' anyway... I want _.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is not (yet) flexible, use a replace() for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grgrzybek, please file an issue regarding the separator.

Copy link
Member

@cstamas cstamas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but pls fix the Artifact ID stuff

Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>
@cstamas
Copy link
Member

cstamas commented Apr 12, 2023

@michael-o anything to fix here? Good to merge?

Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cstamas I still think that we should use tilde instead of underscore just like we do with other FS-locking releated components. This would make those file styles consistent. The rest is fine.

@cstamas
Copy link
Member

cstamas commented Apr 12, 2023

IMHO this is irrelevant, the info gathered here is really just a "verbose log-like" output for human consumption, nothing produced here is to be reused by any code... so IMHO forcing some "... as we did it before" is really not needed.

@michael-o michael-o self-requested a review April 12, 2023 11:01
Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I am fine with the change.

@cstamas cstamas merged commit bc138dc into apache:maven-3.9.x Apr 12, 2023
cstamas added a commit that referenced this pull request Apr 12, 2023
…1058)

Add more information when using `-Dmaven.repo.local.recordReverseTree=true`.

Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>

---

https://issues.apache.org/jira/browse/MNG-7741
@grgrzybek
Copy link
Author

Thanks!

I was skeptical about org.eclipse.aether.internal.impl.synccontext.named.GAVNameMapper.fileGav() and tilde (~) wasn't mentioned before... And indeed it's only a tracking file name. Anyway - thanks for understanding.

@grgrzybek grgrzybek deleted the MNG-7741 branch April 12, 2023 11:12
@cstamas
Copy link
Member

cstamas commented Apr 12, 2023

Yes, moreover, the tilde originates from Takari Shared Local Repo as initially we tried to create "compatible" file locking, but gave up as Takari implementation had issues, but the tilde somehow remained in our codebase, but again, is really irrelevant. Personally, as these files are for human consumption, underscore makes much more sense (would make even for locking, but this is what it is), is better visually and easier to type as well (at least on HU kbd 😄 )

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