It looks like your problem has to do with the path you are giving to the
ss.exe file. Try using the DOS formatted path, i.e.
d:\progra~1\micros~1\common\vss\win32, also you may want to try / instead
of \ in that path.. I'm not sure what adding -compile to the command line
does. Is the other target called asi-compile or is it just called asi?
-- Kevin
At 12:57 PM 4/17/2001 -0400, you wrote:
>If you mean the target "getcode" in which I use "vssget" task, I already
>posted it in my previous message. Anyway, I am going to post it here again.
>Just let me know if this part of the code is enough ...
>
><target name="getcode">
> <echo message="getting latest code from the Source Safe..."/>
> <vssget vsspath="$/assetplanner/Engineering/dev/java"
> login="pbicioglu, ist34"
> writable="true"
> localpath="D:/sandbox/Engineering/dev/java"
> recursive="true"
> ssdir="D:\ProgramFiles\MicrosoftVisualStudio\VSS\win32" />
></target>
>
>When I write "ant asi-compile" (asi is another target in my build.xml"
>file), it works fine. And if I write "ant getcode-compile", it says this
>doesn't exist in the project. And if I say
>"ant getcode" it prints the following error message.
>
>D:\sandbox\Engineering\dev\java>ant getcode
>Buildfile: build.xml
>
>getcode:
> [echo] getting latest code from the Source Safe...
>
>BUILD FAILED
>
>D:\sandbox\Engineering\dev\java\build.xml:44: java.io.IOException:
>CreateProcess: D:\Progr
>amFiles\MicrosoftVisualStudio\VSS\win32\ss Get
>$/assetplanner/Engineering/dev/java -GLD:\s
>andbox\Engineering\dev\java -I- -R -W "-Ypbicioglu, ist34" error=3
>--- Nested Exception ---
>java.io.IOException: CreateProcess:
>D:\ProgramFiles\MicrosoftVisualStudio\VSS\win32\ss Get
> $/assetplanner/Engineering/dev/java -GLD:\sandbox\Engineering\dev\java -I-
>-R -W "-Ypbici
>oglu, ist34" error=3
> at java.lang.Win32Process.create(Native Method)
> at java.lang.Win32Process.<init>(Win32Process.java:64)
> at java.lang.Runtime.execInternal(Native Method)
> at java.lang.Runtime.exec(Runtime.java:272)
> at
>org.apache.tools.ant.taskdefs.Execute$CommandLauncher.exec(Execute.java:435)
> at
>org.apache.tools.ant.taskdefs.Execute$CommandLauncherProxy.exec(Execute.java
>:55
>0)
> at
>org.apache.tools.ant.taskdefs.Execute$WinNTCommandLauncher.exec(Execute.java
>:57
>5)
> at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:329)
> at
>org.apache.tools.ant.taskdefs.optional.vss.MSVSS.run(MSVSS.java:160)
> at
>org.apache.tools.ant.taskdefs.optional.vss.MSVSSGET.execute(MSVSSGET.java:16
>8)
> at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
> at org.apache.tools.ant.Project.runTarget(Project.java:898)
> at org.apache.tools.ant.Project.executeTarget(Project.java, Compiled
>Code)
> at org.apache.tools.ant.Project.executeTargets(Project.java,
>Compiled Code)
> at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
> at org.apache.tools.ant.Main.main(Main.java:149)
>
>Total time: 2 seconds
>
>So what is the difference writing between "ant targetname-compile" and "ant
>targetname" ??
>
>Thanks a lot!
>
>-----Original Message-----
>From: Kevin Cummings [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 17, 2001 12:54 PM
>To: [EMAIL PROTECTED]
>Subject: RE: pulling out the code from SourceSafe
>
>
>Can you post the target you are trying to run so we can take a look at it..
>
>At 12:37 PM 4/17/2001 -0400, you wrote:
> >now I get the same error message I pasted below, when I write "ant
> >getcode" in the DOS prompt.
> >-----Original Message-----
> >From: Pinar Bicioglu [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, April 17, 2001 12:13 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >and when I write "ant getcode-compile", it says;
> >
> >"target "getcode-compile" does not exist in this project
> >-----Original Message-----
> >From: Peterson, Lance [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, April 17, 2001 11:51 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Pinar,
> >
> >You usually have two SourceSafe databases: there's a default database that
> >is intalled with your client software, that's the one in
> >D:\ProgramFiles\MicrosoftVisualStudio\VSS. There's also your *real*
> >SourceSafe database, I belive that's the one at
> ><file://\\JILLIANS\VSS-SERVER\>\\JILLIANS\VSS-SERVER\. Where are you
> >storing your projects? I would expect you're storing them in the network
> >database on <file://\\JILLIANS>\\JILLIANS. If so, you should set your
> >SSDIR environment variable to
> ><file://\\JILLIANS\VSS-SERVER>\\JILLIANS\VSS-SERVER. You can do this from
> >the System control panel (if you're on Win32), or you can set it from a
> >batch file. I usually work with just one SourceSafe database, so I
> >permanently set SSDIR in my System control panel.
> >
> >Also, please remember that the ssdir attribute in the VssGet task is NOT
> >the same as the SSDIR enviornment variable described above. VssGet's
> >ssdir attribute is the path to SS.EXE, NOT the path to your
> >srcsafe.ini. Therefore while the SSDIR environment variable probably
> >points to <file://\\JILLIANS\VSS-SERVER>\\JILLIANS\VSS-SERVER, the ssdir
> >attribute points to D:\Program Files\Microsoft Visual Studio\VSS (or
> >wherever you've installed it).
> >
> >Best Regards,
> >Lance Peterson
> >-----Original Message-----
> >From: Pinar Bicioglu [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, April 17, 2001 9:16 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >
> >-----Original Message-----
> >From: Peterson, Lance [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, April 16, 2001 4:10 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Dana, it sounds like the SSDIR environment var is not set up
> >correctly. Go to a command prompt and type set SSDIR. It will probably
> >report that SSDIR has not been set, or that it's currently set to
> >something like "c:\program files\microsoft visual studio\common\vss". If
> >it's either of those two, run the following command:
> >
> >set SSDIR=<file://\\FTCOLLINS_D\VSS\COMDev>\\FTCOLLINS_D\VSS\COMDev
> >[Pinar Bicioglu]
> >Is this what is suppose to be included in the srcsafe.ini file. Because in
> >my srcsafe file there is this following line.
> >
> ><file://\\JILLIANS\VSS-SERVER\SRCSAFE.INI>#include set
> >ssdir=\\JILLIANS\VSS-SERVER\SRCSAFE.INI
> >
> >To tell you the truth after reading all of these messages this morning, i
> >got confused. I can't seem to set the ssdir env variable correctly. I am
> >not even sure that I know what it is suppose to be set ??
> >
> >
> >
> >You should verify that your srcsafe.ini file is in that directory. If it
> >is, try executing "SS dir" at a command prompt, it should print a listing
> >of the root SourceSafe project. If that works, then the VssGet task
> >should also work.
> >[Pinar Bicioglu]
> >my srcsafe.ini file is in D:\ProgramFiles\MicrosoftVisualStudio\VSS. But
> >it is no the same as above ??
> >
> >
> >And BTW, like Kevin I often exec SS.EXE directly in my Ant scripts as
> >well. But as long as you can get SS.EXE running from the command line,
> >you should be able to run it from your Ant script as well.
> >[Pinar Bicioglu]
> >Do you mean running env.bat file before every build?
> >
> >thanks
> >-----Original Message-----
> >From: Dana Rice [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, April 16, 2001 2:00 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Lance,
> >thanks for the clarification. The problem I seem to be having is that I
> >have two databases. One is an apparent default one which has the path of
> >the ss executable on my machine. The other is the database I want which is
> >on another machine. I can't get vssget to look at the remote machine, it
> >only finds the default database.
> >-----Original Message-----
> >From: Peterson, Lance [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, April 16, 2001 1:57 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Dana, there are actually two SSDIR variables: There is an environment
> >variable that points to the directory with srcsafe.ini (e.g.
> >"\\Ftcollins\FTCOLLINS_D\VSS\COMDev"), and there is VssGet attribute which
> >is the path to the SourceSafe client program (e.g. "c:\program
> >files\microsoft visual studio\common\vss"). They are NOT the same, but
> >that's okay since task attributes in Ant do not collide with OS env
> >variables. You just have to remember which is which.
> >Ant itself does not actually rely on the SSDIR environment
> >variable. SS.EXE uses the env variable to find the correct
> >srcsafe.ini. The VssGet task, on the other hand, uses the ssdir attribute
> >to find SS.EXE.
> >BTW, you don't have to set the SSDIR environment variable in a batch
> >file. You can set it permanently in the System control panel. This works
> >great if you're only using one SourceSafe database (as I am). If you use
> >more than one SS database, then you can use a batch file to set SSDIR to
> >the appropriate database for each project.
> >Best regards,
> >Lance Peterson
> >
> >-----Original Message-----
> >From: Dana Rice [<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Monday, April 16, 2001 1:44 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Shannon, still struggling with getting ant to look at correct database.
>When
> >you set the env.bat with ssdir and then ssdir also is used as the path for
> >the executable in vssget, how is this consistent/resolved? Is there away of
> >echoing or finding out what ssdir is set to.
> >Dana
> >
> >-----Original Message-----
> >From: Shannon Wagner
> >[<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Friday, April 13, 2001 11:36 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >What's the error that you are getting?
> >
> >Have you tried also specifying the "login" attribute within the <vssget>
> >call? I think you need it.
> >
> >Does the account under which Ant is running have sufficient rights to
> >\\Ftcollins\FTCOLLINS_D\VSS\COMDev?
> >
> >-----Original Message-----
> >From: Dana Rice [<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Friday, April 13, 2001 1:27 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Shannon, I appreciate the help. What I see in VSS explorer above the right
> >pane is $/agent/dca3.2.
> >The env.bat looks like:
> >set ssdir=\\Ftcollins\FTCOLLINS_D\VSS\COMDev
> >And FTCOLLINS is one of my network places.
> >
> ><target name="getcode">
> > <vssget localpath="C:/dca3.2test"
> > recursive="true"
> > vsspath="$/agent/dca3.2"
> > writable="true"
> > ssdir="C:/Program Files/Microsoft Visual
>Studio/Common/VSS/win32"/>
> ><echo message="getcode"/>
> > </target>
> >
> >-----Original Message-----
> >From: Shannon Wagner
> >[<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Friday, April 13, 2001 11:18 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Sorry - I don't know why executing ss.exe brings you into "help".
> >
> >Yes, we are running "setenv.bat" to set the ssdir variable before each
> >build.
> >
> >As for the error you are getting...
> >
> >[vssget] $/path/to/project/in/vss is not an existing filename or project.
> >
> >"$/path/to/project/in/vss" needs to be replaced by the VSS path to a
> >project. For example, you might have a project in VSS like
> >"$/Java/Applets/Calculator". This is the complete path that you would see
> >above the right pane if you were browsing to the project using the VSS
> >explorer.
> >
> >Why don't you reply with the exact code which you are using, so that I can
> >see it?
> >
> >-----Original Message-----
> >From: Dana Rice [<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Friday, April 13, 2001 1:05 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >OK, I wasn't sure because when I execute ss.exe I get into "help". Do you
> >run you env.bat just before the ant build? I think this is still my
>problem.
> >I get this:
> >[vssget] $/path/to/project/in/vss is not an existing filename or project.
> >
> >Is \\SERVER\path\to\vss_database
> >explicitly what is mapped onto your pc?
> >
> >-----Original Message-----
> >From: Shannon Wagner
> >[<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Friday, April 13, 2001 10:48 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >It should be executing ss.exe, since this is the command line version of
>the
> >application. ssexp.exe is just a GUI front-end.
> >
> >-----Original Message-----
> >From: Dana Rice [<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Friday, April 13, 2001 12:40 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Thanks Shannon, I'm closer but still not there. Am I wrong in observing
>that
> >vssget tries to execute ss.exe? Should it not be ssexp.exe?
> >
> >-----Original Message-----
> >From: Shannon Wagner
> >[<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Friday, April 13, 2001 9:49 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Dana,
> >
> >We're using code similar to the following:
> >
> >...
> >rem setenv.bat - This part runs in a batch script.
> >rem
> >rem You seem to need to have this environment variable
> >rem set in order for VSS to find the database.
> >set ssdir=\\SERVER\path\to\vss_database
> >
> >...
> ><!-- build.xml -->
> ><!-- Note that VSS calls everything a project, not a folder. -->
> ><vssget localpath="c:\path\to\local\vss\working\folder"
> > login="vss_user,vss_password"
> > vsspath="$/path/to/project/in/vss"
> > ssdir="c:\path\to\vss\executable"
> > recursive="true"/>
> >
> >-----Original Message-----
> >From: Dana Rice [<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Friday, April 13, 2001 11:24 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >Thanks for the explanation. I'm having a problem with my vsspath. Part of
> >the problem is that VSS is on another computer on our network but I still
> >should be able to get to if I use the correct path statement. What is
>vssget
> >looking for? The notes make reference to a project, I usually just get the
> >latest version, do I have to create a project for vssget to work?
> >-----Original Message-----
> >From: Peterson, Lance
> >[<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, April 12, 2001 4:48 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >
> >MSVSSGET is the name of the class that implements the vssget task. (The
> >full name is org.apache.tools.ant.taskdefs.optional.vss.MSVSSGET.)
> >Defaults.properties (in src/org/apache/tools/ant/taskdefs) maps MSVSSGET to
> >vssget.
> >-----Original Message-----
> >From: Dana Rice [<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, April 12, 2001 4:41 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: pulling out the code from SourceSafe
> >why when you get a listing of the optional.jar there is no vssget but there
> >is a MSVSSGET?