facebook

Ant Builder

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #251861 Reply

    mitu
    Member

    I am trying to add Ant Builder to one of my projects. I have added Ant Builder to some of my other projects successfully. Listed below are the steps I follow:
    1. Right click on Project name->Properties.
    2. Click on Builders in the properties window.
    3. Click New->Select Ant Build.
    4. Give a name to the builder.
    5. Under “Main” tab:
    a. For Buildfile: Use “Browse Workspace” to go the projects build file.
    b. For Base Directory: Use “Browse Workspace” to go the project’s folder.
    c. Check “Set an input handler”
    6. Under “Refresh” tab:
    a. Check “Refresh resources upon completion”.
    b. Select “Project containing the selected resource”.
    c. Check “Recursively include sub-folders”.
    7. Under “Targets” tab:
    a. For all the four set targets, set it to the default target in the projects build file.
    8. Under “Classpath” tab:
    a. Click “User Entries”
    b. Click “Add Jars” to add the jar files that are in the project/WebRoot/WEB-INF/lib. Click “Add External Jars” to add the jar files from outside the project.
    9. Under “JRE” tab:
    a. Select “Run in the same JRE as the workspace”.
    These steps add the Ant builder and execute build.xml. But when i go back to the properties sometimes the Builders show it as” Invalid external Tool”. Other times the “.externalToolBuilders” folder is automatically removed from my project workspace. So the Ant build that I added is also removed from the Properties->Builders window.
    What am I doing wrong? How come the same steps work fine for other projects? Do I need to change any other settings for the project?

    Help is appreciated.

    #251868 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    This might be a source control issue, when you refresh your project or update it, source control may not recognize the .externalToolBuilders file and remove it.

    #251899 Reply

    mitu
    Member

    But how can I fix this problem? Is there any settings that I can do so that it is not deleted or I do not get the “Invalid external tool builder” error????

    #251900 Reply

    Riyad Kalla
    Member

    First you need to figure out where this file is going. Is the project under source control? If so, what kind?

    #251901 Reply

    mitu
    Member

    Yes, I am using Perforce as source control. But I do not see the file anywhere on perforce. I have no idea if the file is being moved or being deleted. how can I find this ???

    #251907 Reply

    Riyad Kalla
    Member

    After creating the file, switch to your Navigator view, and see if you can see it. Then right click on the file and check it into source control.

    #251931 Reply

    mitu
    Member

    I checked the .launch file in perforce. I can see the externalToolBuilders and the launch file in Navigator. But I cannot see the builder in Project->Properties->Builders. It has been removed. So if I make a change in any java file, no build is executed as it cannot find the builder.

    #251936 Reply

    Riyad Kalla
    Member

    I believe the .project file gets changed when you add/remove a builder. After adding the builder, make sure to check the .project file in. What might be happening is it might be changing then Perforce might be overwriting it with the non-builder version from source control.

    #251954 Reply

    mitu
    Member

    Now my Builder works fine. One of the problem was that my .project was “Read Only” so nothing about the New builder was added to it. I also followed your instruction to checkin the .project file and the .launch file in Perforce.

    Thanks for all your help.

    #251957 Reply

    Riyad Kalla
    Member

    I’m glad to hear it’s working now.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Ant Builder

You must be logged in to post in the forum log in