2015-06-01 23 views
0

我正在寻找以下内容。如何使用Maven从CVS结帐代码

  1. 如何从CVS

  2. 检出代码如何签,并从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|[email protected]|c:/cvs/dev|IRM</connection> 
<developerConnection>scm:cvs|pserver|username|[email protected]|c:/cvs/dev|IRM</developerConnection> 
<tag>HEAD</tag> 
<scm> 

当我执行命令MVN SCM:结帐它抛出以下错误。

[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:[email protected]: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:[email protected]:2401:c:\cvs\dev -q checkout -d checkout IRM 

更多细节可以在这里找到:

How to checkout project from head using CVS command using windows command prompt

+0

也许使用的delimter混淆了SCM插件:http://maven.apache.org/scm/cvs.html - 该网页上的示例部分包含了一些变化为更适合窗户(因为:在路径中) – wemu

+0

有关如何解决此问题的任何想法?我已经尝试了几种可能的组合,但没有成功:( –

+3

很明显,什么是错误** scm url无效**应该是什么,没有人但你可以知道,因为你知道机器和路径的名称到你想要的。 –

回答

0

我花了相当一段时间并且找不到使用Maven SCM插件的解决方案。 Maven SCM插件的文档也不是很好。

我能够使用ant插件(maven-antrun-plugin)来解决问题。对于具体的解决方案,请参阅

CVS Checkout using MAVEN ANT plugin

相关问题