devonfw / maven-parent

Parent POM used for maven projects in devonfw
Apache License 2.0
0 stars 4 forks source link

prevent maven from auto-appending project artifactId to URLs #6

Closed hohwille closed 4 years ago

hohwille commented 4 years ago

In our parent POM we have this:

  <scm>
    <connection>scm:git:https://github.com/${github.organization}/${github.repository}.git</connection>
    <developerConnection>scm:git:https://github.com/${github.organization}/${github.repository}.git</developerConnection>
    <url>https://github.com/${github.organization}/${github.repository}/tree/${github.default.branch}</url>
    <tag/>
  </scm>

In devon4j this gets resolved to:

  <scm>
    <connection>scm:git:https://github.com/devonfw/devon4j.git/devon4j</connection>
    <developerConnection>scm:git:https://github.com/devonfw/devon4j.git/devon4j</developerConnection>
    <tag></tag>
    <url>https://github.com/devonfw/devon4j/tree/develop/devon4j</url>
  </scm>

As you can see maven automatically appends the project name (${project.artifactId}) to all SCM values. This is wrong and we need to find a way to disable it.

hohwille commented 4 years ago

Hard to find but possible since maven 3.6.0: https://maven.apache.org/ref/3.6.3/maven-model-builder/ https://maven.apache.org/ref/3.6.2/maven-model/maven.html

hohwille commented 4 years ago

Tricky but solved. Nice.