Results 1 to 3 of 3
  1. #1
    subhashish is offline Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    0

    Default ANT builder at workspace level

    Hi,
    I use ANT builders for projects in a workspace. This works well and the corresponding ANT targets get invoked when I do a save, clean etc.

    Is it possible however to associate an ANT builder with the workspace so that a "build all" invokes that builder and not individual project ANT builders sequentially? I have a project called "Build" and on "Build all" would like to invoke a target from "Build/build.xml".


    Thanks,
    Subhashish

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    I think you can create an entry in a target within the build.xml within one of the projects, (where you want to have the workspace level ant invoked), to do an <ant>
    Java Code:
      <!-- in the build.xml in one of your projects -->
      <target name="workspaceBuild">
        <ant basedir="${basedir}/.." file="build.xml" target="the_target" inheritAll="false"/>
      </target>
    Just make sure this workspace level ant file does not end up invoking this workspaceBuild target; that would create an infinite loop of ant calls right.

  3. #3
    subhashish is offline Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    0

    Default

    Actually what I want is to invoke a workspace build (which in my case means invoking a target called build from build.xml of a project called "Build") when I press CTRL+B. Basically I want to override eclipse's behaviour of building all projects in the workspace and let my custom target take over. What you suggested would have worked if Eclipse only built all the projects as available in "Window -> Preferences->General->Workspace->Build order". In that case I could have just put an entry for the "Build" project there and things would have worked. Eclipse doesn't do that however and also builds projects not available in that list after the ones in the list are built.

Similar Threads

  1. Builder
    By AgentApe in forum New To Java
    Replies: 4
    Last Post: 12-02-2009, 09:33 PM
  2. Formula Builder
    By rbs100 in forum Advanced Java
    Replies: 1
    Last Post: 07-03-2009, 06:57 PM
  3. [SOLVED] Class-level vs Object-level method()
    By mfaizan24 in forum New To Java
    Replies: 7
    Last Post: 06-23-2009, 09:18 AM
  4. Eclipse GUI Builder
    By elebal in forum Eclipse
    Replies: 1
    Last Post: 10-23-2008, 11:38 AM
  5. Smilehouse Workspace 1.8.3
    By Jamie in forum Java Software
    Replies: 0
    Last Post: 06-14-2007, 02:53 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •