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

Fix project and scm urls in child project POMs #23928

Merged
merged 2 commits into from
Mar 3, 2022

Conversation

lucifer4j
Copy link
Contributor

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.

Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

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

LGTM

@gastaldi
Copy link
Contributor

@lucifer4j do you have a reference link to share showing these properties?

@quarkus-bot
Copy link

quarkus-bot bot commented Feb 24, 2022

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 585000e

Status Name Step Failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
✔️ JVM Tests - JDK 17

Full information is available in the Build summary check run.

Failures

⚙️ Gradle Tests - JDK 11 Windows #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.DotEnvQuarkusDevModeConfigurationTest.main line 13 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference, java.util.concurrent.atomic.AtomicReferencejava.lang.String, java.lang.Stringboolean was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:164)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/grpc-hibernate 

📦 integration-tests/grpc-hibernate

com.example.grpc.hibernate.BlockingRawTest.shouldAdd line 61 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in com.example.grpc.hibernate.BlockingRawTest that uses java.util.List was not fulfilled within 30 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:164)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

@lucifer4j
Copy link
Contributor Author

@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: child.project.url.inherit.append.path, child.scm.connection.inherit.append.path, child.scm.developerConnection.inherit.append.path and child.scm.url.inherit.append.path.

There is also 1 additional attribute available child.site.url.inherit.append.path. I didn't see the site url to be specified anywhere in the parent pom, the pom in docs or in the quick search of the pom files in the repo so I didn't use that attribute in the PR.

Copy link
Member

@famod famod left a 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?

@quarkus-bot quarkus-bot bot added area/arc Issue related to ARC (dependency injection) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform labels Mar 2, 2022
@lucifer4j
Copy link
Contributor Author

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.

@lucifer4j
Copy link
Contributor Author

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.

@famod
Copy link
Member

famod commented Mar 2, 2022

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.

@famod famod added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Mar 2, 2022
@gastaldi
Copy link
Contributor

gastaldi commented Mar 2, 2022

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.
@lucifer4j
Copy link
Contributor Author

@famod Oh! Makes sense 👍

@gastaldi gastaldi merged commit b2edb13 into quarkusio:main Mar 3, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Mar 3, 2022
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants