You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Melissa Marquis <mm...@empactsolutions.com> on 2003/05/06 22:21:11 UTC

RE: cvs problem - characters around the executableandargumentsarenot part of command

When I run from the command line it works: 

mmarquis@EMPDEV04 /cygdrive/c/home/mmarquis/tmp2/eyeq

$ cvs -d:pserver:mmarquis@dcvshost1:/home/empcvs update -P
? err.txt
? build/docs
? build/dist
? build/tests
? build/reports
? build/lib
? build/web
? build/WEB-INF
? build/classes
? dist/eyeq2_c4.jar
? dist/eyeq2_c5.jar
? dist/eyeq2_c11.jar
? dist/eyeq2_c12.jar
? docs/compliance_engine/com
? docs/compliance_engine/packages.html
? docs/compliance_engine/overview-frame.html
? docs/compliance_engine/overview-summary.html
? docs/compliance_engine/index.html
? docs/compliance_engine/package-list
? docs/compliance_engine/overview-tree.html
? docs/compliance_engine/help-doc.html
? docs/compliance_engine/serialized-form.html
? docs/compliance_engine/index-all.html
? docs/compliance_engine/allclasses-frame.html
? docs/compliance_engine/stylesheet.css
? docs/compliance_engine/deprecated-list.html
? etc/manifest-core.mf
? logs/build.stats
? logs/EyeQ2 Build-20030505-log.txt
? logs/EyeQ2 Build-20030506-log.txt
cvs server: Updating .
M build.properties
M build.xml
cvs server: Updating build
cvs server: Updating dist
cvs server: Updating docs
cvs server: Updating docs/compliance_engine
cvs server: Updating etc
cvs server: Updating logs
cvs server: Updating src
cvs server: Updating src/compliance_engine
cvs server: Updating src/compliance_engine/com
cvs server: Updating src/compliance_engine/com/empactsolutions
cvs server: Updating src/compliance_engine/com/empactsolutions/db
cvs server: Updating src/compliance_engine/com/empactsolutions/eyeq
cvs server: Updating src/compliance_engine/com/empactsolutions/eyeq/ce
cvs server: Updating src/compliance_engine/com/empactsolutions/eyeq/ce/core
cvs server: Updating src/compliance_engine/com/empactsolutions/eyeq/ce/core/form
ula
cvs server: Updating src/compliance_engine/com/empactsolutions/eyeq/ce/core/form
ula/dvs
cvs server: Updating src/compliance_engine/com/empactsolutions/eyeq/ce/core/form
ula/ovs
cvs server: Updating src/compliance_engine/com/empactsolutions/eyeq/ce/matcheven
t
cvs server: Updating src/compliance_engine/com/empactsolutions/eyeq/participant
cvs server: Updating src/compliance_engine/com/empactsolutions/eyeq/security
cvs server: Updating src/compliance_engine/database
cvs server: Updating src/compliance_engine/testing



>> I tried the target and added the passfile attribute and got: <<

$ ant fetch -verbose
Apache Ant version 1.5.2 compiled on February 28 2003
Buildfile: build.xml
Detected Java version: 1.3 in: c:\jdk1.3.1_07\jre
Detected OS: Windows 2000
parsing buildfile build.xml with URI = file:c:/home/mmarquis/tmp2/eyeq/build.xml

Project base dir set to: C:\home\mmarquis\tmp2\eyeq
Build sequence for target `fetch' is [init, startrecorder, prepare, fetch]
Complete build sequence is [init, startrecorder, prepare, fetch, build-web, buil
d-all, build-stats-core, war, deploy-tom, compile-core, test-core, docs-web, und
eploy-tom, prepare-core-manifest, jar, clean, check-out-all, build-cvs, compile-
web, compile-all, ear, release-web, release-all, build-core, build-stats-web, pr
epare-web-manifest, release-core, docs-core, build-stats-all, prepare-all-manife
st, stoprecorder, cvs-login, test-web, test-all]

init:
Override ignored for property name

startrecorder:

prepare:

fetch:
      [cvs] Using cvs passfile: C:\Home\PersonalFolders\M Marquis\.cvspass

      [cvs] Executing 'cvs' with arguments:
      [cvs] '-d:pserver:mmarquis@dcvshost1:/home/empcvs'
      [cvs] 'update'
      [cvs] '-P'
      [cvs]
      [cvs] The ' characters around the executable and arguments are
      [cvs] not part of the command.
      [cvs]
      [cvs]
      [cvs] environment:
      [cvs]
      [cvs]     ALLUSERSPROFILE=C:\Documents and Settings\All Users
      [cvs]     ANT_HOME=c:\apache-ant-1.5.2
      [cvs]     APPDATA=C:\Documents and Settings\mmarquis\Application Data
      [cvs]     CLASSPATH=.;c:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;c:\PROGRA~1\
IBM\SQLLIB\java\db2jcc.jar;c:\PROGRA~1\IBM\SQLLIB\bin;c:\PROGRA~1\IBM\SQLLIB\too
ls\db2XTrigger.jar;c:\PROGRA~1\IBM\SQLLIB\java\common.jar;c:\junit3.8.1\junit.ja
r;c:\home\mmarquis\development\eq_2.0\compliance_engine\;c:\xalan-j_2_5_0\bin;c:
\grinder-3.0-beta8\lib\grinder.jar
      [cvs]     COMMONPROGRAMFILES=C:\Program Files\Common Files
      [cvs]     COMPUTERNAME=EMPDEV04
      [cvs]     COMSPEC=C:\WINNT\system32\cmd.exe
      [cvs]     CVSROOT=:pserver:mmarquis@dcvshost1:/home/empcvs
      [cvs]     CVS_RSH=/bin/ssh
      [cvs]     DB2INSTANCE=DB2
      [cvs]     DB2TEMPDIR=C:\PROGRA~1\IBM\SQLLIB\
      [cvs]     EYEQ=c:\home\mmarquis\development\eq_2.0\compliance_engine\
      [cvs]     GRINDER=C:\grinder-3.0-beta8
      [cvs]     HOME=c:\Home\PersonalFolders\M Marquis
      [cvs]     HOMEDRIVE=C:
      [cvs]     HOMEPATH=\Home\PersonalFolders\M Marquis
      [cvs]     HOMESHARE=\\192.168.10.24\D$
      [cvs]     HOSTNAME=EMPDEV04
      [cvs]     INCLUDE=C:\PROGRA~1\IBM\SQLLIB\INCLUDE;C:\PROGRA~1\IBM\SQLLIB\LI
B
      [cvs]     JAVA_HOME=c:\jdk1.3.1_07
      [cvs]     LIB=C:\PROGRA~1\IBM\SQLLIB\LIB
      [cvs]     LOGONSERVER=\\OPS3
      [cvs]     MAKE_MODE=unix
      [cvs]     MANPATH=:/usr/ssl/man
      [cvs]     NUMBER_OF_PROCESSORS=1
      [cvs]     OLDPWD=/cygdrive/c/home/mmarquis/tmp2
      [cvs]     OS2LIBPATH=C:\WINNT\system32\os2\dll;
      [cvs]     OS=Windows_NT
      [cvs]     PATH=C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\cygwin\bin;c:\WINN
T\system32;c:\WINNT;c:\WINNT\System32\Wbem;C:\cygwin\bin;c:\jdk1.3.1_07\bin;c:\a
pache-ant-1.5.2\bin;c:\Program Files\Rational\common;c:\Program Files\Rational\R
ose\TopLink\;c:\PROGRA~1\IBM\SQLLIB\BIN;c:\PROGRA~1\IBM\SQLLIB\FUNCTION;c:\IBM\W
ebSphere\AppServer\bin;c:\jdk1.3.1_07\bin;c:\xmlviewer
      [cvs]     PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
      [cvs]     PROCESSOR_ARCHITECTURE=x86
      [cvs]     PROCESSOR_IDENTIFIER=x86 Family 15 Model 1 Stepping 2, GenuineIn
tel
      [cvs]     PROCESSOR_LEVEL=15
      [cvs]     PROCESSOR_REVISION=0102
      [cvs]     PROGRAMFILES=C:\Program Files
      [cvs]     PROMPT=$P$G
      [cvs]     PS1=\[\033]0;\w\007
      [cvs] \033[32m\]\u@\h \[\033[33m\w\033[0m\]
      [cvs] $
      [cvs]     PWD=/cygdrive/c/home/mmarquis/tmp2/eyeq
      [cvs]     SHLVL=1
      [cvs]     SYSTEMDRIVE=C:
      [cvs]     SYSTEMROOT=C:\WINNT
      [cvs]     TEMP=c:\DOCUME~1\mmarquis\LOCALS~1\Temp
      [cvs]     TERM=cygwin
      [cvs]     TMP=c:\DOCUME~1\mmarquis\LOCALS~1\Temp
      [cvs]     USER=mmarquis
      [cvs]     USERDNSDOMAIN=corp.empact.com
      [cvs]     USERDOMAIN=CORP
      [cvs]     USERNAME=mmarquis
      [cvs]     USERPROFILE=C:\Documents and Settings\mmarquis
      [cvs]     VWSPATH=C:\PROGRA~1\IBM\SQLLIB
      [cvs]     VWS_LOGGING=C:\PROGRA~1\IBM\SQLLIB\LOGGING
      [cvs]     VWS_TEMPLATES=C:\PROGRA~1\IBM\SQLLIB\TEMPLATES
      [cvs]     WINDIR=C:\WINNT
      [cvs]     XALAN=C:\xalan-j_2_5_0
      [cvs]     _=/cygdrive/c/apache-ant-1.5.2/bin/ant
      [cvs]     CVS_PASSFILE=C:\Home\PersonalFolders\M Marquis\.cvspass
      [cvs] cvs update: authorization failed: server dcvshost1 rejected access t
o /home/empcvs for user mmarquis

BUILD SUCCESSFUL
Total time: 1 second

Then, interestingly enough, I tried running the same command I did at the beginning right after this failed: 



mmarquis@EMPDEV04 /cygdrive/c/home/mmarquis/tmp2/eyeq
$ cvs -d:pserver:mmarquis@dcvshost1:/home/empcvs update -P
cvs update: authorization failed: server dcvshost1 rejected access to /home/empc
vs for user mmarquis

It seems I'm not authenticated anymore and/or do not have a valid session with CVS.  So I run:
mmarquis@EMPDEV04 /cygdrive/c/home/mmarquis/tmp2/eyeq
$ cvs login
(Logging in to mmarquis@dcvshost1)
CVS password:


And then run the cvs -d:pserver ... command again and it works. 

Any ideas?  I'm not sure what is going on - I'm going to see if the repository keeps a log I can look at. 

Thanks, 
Melissa
 



















-----Original Message-----
From: Jesse Stockall [mailto:stockall@magma.ca]
Sent: Tuesday, May 06, 2003 3:30 PM
To: Ant Users List
Subject: RE: cvs problem - characters around the
executableandargumentsarenot part of command


On Tue, 2003-05-06 at 15:14, Melissa Marquis wrote:
> Also,  when I run ant with verbose to see what is going on in either scenario (with cvs-login target and without), I see: 
> 
> [cvs] Executing 'cvs' with arguments:
> [cvs] '-d:pserver:mmarquis@dcvshost1:/home/empcvs'
> [cvs] 'update'
> [cvs] '-P'
> [cvs]
> [cvs] The ' characters around the executable and arguments are
> [cvs] not part of the command.
> 
> 

That's Ant telling you exactly what it is using as it's command line.

If you run 'cvs -d:pserver:mmarquis@dcvshost1:/home/empcvs update -P'
from the command line, with out logging in first, does it work?

Does your ~/.cvspass contain an entry for dcvshost1?

Does it help if you specify 'passfile=c:\Home\PersonalFolders\M
Marquis\.cvspass' in your <cvs> target


-- 
Jesse Stockall <st...@magma.ca>


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


Re: Tar and exec problem

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 7 May 2003, Praveen Shenoy <ps...@aol.com> wrote:
>   <target name="all" depends="copy_files">
>              <exec dir="${build.root}/deploy/shopping" 
> executable="/bin/sh" failonerror="true" >
>              <arg line="tar -cvf ../../ship/package/fedeploy.tar *">
>              </arg>
>          </exec>

This would rather be

   <exec dir="${build.root}/deploy/shopping" 
         executable="/bin/sh" failonerror="true">
       <arg value="-c"/>
       <arg value="tar -cvf ../../ship/package/fedeploy.tar *"/>
   </exec>

You must tell the shell to execute the following stuff as command
(that's the -c) and the rest must be a single argument (that's why I
changed the line attribute to value).

BTW, you could use <apply> instead of <exec>, not use wildcards at all
and let Ant find the files for you.

  <apply executable="tar" dir="${build.root}/deploy/shopping"
         parallel="true" relative="true" failonerror="true">
     <arg value="-cvf">
     <arg file="${build.root}/ship/package/fedeploy.tar"/>
     <srcfile/>

     <fileset dir="${build.root}/deploy/shopping"
              includes="*"/>
  </apply>

should be exactly the same as the <exec> above but without using the
shell to expand the wildcard.

Stefan

Re: Tar and exec problem

Posted by Praveen Shenoy <ps...@aol.com>.
  <target name="all" depends="copy_files">
             <exec dir="${build.root}/deploy/shopping" 
executable="/bin/sh" failonerror="true" >
             <arg line="tar -cvf ../../ship/package/fedeploy.tar *">
             </arg>
         </exec>

didn't work. output below.

[exec] tar: /bin/tar: cannot execute binary file

Praveen

Conor MacNeill wrote:

 > On Thu, 8 May 2003 07:41 am, Praveen Shenoy wrote:
 > > I am using the exec task to run tar as we cannot use tar directly.
 > > Running tar directly, replaces all the file permissions. So, this is
 > how
 > > I am using it
 > >
 > > <target name="all" depends="copy_files">
 > >          <exec dir="${build.root}/deploy" executable="tar"
 > > failonerror="true" >
 > >              <arg line="-cvf ../sometar.tar *" />
 > >          </exec>
 > >          <delete dir="${build.root}/deploy" />
 > >      </target>
 > >
 > > It fails with
 > >
 > > [exec] /bin/tar: *: Cannot stat: No such file or directory
 > > [exec] /bin/tar: Error exit delayed from previous errors
 > >
 > > It doesn't like th "*" after the tar name. If I change it to a specific
 > > directory instead of "*" it works fine. Is there a problem using "*"?
 > >
 >
 > Wildcard expansion is performed by the shell. When you exec a command
 > from
 > Ant, the shell is not directly involved so no wildcard expansion is
 > performed. Instead of executing tar, you can execute /bin/sh and pass the
 > complete tar command as the args
 >
 > Conor
 >
 >
 > ---------------------------------------------------------------------
 > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
 > For additional commands, e-mail: user-help@ant.apache.org
 >



Re: Tar and exec problem

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
On Thu, 8 May 2003 07:41 am, Praveen Shenoy wrote:
> I am using the exec task to run tar as we cannot use tar directly.
> Running tar directly, replaces all the file permissions. So, this is how
> I am using it
>
> <target name="all" depends="copy_files">
>          <exec dir="${build.root}/deploy" executable="tar"
> failonerror="true" >
>              <arg line="-cvf ../sometar.tar *" />
>          </exec>
>          <delete dir="${build.root}/deploy" />
>      </target>
>
> It fails with
>
> [exec] /bin/tar: *: Cannot stat: No such file or directory
> [exec] /bin/tar: Error exit delayed from previous errors
>
> It doesn't like th "*" after the tar name. If I change it to a specific
> directory instead of "*" it works fine. Is there a problem using "*"?
>

Wildcard expansion is performed by the shell. When you exec a command from 
Ant, the shell is not directly involved so no wildcard expansion is 
performed. Instead of executing tar, you can execute /bin/sh and pass the 
complete tar command as the args

Conor


Re: Tar and exec problem

Posted by Bill Burton <bi...@progress.com>.
Hello,

Below ...

Praveen Shenoy wrote:
> I am using the exec task to run tar as we cannot use tar directly. 
> Running tar directly, replaces all the file permissions. So, this is how 
> I am using it
> 
> <target name="all" depends="copy_files">
>          <exec dir="${build.root}/deploy" executable="tar" 
> failonerror="true" >
>              <arg line="-cvf ../sometar.tar *" />
>          </exec>
>          <delete dir="${build.root}/deploy" />
>      </target>
> 
> It fails with
> 
> [exec] /bin/tar: *: Cannot stat: No such file or directory
> [exec] /bin/tar: Error exit delayed from previous errors
> 
> It doesn't like th "*" after the tar name. If I change it to a specific 
> directory instead of "*" it works fine. Is there a problem using "*"?

As Conor mentioned, * is expanded by the shell.  So use . instead to 
refer to the current directory.

-Bill


Tar and exec problem

Posted by Praveen Shenoy <ps...@aol.com>.
I am using the exec task to run tar as we cannot use tar directly. 
Running tar directly, replaces all the file permissions. So, this is how 
I am using it

<target name="all" depends="copy_files">
         <exec dir="${build.root}/deploy" executable="tar" 
failonerror="true" >
             <arg line="-cvf ../sometar.tar *" />
         </exec>
         <delete dir="${build.root}/deploy" />
     </target>

It fails with

[exec] /bin/tar: *: Cannot stat: No such file or directory
[exec] /bin/tar: Error exit delayed from previous errors

It doesn't like th "*" after the tar name. If I change it to a specific 
directory instead of "*" it works fine. Is there a problem using "*"?

Praveen


RE: cvs problem - characters around the executableandargumentsarenot part of command

Posted by Hiron <hi...@metapa.net>.
Hi All,

I am facing a similar problem too. The cvspass command used to work for
me. But now it does not after I changed my machine. 
Heres the cvs pass command I am using
<target name="loginCvs" >
    <cvspass cvsroot="${cvsroot}" password="${cvspass}"/>
  </target>
But when I run the build it says empty password and try cvs login
I do cvs login from command prompt and then run the build and everything
goes fine.

Any clues???
Something to do with environment, OS???

Thanks in advance 

Hiron



-----Original Message-----
From: Conor MacNeill [mailto:conor@cortexebusiness.com.au] 
Sent: Tuesday, May 06, 2003 9:02 PM
To: Ant Users List
Subject: Re: cvs problem - characters around the
executableandargumentsarenot part of command

> Any ideas?  I'm not sure what is going on - I'm going to see if the
> repository keeps a log I can look at.
>
> Thanks,
> Melissa
>

I would say the <cvspass> task is corrupting your password.

Try this. Login from the command line 
cvs login

Comment out the <cvspass> task and run the <cvs> update. I expect this
to 
work.

If that works, you may want to check the <cvspass> command.

Conor


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


Re: cvs problem - characters around the executableandargumentsarenot part of command

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
> Any ideas?  I'm not sure what is going on - I'm going to see if the
> repository keeps a log I can look at.
>
> Thanks,
> Melissa
>

I would say the <cvspass> task is corrupting your password.

Try this. Login from the command line 
cvs login

Comment out the <cvspass> task and run the <cvs> update. I expect this to 
work.

If that works, you may want to check the <cvspass> command.

Conor