【发布时间】:2015-08-15 08:38:05
【问题描述】:
我正在寻找以下内容。
如何从 CVS 签出代码
如何从 CVS 签入和更新代码
我的 CVS 服务器名称:cecvs02dv,可以使用用户名和密码访问(不能通过 HTTP 访问)
CVS 文件夹:c:\cvs\dev
模块名称:i3LOC
到 CVS 的连接配置
<scm>
<connection>scm:cvs:ext:cecvs02dv:c:\cvs\dev:i3LOC</connection>
</scm>
初始 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.td.insurance</groupId>
<artifactId>Test</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Test</name>
<url>http://maven.apache.org</url>
<scm>
<connection>scm:cvs:ext:cecvs02dv:c:\cvs\dev:i3LOC</connection>
</scm>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.td.insurance</groupId>
<artifactId>batchframework</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-9</version>
<configuration>
<useReleaseProfile>false</useReleaseProfile>
<goals>deploy</goals>
<scmCommentPrefix>[bus-core-api-release-checkin]-</scmCommentPrefix>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.7</version>
<configuration>
<providerImplementations>
<cvs>cvs_native</cvs>
</providerImplementations>
</configuration>
</plugin>
</plugins>
</build>
错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.7:update (default-cli) on project Test: Cannot run update command : Ca
n't load the scm provider. The scm url is invalid. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
任何提示都会非常有用
已编辑:更改 POM.xml 中的 SCM 标签后
<scm>
<connection>scm:cvs|pserver|username|password@cecvs02dv|c:/cvs/dev|IRM</connection>
<developerConnection>scm:cvs|pserver|username|password@cecvs02dv|c:/cvs/dev|IRM</developerConnection>
<tag>HEAD</tag>
<scm>
当我执行命令 mvn scm:checkout 时,它会抛出以下错误。
[INFO] Change the default 'cvs' provider implementation to 'cvs_native'.
[INFO] Removing D:\vinu\workspace\Maven\IRM\target\checkout
[INFO] Executing: cmd.exe /X /C "cvs -z3 -f -d :pserver:username@cecvs02dv:c:/cvs/dev -q checkout -d checkout IRM"
[INFO] Working directory: D:\vinu\workspace\Maven\IRM\target
[ERROR] Provider message:
[ERROR] The cvs command failed.
[ERROR] Command output:
[ERROR] Empty password used - try 'cvs login' with a real password
cvs [checkout aborted]: authorization failed: server cecvs02dv rejected access to c:/cvs/dev for user username
但是,当我尝试在命令提示符下使用以下命令进行结帐时,它可以工作
cvs -z3 -f -d :pserver:username:passsword@cecvs02dv:2401:c:\cvs\dev -q checkout -d checkout IRM
更多细节可以在这里找到:
How to checkout project from head using CVS command using windows command prompt
【问题讨论】:
-
可能使用的分隔符混淆了 scm 插件:maven.apache.org/scm/cvs.html - 该页面上的示例部分包含一些更适合 Windows 的变体(因为路径中的 :)
-
知道如何解决这个问题吗?我尝试了几种可能的组合都没有成功:(
-
问题很清楚scm url无效。应该是什么,除了你知道机器的名称和路径,没有人知道你想要什么。
-
看看使用
mvn -X -e ....运行Maven时的输出 -
@carlspring 我仍在使用 Struts 1.x 和 Java 5/6
标签: java maven commit cvs vcs-checkout