You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "J.D. Fagan" <jf...@us.dhl.com> on 2001/05/03 03:20:58 UTC

Ant 1.4 -- failonerror attributes?

Unfortunately, I'm stuck on a VSS based project at the moment :-(  And I'm
trying to build a target that depends on a VSS checkout.

How can I ignore an error from vsscheckout and continue on?  My error
sometimes occur when I already have a file checked out, and thus, just want
to ignore this error and continue on.  I think I might be asking for the
"failonerror" capability of javac task?  Anyone have any insight?

JD


Re: Ant 1.4 -- failonerror attributes?

Posted by Nico Seessle <ni...@apache.org>.
----- Original Message -----
From: "Diane Holt" <ho...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Thursday, May 03, 2001 3:30 AM
Subject: Re: Ant 1.4 -- failonerror attributes?


> I don't use (thankfully :) VSS, but the doc suggests that if you have
> autoResponse="Y" it will overwrite already checked-out files. Have you
> tried that?
>

Even if he does... it was an invalid assumption I wrote down and forgot to
remove after realizing that it is *not* working that way. VSS is returning
errorlevel's (exit-codes) of >0 if something like this (or any other error
happens). It is currently not possible to avoid Ant to fail if that happens.

Documentation is fixed now.

Nico



Re: Ant 1.4 -- failonerror attributes?

Posted by Nico Seessle <ni...@apache.org>.
----- Original Message -----
From: "Diane Holt" <ho...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Friday, May 04, 2001 12:48 AM
Subject: RE: Ant 1.4 -- failonerror attributes?


> --- "J.D. Fagan" <jf...@us.dhl.com> wrote:
> > I was under the impression that chmod was a UNIX only task.  Or so it
> > states in the documentation.  Does it work for Windows?
>
> Oh right -- sorry. I forgot we were dealing with VSS, which means dealing
> with Windows. Do you work in DOS, or do you have a shell you work from? If
> the latter, you could use <exec>.
>

Writable or not writable is not the problem. Checkout wth VSS does *not*
mean the same as checkout with cvs. A checkout is comparable with the
edit-command and changes the file to writable. You do a checkout before you
start to change some files. The "thing" that would (could) produce read-only
files is get (that one is comparable with the checkout from cvs), but one
could use 'writable="yes"' to avoid that.

The problem is that ss.exe returns with exit-codes != 0 if there is some
file already checked out and you try to check it out again. Even if it's on
the same machine with the same user and the file is not changed.
Unfortunately the exit-codes are just "100" for "some error or warning
occured" and "1" for "a fatal error occured" so there is no (secure) way to
avoid that.

Nico



RE: Ant 1.4 -- failonerror attributes?

Posted by Diane Holt <ho...@yahoo.com>.
--- "J.D. Fagan" <jf...@us.dhl.com> wrote:
> This is too messy...just
> gonna drop it and move onto other more important issues (like convincing
> management that VSS sucks).

Good plan! There's a little write-up done that could help out at:
  http://public.perforce.com/guest/joan_yuen/scmevaluation.html

Try picking up an eval of Perforce -- you'll have p4 running in five
minutes, and there's a VSS->p4 conversion tool that's available from the
guest depot. See:
http://maillist.perforce.com/pipermail/perforce-user/1999-December/003387.html

Good luck,
Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

RE: Ant 1.4 -- failonerror attributes?

Posted by "J.D. Fagan" <jf...@us.dhl.com>.
Yeah, I see where you're going -- and I was thinking the same thing.
Unfortunately, not even a manual deletion of the files and re-request of a
checkout corrects my issue.  VSS stubornly holds onto the notion that I have
the files checked out still and won't re-checkout.  This is too messy...just
gonna drop it and move onto other more important issues (like convincing
management that VSS sucks).

JD

> -----Original Message-----
> From: Diane Holt [mailto:holtdl@yahoo.com]
> Sent: Thursday, May 03, 2001 3:48 PM
> To: ant-user@jakarta.apache.org
> Subject: RE: Ant 1.4 -- failonerror attributes?
>
>
> --- "J.D. Fagan" <jf...@us.dhl.com> wrote:
> > I was under the impression that chmod was a UNIX only task.  Or so it
> > states in the documentation.  Does it work for Windows?
>
> Oh right -- sorry. I forgot we were dealing with VSS, which means dealing
> with Windows. Do you work in DOS, or do you have a shell you work from? If
> the latter, you could use <exec>.
>
> Diane
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>


RE: Ant 1.4 -- failonerror attributes?

Posted by Diane Holt <ho...@yahoo.com>.
--- "J.D. Fagan" <jf...@us.dhl.com> wrote:
> I was under the impression that chmod was a UNIX only task.  Or so it
> states in the documentation.  Does it work for Windows?

Oh right -- sorry. I forgot we were dealing with VSS, which means dealing
with Windows. Do you work in DOS, or do you have a shell you work from? If
the latter, you could use <exec>.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

RE: Ant 1.4 -- failonerror attributes?

Posted by "J.D. Fagan" <jf...@us.dhl.com>.
I was under the impression that chmod was a UNIX only task.  Or so it states
in the documentation.  Does it work for Windows?

JD

> -----Original Message-----
> From: Diane Holt [mailto:holtdl@yahoo.com]
> Sent: Thursday, May 03, 2001 2:58 PM
> To: ant-user@jakarta.apache.org
> Subject: RE: Ant 1.4 -- failonerror attributes?
>
>
> --- "J.D. Fagan" <jf...@us.dhl.com> wrote:
> > Yep, already tried the autoResponse set to "Y".  Below is my vsscheckout
> > task and resulting errors I get.  I guess according to Nico's reply, I
> > can't
> > avoid this situation.  Guess I could check to see on a per file basis if
> > they are writable first before trying to check them out...
>
> Do you want the writable ones overwritten? If you do, you could just
> <chmod> all the files read-only, instead, before you do the check-out.
>
> Diane
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>


RE: Ant 1.4 -- failonerror attributes?

Posted by Diane Holt <ho...@yahoo.com>.
--- "J.D. Fagan" <jf...@us.dhl.com> wrote:
> Yep, already tried the autoResponse set to "Y".  Below is my vsscheckout
> task and resulting errors I get.  I guess according to Nico's reply, I
> can't
> avoid this situation.  Guess I could check to see on a per file basis if
> they are writable first before trying to check them out...

Do you want the writable ones overwritten? If you do, you could just
<chmod> all the files read-only, instead, before you do the check-out.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

RE: Ant 1.4 -- failonerror attributes?

Posted by "J.D. Fagan" <jf...@us.dhl.com>.
Yep, already tried the autoResponse set to "Y".  Below is my vsscheckout
task and resulting errors I get.  I guess according to Nico's reply, I can't
avoid this situation.  Guess I could check to see on a per file basis if
they are writable first before trying to check them out...

-----Snippet of my build.xml--------

  <target name="checkout-library">
    <echo message="Checking out lib directory..."/>
    <vsscheckout vsspath="/Shipping eServices/lib"
        localpath="./lib"
        recursive="true"
        login="${vss.username},${vss.password}"
        autoResponse="Y"/>
  </target>

  <target name="library" depends="checkout-library">
    <echo message="Getting latest libraries..."/>
    <echo message="ant.real.home=${ant.real.home}"/>
    <echo message="regexp.home=${regexp.home}"/>
    <echo message="jdom.home=${jdom.home}"/>
    <echo message="validation.home=${validation.home}"/>
    <echo message="wl.home=${wl.home}"/>

    <copy todir="${basedir}/lib">
      <fileset dir="${ant.real.home}/lib" includes="*.jar"/>
      <fileset dir="${regexp.home}" includes="*.jar"/>
      <fileset dir="${jdom.home}/build" includes="jdom.jar"/>
      <fileset dir="${validation.home}/build" includes="validation.jar"/>
      <fileset dir="${wl.home}/lib" includes="weblogic*.jar"/>

      <!-- See if Crimson can be used instead of Xerces.  JDOM execution
            should be real test
      <fileset dir="${jdom.home}" includes="xerces.jar"/>
      -->
    </copy>
  </target>

-----Result-----

>ant library
Buildfile: build.xml

checkout-library:
     [echo] Checking out lib directory...
[vsscheckout] $/Shipping eServices/lib:
[vsscheckout]
[vsscheckout] You currently have file $/Shipping eServices/lib/ant.jar
checked o
ut.
[vsscheckout] You currently have file $/Shipping eServices/lib/crimson.jar
check
ed out.
[vsscheckout] You currently have file $/Shipping
eServices/lib/jakarta-ant-1.4al
pha-optional.jar checked out.
[vsscheckout] You currently have file $/Shipping
eServices/lib/jakarta-regexp-1.
2.jar checked out.
[vsscheckout] You currently have file $/Shipping eServices/lib/jaxp.jar
checked
out.
[vsscheckout] You currently have file $/Shipping eServices/lib/jdom.jar
checked
out.
[vsscheckout] You currently have file $/Shipping eServices/lib/README
checked ou
t.
[vsscheckout] You currently have file $/Shipping
eServices/lib/validation.jar ch
ecked out.
[vsscheckout] You currently have file $/Shipping eServices/lib/weblogic.jar
chec
ked out.

BUILD FAILED

C:\data\jd\repositories\dhl\eservices\build.xml:360: Failed executing: ss
Checko
ut "$/Shipping
eServices/lib" -GLC:\data\jd\repositories\dhl\eservices\lib -I-Y
-R -Yjfagan,jordan23

Total time: 0 seconds


> -----Original Message-----
> From: Diane Holt [mailto:holtdl@yahoo.com]
> Sent: Wednesday, May 02, 2001 6:31 PM
> To: ant-user@jakarta.apache.org
> Subject: Re: Ant 1.4 -- failonerror attributes?
>
>
> I don't use (thankfully :) VSS, but the doc suggests that if you have
> autoResponse="Y" it will overwrite already checked-out files. Have you
> tried that?
>
> Diane
>
> --- "J.D. Fagan" <jf...@us.dhl.com> wrote:
> > Unfortunately, I'm stuck on a VSS based project at the moment :-(  And
> > I'm
> > trying to build a target that depends on a VSS checkout.
> >
> > How can I ignore an error from vsscheckout and continue on?  My error
> > sometimes occur when I already have a file checked out, and thus, just
> > want
> > to ignore this error and continue on.  I think I might be asking for the
> > "failonerror" capability of javac task?  Anyone have any insight?
> >
> > JD
> >
>
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>


Re: Ant 1.4 -- failonerror attributes?

Posted by Diane Holt <ho...@yahoo.com>.
I don't use (thankfully :) VSS, but the doc suggests that if you have
autoResponse="Y" it will overwrite already checked-out files. Have you
tried that?

Diane

--- "J.D. Fagan" <jf...@us.dhl.com> wrote:
> Unfortunately, I'm stuck on a VSS based project at the moment :-(  And
> I'm
> trying to build a target that depends on a VSS checkout.
> 
> How can I ignore an error from vsscheckout and continue on?  My error
> sometimes occur when I already have a file checked out, and thus, just
> want
> to ignore this error and continue on.  I think I might be asking for the
> "failonerror" capability of javac task?  Anyone have any insight?
> 
> JD
> 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/