2015-06-01 63 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

相關問題