You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Lieve Van den Heuvel <lv...@vangenechten.com> on 2005/01/28 11:17:35 UTC

CVS command with Ant in IntelliJ

Hi,

I'm just new to the mailing list but I'm experiencing a very
"frustrating" problem.  I've written a buildscript for our project but
I'm not able to execute a cvs-command in the buildfile.

The environment I'm working in:
Ant: 1.6.2
CVSNT (from winCVS -> latest stable version)
Idea IntelliJ 4.5.3

When I try to execute the target at the command line, everyting works
perfectly.  The error I get is:

Caught exception: CreateProcess: cvs
-d:pserver:lvandenheuvel@sdd-devel.priv.vangenechten.com:/nasdata/CVS
update -d -l ids/java error=2

I know what the exception means, he can't find the cvs.exe.  I already
tried to set it as an additional path for the ant execution -> didn't
work, I also
tried to run a command file before the execution, setting the path ->
didn't work, so now I'm pretty much out of ideas to figure out what is
going wrong.

Does anybody have any idea what could cause this problem?

I would be very very thankful for your answer!

This is a part of the build file:
<!-- The build.properties files contains the cvs.repository property
-->
<property file="conf/build.properties"/>
<property name="cvs.package.dependencies" value="ids/java/lib"/>
<property name="cvs.package.conf" value="ids/java/conf"/>

<target name="set.environment">
        <exec dir="${basedir}/${conf.dir}" executable="cmd.exe">
            <arg value="/c setenv.cmd"/>
        </exec>
</target>


<target name="dependencies" depends="set.environment"
description="Update the external libraries that are used from CVS">
        <cvs command="update -d" cvsroot="${cvs.repository}"
package="${cvs.package.dependencies}" dest="."/>
        <cvs command="update -d" cvsroot="${cvs.repository}"
package="${cvs.package.conf}" dest="."/>
        <cvs command="update -d -l" cvsroot="${cvs.repository}"
package="ids/java" dest="."/>
</target>

Greetz
Lieve


Re: CVS command with Ant in IntelliJ

Posted by James Abley <ja...@volantis.com>.
On Fri, 2005-01-28 at 10:17, Lieve Van den Heuvel wrote:
> Hi,
> 
> I'm just new to the mailing list but I'm experiencing a very
> "frustrating" problem.  I've written a buildscript for our project but
> I'm not able to execute a cvs-command in the buildfile.
> 
> The environment I'm working in:
> Ant: 1.6.2
> CVSNT (from winCVS -> latest stable version)
> Idea IntelliJ 4.5.3
> 
> When I try to execute the target at the command line, everyting works
> perfectly.  The error I get is:
> 
> Caught exception: CreateProcess: cvs
> -d:pserver:lvandenheuvel@sdd-devel.priv.vangenechten.com:/nasdata/CVS
> update -d -l ids/java error=2
> 
> I know what the exception means, he can't find the cvs.exe.  I already
> tried to set it as an additional path for the ant execution -> didn't
> work, I also
> tried to run a command file before the execution, setting the path ->
> didn't work, so now I'm pretty much out of ideas to figure out what is
> going wrong.
> 
> Does anybody have any idea what could cause this problem?
> 
exec causes a new instance of your shell to run, and sets up environment
variables for that instance, hence any changes aren't persisted when the
exec task ends.

Is there a particular reason you can't add the location of the cvs
executable to the system PATH or user PATH, as suggested in 

http://ant.apache.org/manual/CoreTasks/cvs.html

> I would be very very thankful for your answer!
> 
> This is a part of the build file:
> <!-- The build.properties files contains the cvs.repository property
> -->
> <property file="conf/build.properties"/>
> <property name="cvs.package.dependencies" value="ids/java/lib"/>
> <property name="cvs.package.conf" value="ids/java/conf"/>
> 
> <target name="set.environment">
>         <exec dir="${basedir}/${conf.dir}" executable="cmd.exe">
>             <arg value="/c setenv.cmd"/>
>         </exec>
> </target>
> 
> 
> <target name="dependencies" depends="set.environment"
> description="Update the external libraries that are used from CVS">
>         <cvs command="update -d" cvsroot="${cvs.repository}"
> package="${cvs.package.dependencies}" dest="."/>
>         <cvs command="update -d" cvsroot="${cvs.repository}"
> package="${cvs.package.conf}" dest="."/>
>         <cvs command="update -d -l" cvsroot="${cvs.repository}"
> package="ids/java" dest="."/>
> </target>
> 
> Greetz
> Lieve
> 
> 
> ______________________________________________________________________
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org