ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Is it possible to change System PATH variable through ant tas k ?
Date Tue, 04 May 2004 05:36:00 GMT
There are a couple of "general" solutions
- provide an "executable" attribute where you specify the full path
- provide a nested <path> where you would search
  <path><pathelement path="${env.PATH}"><pathelement
path="additional/dir"/></path>
- modify the PATH variable outside of Ant. 
  For this use the %HOME%\antrc_pre.bat  and  %HOME%\antrc_post.bat


Jan


> -----Original Message-----
> From: sudip barat [mailto:sbarat@cisco.com]
> Sent: Tuesday, May 04, 2004 12:17 AM
> To: 'Ant Users List'
> Subject: RE: Is it possible to change System PATH variable through ant
> tas k ?
> 
> 
> 
> 
> I don't think there is a generic solution in any where you can add a
> directory to the system path and that is the precide reason 
> we need to hack
> the ant for specific tasks to look for specific exeuctable or 
> directories 
> -----Original Message-----
> From: s b [mailto:sbix650@hotmail.com] 
> Sent: Monday, May 03, 2004 2:37 PM
> To: user@ant.apache.org
> Subject: Re: Is it possible to change System PATH variable 
> through ant tas k
> ?
> 
> 
> Hi
> 
> Is there a general solution to this problem?
> 
> We need to add a directory to the PATH environment variable.  
> Since my 
> problem is not related to CVS, this solution won't work.
> 
> Thanks,
> sb
> 
> 
> >From: Atsushi SUGAWARA <asugawar@f3.dion.ne.jp>
> >Reply-To: "Ant Users List" <user@ant.apache.org>
> >To: "Ant Users List" <user@ant.apache.org>
> >Subject: Re: Is it possible to change System PATH variable 
> through ant 
> >tas
> >k ?
> >Date: Fri, 30 Apr 2004 14:24:16 +0900
> >
> >Hi.
> >I created a small patch.
> >
> >patch to AbstractCvsTask.java
> >---------------------------------------------------------------------
> >151a152,154
> > >     private static final String DEFAULT_EXECUTABLE = "cvs";
> > >     private String executable;
> > >
> >449a453,465
> > >     public void setExecutable(String executable) {
> > >         if (executable != null) {
> > >             if (executable.trim().equals("")) {
> > >                 executable = null;
> > >             }
> > >         }
> > >         this.executable = executable;
> > >     }
> > >
> > >     public String getExecutable() {
> > >         return this.executable;
> > >     }
> > >
> >744c760,764
> ><         c.setExecutable("cvs");
> >---
> > >         if (executable == null) {
> > >             c.setExecutable(DEFAULT_EXECUTABLE);
> > >         } else {
> > >             c.setExecutable(executable);
> > >         }
> >---------------------------------------------------------------------
> >
> >Now, you can use a attribute "executable" in <cvs> task.
> >like this:
> >
> >   <cvs
> >     cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
> >     package="ant"
> >     command="checkout"
> >     executable="path/to/cvs"
> >   />
> >
> >--
> >Atsushi SUGAWARA <asugawar@f3.dion.ne.jp>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >For additional commands, e-mail: user-help@ant.apache.org
> >
> 
> _________________________________________________________________
> Watch LIVE baseball games on your computer with MLB.TV, 
> included with MSN 
> Premium! 
> http://join.msn.com/?page=features/mlb&pgmarket=en-us/go/onm00
200439ave/dire
ct/01/


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message