[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [platform-ant-dev] Problem with AntRunner...
|
Hi Darin,
Thanks for your fast answer. I'm working with build Eclipse 2.1 build
200210150832.
I thought I could call the AntRunner from outside a plugin but this is
apparently not the case. Adding the ant core plugin dependency to my
plugin and running the snippet from within the plugin works!
Thanks a lot
-Vincent
> -----Original Message-----
> From: platform-ant-dev-admin@xxxxxxxxxxx [mailto:platform-ant-dev-
> admin@xxxxxxxxxxx] On Behalf Of Darin Swanson
> Sent: 23 October 2002 13:51
> To: platform-ant-dev@xxxxxxxxxxx
> Subject: Re: [platform-ant-dev] Problem with AntRunner...
>
>
> Vincent,
>
> I can't reproduce your problem...but you did not tell me what build
you
> are
> working on?
>
> I created a plugin (using the PDE Plugin development project wizard;
> Hello,
> world sample).
> I then set that plugin to require the Ant Core plugin. In the
> SampleAction#run method I pasted your code.
> Worked fine when I invoked the action.
>
> Does you plugin specify that it requires the Ant Core plugin?
>
> Ant Core plugin is not deprecated...external tools and ant are just
trying
> to work
> together to provide the "best" for all
>
> Darins
>
>
> |---------+---------------------------------->
> | | "Vincent Massol" |
> | | <vmassol@xxxxxxxx> |
> | | Sent by: |
> | | platform-ant-dev-admin@|
> | | eclipse.org |
> | | |
> | | |
> | | 10/23/02 07:05 AM |
> | | Please respond to |
> | | platform-ant-dev |
> | | |
> |---------+---------------------------------->
>
>-----------------------------------------------------------------------
> ---------------------------------|
> |
> |
> | To: <platform-ant-dev@xxxxxxxxxxx>
> |
> | cc: <jru@xxxxxxxx>
> |
> | Subject: [platform-ant-dev] Problem with AntRunner...
> |
>
>-----------------------------------------------------------------------
> ---------------------------------|
>
>
>
> Hi,
>
> I'd like to execute an Ant script programmatically from a plugin I am
> writing. I have followed the online documentation and here is my code
> snippet:
>
> AntRunner runner = new AntRunner();
> runner.setBuildFileLocation(
> "path/to/build.xml");
> runner.setArguments("-Dmessage=Building
> -verbose");
> try {
> runner.run();
> }
> catch (Exception e) {
> e.printStackTrace();
> }
>
> When I run it I get a NPE. Debugging shows that the NPE comes from the
> following line in AntRunner:
>
> ClassLoader loader = AntCorePlugin.getPlugin().getClassLoader();
>
> The problem is that AntCorePlugin.getPlugin() returns null, which
seems
> to mean that the AntCorePlugin was not initialized in the workbench.
>
> I can see an "Ant Build Tool Core" in the list of loaded plugins? Is
> that this one? One many Ant plugins are there? Does it have to do with
> the fact that Ant was moved to be an external tool? If so, does it
mean
> the AntCorePlugin is now deprecated? If so, how can I now call an Ant
> script programatically?
>
> Thanks a lot!
> -Vincent
>
>
>
> _______________________________________________
> platform-ant-dev mailing list
> platform-ant-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-ant-dev
>
>
>
>
> _______________________________________________
> platform-ant-dev mailing list
> platform-ant-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-ant-dev