Skip to content

Commit c34b9ff

Browse files
authored
Fix incorrect inherited URLs in pom.xml (#2351)
Previously Maven appended the artifact ID of the modules which lead for example for the `gson` module to the incorrect URL https://github.com/google/gson/gson This can be checked with `mvn help:effective-pom`
1 parent 7f303b5 commit c34b9ff

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pom.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<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 http://maven.apache.org/maven-v4_0_0.xsd">
17+
<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 http://maven.apache.org/maven-v4_0_0.xsd"
18+
child.project.url.inherit.append.path="false">
1819
<modelVersion>4.0.0</modelVersion>
1920

2021
<groupId>com.google.code.gson</groupId>
@@ -39,7 +40,9 @@
3940
<maven.compiler.testRelease>11</maven.compiler.testRelease>
4041
</properties>
4142

42-
<scm>
43+
<!-- These attributes specify that the URLs should be inherited by the modules as is, to avoid constructing
44+
invalid URLs, see also https://maven.apache.org/ref/3.9.1/maven-model-builder/index.html#inheritance-assembly -->
45+
<scm child.scm.url.inherit.append.path="false" child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false">
4346
<url>https://github.com/google/gson/</url>
4447
<connection>scm:git:https://github.com/google/gson.git</connection>
4548
<developerConnection>scm:git:[email protected]:google/gson.git</developerConnection>

0 commit comments

Comments
 (0)