使用MAVEN ANT插件进行CVS结帐

时间:2015-06-30 19:10:32

标签: maven ant pom.xml cvs vcs-checkout

我正在寻找以下内容。

如何使用MAVEN ANT插件从CVS签出代码

我的CVS服务器名称:cecvs02dv,可以使用用户名和密码访问(无法通过HTTP访问)

CVS文件夹:c:\ cvs \ dev

模块名称:IRM

我可以使用Windows命令提示符下面的CVS命令连接到CVS。

/>cvs -z3 -f -d :pserver:user:password@cecvs02dv:2401:c:\cvs\dev -q checkout -d checkout IRM

使用上面的命令,我可以从CVS服务器检出代码。

pom.xml :: ANT Maven插件

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
                <execution>
                    <id>ftp</id>
                    <phase>install</phase>
                    <configuration>
                        <tasks>

<cvspass cvsroot=":pserver:user@cecvs02dv:c:/cvs/dev/" password="password"/> 
    <cvs cvsroot="c:/cvs/dev" quiet="false"   
        command="checkout" package="IRM" port="2401"  
            dest="D:/vinu/workspace/Maven/testirm"  />

                        </tasks>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.apache.ant</groupId>
                    <artifactId>ant-jsch</artifactId>
                    <version>1.9.4</version>
                </dependency>
            </dependencies>
        </plugin>

错误: [cvs] cvs [checkout aborted]:c:/ cvs / dev / CVSROOT:没有这样的文件或目录

CVSROOT文件夹存在于CVS服务器上的c:/ cvs / dev /中。

1 个答案:

答案 0 :(得分:0)

最后问题得到解决。

将目录从 c:/ cvs / dev / 更改为 c:\ cvs \ dev

<cvspass cvsRoot=":pserver:username@cecvs02dv:c:\cvs\dev" password="password"/> 
<cvs cvsRoot=":pserver:username@cecvs02dv:c:\cvs\dev" package="IRM" 
dest="." port="2401" failonerror="true"/>