Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Ant builder questions
Ant builder questions [message #299555] Mon, 20 February 2006 10:31 Go to next message
Eclipse UserFriend
Originally posted by: alexey.kalmykoff.gmail.com

As far as I understand Ant Builder isn't an incremental builder like standard java builder. It's an external builder.

I know how to add an incremental builders to a project (using ICommand), but I have no idea how to add Ant Builder to a project from the code (at runtime)? What should I do?

Any help would be greatly appreciated!
Re: Ant builder questions [message #299578 is a reply to message #299555] Mon, 20 February 2006 13:19 Go to previous messageGo to next message
Eclipse UserFriend
Ant builders are added using ICommands as well.

For example:
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name >
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/JEdit.launch </value>
</dictionary>
</arguments>
</buildCommand>

Add a builder and view the .project file to verify yourself.

The Eclipse code that does the addition of the builder to the project
description can be found in
org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage

HTH
Darins

"Alexey_K" <alexey.kalmykoff@gmail.com> wrote in message
news:12353613.1140449640849.JavaMail.root@cp1.javalobby.org...
> As far as I understand Ant Builder isn't an incremental builder like
> standard java builder. It's an external builder.
>
> I know how to add an incremental builders to a project (using ICommand),
> but I have no idea how to add Ant Builder to a project from the code (at
> runtime)? What should I do?
>
> Any help would be greatly appreciated!
Re: Ant builder questions [message #299629 is a reply to message #299578] Tue, 21 February 2006 08:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexey.kalmykoff.gmail.com

Thanks for help!

Now I've faced another problem. I have 2 builders on a project:

1) Ant builder
2) Java builder.

Ant builder generates source codes for java builder to compile. But it's seems to me that actual Ant build runs in separate thread, rather than Java builder. As a result: java builder start before Ant has finished code generation! How can make ant and java builders to be executed in a sequence (first ant builder, after ant finishes - java builder)?

PS: One solution is to have my own builder which will invoke AntRunner. That will solve the problem, but I want to reuse Ant console output.

Best regards, Alex.
Re: Ant builder questions [message #299640 is a reply to message #299629] Tue, 21 February 2006 10:19 Go to previous messageGo to next message
Eclipse UserFriend
Have you set your Ant builder to run in the foreground (and not the
background)?
Running the builder in the foreground or not forked should be the default.

HTH
Darins

"Alexey_K" <alexey.kalmykoff@gmail.com> wrote in message
news:29457647.1140529339289.JavaMail.root@cp1.javalobby.org...
> Thanks for help!
>
> Now I've faced another problem. I have 2 builders on a project:
>
> 1) Ant builder
> 2) Java builder.
>
> Ant builder generates source codes for java builder to compile. But it's
> seems to me that actual Ant build runs in separate thread, rather than
> Java builder. As a result: java builder start before Ant has finished code
> generation! How can make ant and java builders to be executed in a
> sequence (first ant builder, after ant finishes - java builder)?
>
> PS: One solution is to have my own builder which will invoke AntRunner.
> That will solve the problem, but I want to reuse Ant console output.
>
> Best regards, Alex.
Re: Ant builder questions [message #299647 is a reply to message #299640] Tue, 21 February 2006 11:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexey.kalmykoff.gmail.com

I've checked - "Launch in background" flag is not set. The only option that I use if "Refresh after build" (set to "Workspace").

Let me describe the case:

I create a project by my own wizard. After user clicks "Finish" I create project (some folders, some files), set up natures (java nature and my own), and immediately run project build. I display standard long-running operation dialog to show build progress. This dialog closes earlier (!) than Ant build finishes: the build goes on, build messages appears in console.

May be I just misunderstand something? Any clues?

Thanks in advance!
Re: Ant builder questions [message #299654 is a reply to message #299647] Tue, 21 February 2006 12:57 Go to previous messageGo to next message
Eclipse UserFriend
Ensure that you have:
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND"
value="false"/>

"Alexey_K" <alexey.kalmykoff@gmail.com> wrote in message
news:4010409.1140539871370.JavaMail.root@cp1.javalobby.org...
> I've checked - "Launch in background" flag is not set. The only option
that I use if "Refresh after build" (set to "Workspace").
>
> Let me describe the case:
>
> I create a project by my own wizard. After user clicks "Finish" I create
project (some folders, some files), set up natures (java nature and my own),
and immediately run project build. I display standard long-running operation
dialog to show build progress. This dialog closes earlier (!) than Ant build
finishes: the build goes on, build messages appears in console.
>
> May be I just misunderstand something? Any clues?
>
> Thanks in advance!
Re: Ant builder questions [message #299882 is a reply to message #299654] Mon, 27 February 2006 11:30 Go to previous message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

Thanks! If define explicitly "run in background" as "false" it works ok. But I think It's a very strange behavior. Thanks once again!
Previous Topic:Packaging win32 exe's in a plugin fragment
Next Topic:How to get a IType from a class name ?
Goto Forum:
  


Current Time: Thu Jul 24 07:30:26 EDT 2025

Powered by FUDForum. Page generated in 0.06138 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top