< Day Day Up > |
Recipe 7.4 Using a Different Build File7.4.1 ProblemYou want to build your project using an XML build file not named build.xml. 7.4.2 SolutionJust select Window Preferences Ant and enter the name(s) of your build file(s). Then click OK. 7.4.3 DiscussionIf you need to change the name of your build file from build.xml to something else, select Window Preferences Ant, opening the Ant Preferences page shown in Figure 7-10. Just enter the name of your build file, and click OK. If you want to list multiple names, separate them with commas (use only one of these build files per project, or else Eclipse will be confused, and you'll get an error). Note that this is a global change, so if you change the build filename here, it'll be changed for all projects. Figure 7-10. Setting the build filename
Note that you also can configure Ant a little in the Window Preferences Ant dialog, but not much. This dialog allows you to select only the colors of Ant messages in the Console view, which isn't very impressive. More Ant configuration options are available by selecting the nodes under the Ant item; see the following few recipes for more details. 7.4.3.1 Eclipse 3.0Eclipse 3.0 adds a little to the Window Preferences Ant dialog, which enables you to handle some additional warnings and errors, such as when the Ant classpath doesn't include tools.jar, as shown in Figure 7-11. Figure 7-11. The Window Preferences Ant dialog in Eclipse 3.07.4.4 See AlsoRecipe 7.5 on using your own version of Ant and on setting Ant's classpath; Chapter 5 of Eclipse (O'Reilly). |
< Day Day Up > |