无法使用 Jenkins 的 maven-release-plugin 在 JFrog 中上传工件

问题描述

我正在使用 Jenkins 来构建我的项目。我正在使用“maven-release-plugin”和“release plugin”,这两个插件都已安装在 Jenkins 中。我们在构建我的项目时收到以下错误消息,有人可以帮我解决这个问题吗?我们想在 JFrog 而不是 Git 中上传工件。我们想要自动增加工件的版本。

错误: 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.

命令: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>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)