ArtifactId is added to SCM URL using Maven Release Plugin

I have a POM wizard for all projects. POM contains the following part of SCM:

    <groupId>com.company</groupId>
    <artifactId>master</artifactId>
    <version>...</version>
    <packaging>pom</packaging>

    <scm>
        <connection>scm:git:https://user@bitbucket.server.de/scm/${scm.repository.name}/${scm.project.name}.git</connection>
        <developerConnection>scm:git:https://user@bitbucket.server.de/scm/${scm.repository.name}/${scm.project.name}.git</developerConnection>
        <url>https://bitbucket.server.de/scm/${scm.repository.name}/${scm.project.name}.git</url>
        <tag>HEAD</tag>
    </scm>

<properties>
     <project.scm.id>bitbucket-scm</project.scm.id>
     <scm.project.name>maven-master</scm.project.name>
     <scm.repository.name>tsu</scm.repository.name>
</properties>

Now I have a maven multi module project, this is the parent POM:

    <parent>
        <groupId>com.company</groupId>
        <artifactId>master</artifactId>
        <version>...</version>
    </parent>

    <groupId>com.company.group</groupId>
    <artifactId>project-foo</artifactId>
    <version>...</version>
    <packaging>jar</packaging>

    <name>project FOO</name>

    <properties>
        <scm.project.name>project-foo</scm.project.name>
    </properties>

When executing the release plugin to free the main POM (first fragment), it works fine. However, when you run the release plugin to release a project with multiple modules (second snippet), it fails, saying:

[ERROR] org.apache.maven.plugins: Maven--: 2.5.3: (default-cli) project-foo: : [ERROR] [] git -push . [ERROR] : [ERROR] : : [] [] .

URL- .

https://user: ******** @bitbucket.server.de/scm/tsu/maven-master. //Dev: //DEV

https://user: ******** @bitbucket.server.de/scm/tsu/project-foo. git/project-foo refs/heads/dev: refs/heads/dev

, - URL- .

SCM . , POM, SCM .

.

+4

Source: https://habr.com/ru/post/1664991/


All Articles