Skip to content

Commit

Permalink
Fix project and scm urls in child project POMs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lucifer4j authored and gastaldi committed Feb 23, 2022
1 parent d53b6c9 commit 585000e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
child.project.url.inherit.append.path="false">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss</groupId>
Expand Down Expand Up @@ -35,7 +36,9 @@
</license>
</licenses>

<scm>
<scm child.scm.connection.inherit.append.path="false"
child.scm.developerConnection.inherit.append.path="false"
child.scm.url.inherit.append.path="false">
<url>https://github.com/quarkusio/quarkus</url>
<connection>scm:git:[email protected]:quarkusio/quarkus.git</connection>
<developerConnection>scm:git:[email protected]:quarkusio/quarkus.git</developerConnection>
Expand Down

0 comments on commit 585000e

Please sign in to comment.