ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Gimler <>
Subject Re: custom task question
Date Fri, 08 Apr 2005 18:47:25 GMT
Sorry, sent that one too soon.

Continuing... from there I'm trying to get access to the java runtime
inside of the task specified to my custom task, unixscriptgen. 
Instead I get access to an UnknownElement which I can then try and
call the getTask() method on.  It returns null unless I first call a
maybeConfigure() on it.  Then I can cast it to a Java task but the
classpath isn't filled.

Any ideas or should I attack this differently?



On Apr 8, 2005 2:43 PM, Greg Gimler <> wrote:
> Hello,
> I'm trying to generate a unix shell script from an ant task.  The ant
> task is just a simple java execution and I want to generate the unix
> shell script for deployment purposes.  Is there a way to do this
> easily?  I've tried to write a custom task and I'm having a difficult
> time getting all of the information I need.  For example I have the
> following snippet...
> <target name="generate-scripts" description="Generates the appropriate
> shell scripts from ant runtimes.">
> <taskdef name="unixscriptgen" classname="task.UnixScriptGenerator"
> classpathref=""/>
>                 <unixscriptgen target="stupidjava" file=""/>
>         </target>
>         <target name="stupidjava" description="blah">
>                 <java classname="nonexistantclass">
>                         <classpath refid=""/>
>                 </java>
>         </target>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message