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-7253] Display relocation message defined in model #544

Closed
wants to merge 1 commit into from
Closed

[MNG-7253] Display relocation message defined in model #544

wants to merge 1 commit into from

Conversation

gastaldi
Copy link
Member

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] - Fixes bug in ApproximateQuantiles,
    where you replace MNG-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in 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.

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.

If you can make it proper along with a small test I will include this in 3.8.3 which will be available by the end of the month.

@gastaldi
Copy link
Member Author

I'm not sure how to test this, given that the only change introduced was the logging statement. Is there any example in the codebase that captures the log output?

@michael-o
Copy link
Member

That be a case for an IT...but the change is so simple that maybe we can go with out.
I think this can be safely merged into master and 3.8.x @rfscholte Any objections?

@rfscholte
Copy link
Contributor

Why not move the logging to DefaultArtifactDescriptorReader.java? To me relocation is the mechanism to relocate and that's where the mesage belongs. the relocationArtifact is just the artifact, I don't the a message belongs there.

@michael-o
Copy link
Member

DefaultArtifactDescriptorReader

The entire logging?

@rfscholte
Copy link
Contributor

The entire logging?

The relocation warning (which is basically everything apart from the visitEnter debug logging)

@gastaldi
Copy link
Member Author

The relocation warning (which is basically everything apart from the visitEnter debug logging)

This sounds like a code refactoring that can be done in a separate PR

@rfscholte
Copy link
Contributor

It makes the addition of message to the ResolcationArtifact absolete.
The title of the ticket still reflects the goal: Display relocation message as defined in the pom.

@michael-o
Copy link
Member

It makes the addition of message to the ResolcationArtifact absolete.
The title of the ticket still reflects the goal: Display relocation message as defined in the pom.

Correct, this is not a resolution problem, but when the static model is read.

@gastaldi
Copy link
Member Author

gastaldi commented Sep 17, 2021

So in this case org.eclipse.sisu:org.eclipse.sisu.plexus would no longer be a test dependency in the maven-resolver-provider project (because that's where the Logger class used in DefaultProjectDependenciesResolver is)?

@michael-o
Copy link
Member

So in this case org.eclipse.sisu:org.eclipse.sisu.plexus would no longer be a test dependency in the maven-resolver-provider project (because that's where the Logger class used in DefaultProjectDependenciesResolver is)?

Use SLF4J and nothing else for new code. Does this solve your problem?

@gastaldi
Copy link
Member Author

Done, see if that's okay now

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.

Looks better now. I will try make this run in action. First I need a relocated artifact or make my own...

@gastaldi
Copy link
Member Author

Wait, I am seeing two warnings now in my local test:

[WARNING] The artifact io.quarkus:quarkus-vertx-web:jar:999-SNAPSHOT has been relocated to io.quarkus:quarkus-reactive-routes:jar:999-SNAPSHOT: The artifact quarkus-vertx-web is now named quarkus-reactive-routes. Please update your dependency.
[WARNING] The POM for io.quarkus:quarkus-vertx-web:jar:999-SNAPSHOT is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

@michael-o
Copy link
Member

Very nice. Have the the POM be invalid if the message is displayed? I am confused...

@gastaldi
Copy link
Member Author

The debug logging says: Artifact relocations form a cycle: [io.quarkus:quarkus-vertx-web:999-SNAPSHOT] that's really weird, I'm investigating

@gastaldi
Copy link
Member Author

It is really strange, if I remove this commit, the extra warning message is no longer shown.

@gastaldi
Copy link
Member Author

Ahhh found the bug, nvm

Move logging to DefaultArtifactDescriptorReader
@gastaldi
Copy link
Member Author

This is working as it should now. It displays:

[WARNING] The artifact io.quarkus:quarkus-vertx-web:jar:999-SNAPSHOT has been relocated to io.quarkus:quarkus-reactive-routes:jar:999-SNAPSHOT: The artifact quarkus-vertx-web is now named quarkus-reactive-routes. Please update your dependency.

When I have this: https://github.com/quarkusio/quarkus/blob/main/extensions/vertx-web/runtime/pom.xml#L16-L19

asfgit pushed a commit that referenced this pull request Sep 18, 2021
Move logging to DefaultArtifactDescriptorReader

This closes #544
@michael-o
Copy link
Member

Merged.

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.

4 participants