Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven SCM Plugin: Git SSH provider not found

I'm having a problem using the Maven SCM plugin with Git. I cannot get the plugin to work at all because it says the provider is not found. It gives me the following error when I run mvn scm:tag:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.9:tag (default-cli) on project hello-world-service-minimal: Cannot run tag command : Can't load the scm provider. No such provider: 'git:ssh://[email protected]' . -> [Help 1]

My pom.xml looks like the following:

<project>
  <modelVersion>4.0.0</modelVersion>

  <groupId>net.REDACTED</groupId>
  <artifactId>hello-world-service-minimal</artifactId>
  <version>1.0.13</version>
  <packaging>pom</packaging>

  <name>hello-world-service</name>

  <properties>
     <lang.java.source>1.7</lang.java.source>
     <lang.java.target>1.7</lang.java.target>

    <dep.junit>4.11</dep.junit>
  </properties>

  <scm>
     <developerConnection>scm:git:ssh://[email protected]|PROJECT_NAME/hello-world-service-minimal.git</developerConnection>
     <url>scm:git:http://git-eng.REDACTED.com/PROJECT_NAME/hello-world-service-minimal/tree/master</url>
  </scm>

  <distributionManagement>
     <repository>
        <id>dev.release</id>
        <url>file:${project.build.directory}/repository/</url>
     </repository>
  </distributionManagement>

  <build>
      <plugins>
          <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>versions-maven-plugin</artifactId>
              <version>2.1</version>
          </plugin>
          <plugin>
              <artifactId>maven-scm-plugin</artifactId>
              <version>1.9</version>
              <configuration>
                  <tag>${project.artifactId}-${project.version}</tag>
              </configuration>
          </plugin>
      </plugins>
  </build>
</project>

Anyone have any idea how to fix this? This is driving me crazy. I can't figure out what I am doing wrong at all.

like image 702
Philip Lombardi Avatar asked Mar 25 '14 04:03

Philip Lombardi


People also ask

What is Maven SCM plugin?

The SCM Plugin offers vendor independent access to common scm commands by offering a set of command mappings for the configured scm. Each command is implemented as a goal.

What is SCM connection?

SCM Connections provides innovative process design, quality implementations, and sustainable adoption for long-term supply chain forecasting methods.

What is the use of SCM tag in POM XML?

Assuming that SCM has been configured in the pom. xml and the project directory is managed by a SCM, invoking the checkin goal in the scm will start the commit process for all configured sources in your pom. xml. The files should be added beforehand by an external scm client.

How does maven release plugin work?

The plugin will extract file revisions associated with the current release. Maven will compile, test and package the versioned project source code into an artifact. The final deliverable will then be released into an appropriate maven repository.


1 Answers

The <url> tag is for a regular browsable URL. You need a <connection> tag (<connection> is for read access, <developerConnection> is for write access):

<scm>
  <connection>scm:git:ssh://[email protected]|PROJECT_NAME/hello-world-service-minimal.git</connection>
  <developerConnection>scm:git:ssh://[email protected]|PROJECT_NAME/hello-world-service-minimal.git</developerConnection>
  <url>http://git-eng.REDACTED.com/PROJECT_NAME/hello-world-service-minimal/tree/master</url>
</scm>

See the Maven POM Reference for more information.

like image 65
Adam Batkin Avatar answered Sep 18 '22 18:09

Adam Batkin