0

我正在使用 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>
4

1 回答 1

0
<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>

这些是行不通的。您可以在此处查看cvs 支持的内容:

CVS SCM URL 的一般格式是

scm:cvs<分隔符><方法>

支持以下方法:

  • ext,使用外部 rsh 程序连接到服务器
  • local,连接到本地文件系统
  • lserver,连接到本地服务器
  • pserver,连接到密码验证服务器
  • sspi,安全身份验证(客户端和服务器支持较少,可能需要使用本机实现,有关更多详细信息,请参阅“如何选择 CVS 提供程序实现”)
  • sserver,CVS 的 SSL 连接方法(仅当使用 cvs_native 时,即使用 -Dmaven.scm.provider.cvs.implementation=cvs_native 和 Maven)

我不确定您要做什么,但是通过 https 的 cvs 将无法正常工作。你确定你真的在使用 cvs 吗?

于 2021-01-21T21:37:08.067 回答