- This topic has 9 replies, 2 voices, and was last updated 18 years, 7 months ago by Riyad Kalla.
-
AuthorPosts
-
mituMemberI 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.
Riyad KallaMemberMoving 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.
mituMemberBut 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????
Riyad KallaMemberFirst you need to figure out where this file is going. Is the project under source control? If so, what kind?
mituMemberYes, 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 ???
Riyad KallaMemberAfter 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.
mituMemberI 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.
Riyad KallaMemberI 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.
mituMemberNow 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.
Riyad KallaMemberI’m glad to hear it’s working now.
-
AuthorPosts