-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Conversation
Path trackingFile = trackingDir.resolve(collectStepTrace | ||
} else if (collectStepTrace != null) { | ||
baseName = | ||
collectStepTrace.getPath().get(0).getArtifact().toString().replace(":", "_"); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, checking.
However current it's just toString + replace: https://github.com/apache/maven/blob/maven-3.9.1/maven-core/src/main/java/org/apache/maven/internal/aether/ReverseTreeRepositoryListener.java#L81-L86
There was a problem hiding this comment.
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 _
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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>
@michael-o anything to fix here? Good to merge? |
There was a problem hiding this 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.
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. |
There was a problem hiding this 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.
…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
Thanks! I was skeptical about |
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 😄 ) |
Following this checklist to help us incorporate your
contribution quickly and easily:
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.
[MNG-XXX] SUMMARY
,where you replace
MNG-XXX
andSUMMARY
with the appropriate JIRA issue.[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.
mvn clean verify
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
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.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.