简体   繁体   中英

Not able to upload artifact in JFrog using maven-release-plugin from Jenkins

I am using Jenkins to build my project. I am using "maven-release-plugin" and "release plugin", both plugins has been installed in Jenkins. We are getting below error message while building my project, could anybody please help me on this to fix this issue. We would like to upload the artifact in JFrog instead of Git. We want to autoincrement the version of artifact.

Error: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project Test: The scm url is invalid.

Command: mvn -B clean release:prepare release:perform

pom.xml:

<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId></groupId>
    <artifactId></artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name></name>
    <url></url>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jackson.version>2.9.8</jackson.version>
    </properties>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.4.RELEASE</version>
        <relativePath /> 
    </parent>
    <scm>
        <connection>scm:cvs:https://na.artifactory.swg-devops.com/artifactory/gbs-copra-team-ipat-dev-maven-local/</connection>
        <url>https://na.artifactory.swg-devops.com/artifactory</url>
        <developerConnection>scm:cvs:https://na.artifactory.swg-devops.com/artifactory/gbs-copra-team-ipat-dev-maven-local/</developerConnection>
    </scm>
        
    <build>
        <sourceDirectory>src</sourceDirectory>
        <plugins>
       <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
                <useReleaseProfile>false</useReleaseProfile>
          </configuration>
       </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
<connection>scm:cvs:https://na.artifactory.swg-devops.com/artifactory/gbs-copra-team-ipat-dev-maven-local/</connection>
<developerConnection>scm:cvs:https://na.artifactory.swg-devops.com/artifactory/gbs-copra-team-ipat-dev-maven-local/</developerConnection>

these won't work. You can see here what is supported by cvs:

The general format for a CVS SCM URL is

scm:cvs<delimiter><method> 

The following methods are supported:

  • ext, connecting to a server using an external rsh program
  • local, connecting to the local file system
  • lserver, connecting to a local server
  • pserver, connecting to a password-authenticating server
  • sspi, secure authentication (less supported by clients and servers, may require using native implementation, for more details see "How to choose the CVS provider implementation")
  • sserver, SSL connection method for CVS (only if cvs_native is used ie using -Dmaven.scm.provider.cvs.implementation=cvs_native with Maven)

I'm not sure what you're trying to do but cvs over https won't work. Are you sure you're really using cvs?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM