When you use the Java Project With Existing Ant Script project template, the New Project wizard enables you to map specific build targets to IDE commands, including the following:
You can also use the Project Properties dialog box (Build and Run page) to map targets to these commands. Other commands (such as Debug Project, Compile File, Run File, Debug File, and Apply Code Changes) need to have targets created for them and then be mapped in the project.xml file if you want them to work in the IDE. If you let the IDE generate an Ant target for a command, the IDE handles this mapping automatically. In NetBeans IDE 5.0, the IDE offers to generate targets for the Debug Project and Compile File commands the first time you run those commands. In future versions of the IDE, target generation will be offered for other commands as well. See Table 16-1 for a list of commands that you can map to your build script. The IDE Action column gives the code name for the command that you use when mapping a build target to the command.
The next several topics provide examples of how to create Ant targets for specific commands and then map them to the IDE. The IDE comes bundled with XML schemas for the project.xml file and auto-matically validates them every time you edit and save them. If you make invalid changes to a project.xml file, the IDE reports the errors in the Output window. If you would like to inspect the schemas yourself, you can view them online. See Table 16-2 for a list of the schemas used.
|