-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix project and scm urls in child project POMs #23928
Conversation
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
@lucifer4j do you have a reference link to share showing these properties? |
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 585000e
Full information is available in the Build summary check run. Failures⚙️ Gradle Tests - JDK 11 Windows #- Failing: integration-tests/gradle
📦 integration-tests/gradle✖
⚙️ JVM Tests - JDK 11 #- Failing: integration-tests/grpc-hibernate
📦 integration-tests/grpc-hibernate✖
|
@gastaldi Ah yes. Sorry forgot to put it here earlier. Here it is: Maven POM schema reference. Anchors are not available on the page so you may need to scroll a bit to find the attributes. These are the attributes to look for: There is also 1 additional attribute available |
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.
Can't say I have used those myself, but looks alright!
But I think independent-projects
should be covered as well?
Hi! Sorry for the delay in replying. @famod I have updated independent projects as well. Since the independent projects inherit from JBoss Parent POM, I also needed to add url and scm at a few places in the parent independent projects. Otherwise, the url would have been set to the jboss repo. |
I realised a few minutes ago that the jboss-parent-pom is probably a better place to fix this issue so I have opened a PR there. If that PR gets accepted, this one can probably be discarded. |
Thanks! But I think we should merge this regardless as things are moving very slow for jboss-parent. |
Oops, clicked the Update Branch by accident, should have chosen Rebase |
Maven's default behaviour is to append path and artifact id to parent project url for setting child project's url. But this is not helpful because these urls, for instance https://github.com/quarkusio/quarkus/bom/quarkus-bom end up in 404s. Similarly, the scm urls are broken. The right behaviour would most likely be to point to just https://github.com/quarkusio/quarkus/. Thankfully, Maven 3.6.1 introduced some attribute to set the child project's url to the project url of the parent without modifications. Therefore, set the child.project.url.inherit.append.path project attribute and various scm attributes to ensure the correct urls are generated.
Just like other child projects the project and scm urls are broken for independent projects. However, these projects inherit from JBoss Parent POM so we need to override the url once in each parent independent project as well in addition to the adding the inherit.append.path attributes.
@famod Oh! Makes sense 👍 |
Maven's default behaviour is to append path and artifact id to parent project url for setting child project's url. But this is not helpful because these urls, for instance https://github.com/quarkusio/quarkus/bom/quarkus-bom end up in 404s. Similarly, the scm urls are broken. The right behaviour would most likely be to point to just https://github.com/quarkusio/quarkus/.
Thankfully, Maven 3.6.1 introduced some attribute to set the child project's url to the project url of the parent without modifications. Therefore, set the child.project.url.inherit.append.path project attribute and various scm attributes to ensure the correct urls are generated.
The fix can be verified by running
help:effective-pom
maven goal and looking at the output.