ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: creating -projecthelp default help target
Date Tue, 26 Jul 2005 06:42:41 GMT
Have a look at http://issues.apache.org/bugzilla/show_bug.cgi?id=14941

Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Ivan Ivanov [mailto:rambiusparkisanius@yahoo.com] 
>Gesendet: Dienstag, 26. Juli 2005 01:52
>An: Ant Users List
>Betreff: RE: creating -projecthelp default help target
>
>Dewey,
>
>I think you should *not* set ant.library.dir property.
>I am using Ant 1.6.5/WinXP and executing following snippet on 
>my machine  
>
><echoproperties prefix="ant"/>
>
>dumps ant.library.dir (plus some others of course), so I think 
>it is a built-in one. If for some reason it is not set on your 
>environment you can replace it with ${ant.home}/lib.
>
>HTH Ivan
>
>--- "Dewey, John" <jdewey@rsasecurity.com> wrote:
>
>> Thanks,
>> Your java task worked, after I setup the ant.library.dir variable.
>> I'm running it on WinXP so I suspect that your analysis of the error 
>> was correct, but since the java task is cross platform I 
>agree that it 
>> is the better way to go. Thanks again.
>> 
>> 
>> 
>> -----Original Message-----
>> From: Ivan Ivanov
>> [mailto:rambiusparkisanius@yahoo.com]
>> Sent: Monday, July 25, 2005 4:12 PM
>> To: Ant Users List
>> Subject: Re: creating -projecthelp default help target
>> 
>> Hello Dewey,
>> 
>> What is the operating system you are using. If it is 
>windows, error=2 
>> usually means that windows is not able to find the 
>executable, i.e. it 
>> is not in the classpath. Also bear in mind that the usual 
>way of using 
>> <exec> on windows is like this:
>> <exec dir="....." executable="cmd.exe"
>>     os="Windows 2000,Windows XP">
>>     <arg line="/c ant -projecthelp"/>
>> </exec>
>> and it is described fully in <exec> docs[1].
>> 
>> Since you are invoking it in ant build script, then ${ant.home} is 
>> already set, so that you can also provide the absolute path to ant 
>> launching script:
>> <arg line="/c ${ant.home}/bin/ant -projecthelp"/>
>> 
>> I have done this before and I would recommend you to use <java> task 
>> (written by memories and not tested)
>> :
>> <java classname="org.apache.tools.ant.Main">
>>   <arg value="-projecthelp"/>
>>   <classpath>
>>     <pathelement
>> location="${ant.library.dir}/ant.jar"/>
>>   </classpath>
>> </java>
>> 
>> HTH Ivan
>> 
>> [1]http://ant.apache.org/manual/CoreTasks/exec.html
>> 
>> --- "Dewey, John" <jdewey@rsasecurity.com> wrote:
>> 
>> > Hi I'm trying to get ant help to printout a small message and then 
>> > the ant -projecthelp  listing, but I keep getting the following 
>> > error:
>> > C:\Documents and
>> > Settings\jdewey\Desktop\zz\build.xml:11: Execute
>> > failed: java.io.IOException: CreateProcess: ant 
>-projecthelp error=2
>> > 
>> > Any ideas?
>> > 
>> > The build file I am using follows:
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > 
>> > <project name="helpTest" default="help"
>> basedir=".">
>> > 
>> > <target name="help" description="lets people know about 
>> > -projecthelp">
>> >   <echo>
>> >   ***************** usage *****************
>> >   Blah blah blah
>> >   </echo>
>> >   <echo>-projecthelp prints the custom menu for
>> this
>> > build file</echo>
>> >   <exec executable="ant">
>> >     <arg value="-projecthelp"/>
>> >   </exec>
>> > </target>
>> > 
>> > </project>
>> > 
>> > 
>> > The version of ant I am using is:
>> > Apache Ant version 1.6.5 compiled on June 2 2005
>> 
>>
>---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> user-unsubscribe@ant.apache.org
>> For additional commands, e-mail:
>> user-help@ant.apache.org
>> 
>> 
>
>
>
>		
>____________________________________________________
>Start your day with Yahoo! - make it your home page 
>http://www.yahoo.com/r/hs 
> 
>
>---------------------------------------------------------------------
>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
View raw message