CVS Checkout using MAVEN ANT plugin

▼魔方 西西 提交于 2019-12-13 21:37:31

问题


I am looking for following things.

How to checkout code from CVS using MAVEN ANT plugin

My CVS server name:cecvs02dv which can be accessed using user name and password (and cannot be accessed over HTTP)

CVS folder: c:\cvs\dev

Module name: IRM

I can connect to CVS using below CVS command from Windows command prompt.

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

Using above command I am able to checkout the code from CVS server.

pom.xml:: ANT Maven plugin

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

Error: [cvs] cvs [checkout aborted]: c:/cvs/dev/CVSROOT: No such file or directory

CVSROOT folder exists in c:/cvs/dev/ on CVS server.


回答1:


Finally the issue is resolved.

Changed the directory from c:/cvs/dev/ to 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"/>


来源:https://stackoverflow.com/questions/31146481/cvs-checkout-using-maven-ant-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!