Ant tool in Eclipse

We can install JRE and Ant standalone in our operation system and configure the Ant command avaiable in the command line.For a specific project, we change the directory to the location where build.xml or build.properties is located in the command line, then use ant command to run the targets and tasks defined in the build file (build.xml). Ant may support other formats of build file, you can check this on the apache ant officel site.

Ant toll is also integrated into Eclipse Platform in the plug-in manner. Eclipse Ant plug-in is designed to bring the power of Ant and Eclipse together. By this plugin, we can execute the build  file from eclipse and eclipse supports both UI for Ant build files and output and build file development facility.

In details, Eclipse Ant plug-in makes use of Ant preferences, views, editors and commands to achieve those supports. Let me explore them one by one.

Ant Preference:


      
            
      
      
            
      
In the plugin.properties file, find thoese entry sets:

PreferencePage.antPreferences = Ant
PreferencePage.antRuntimePreferences = Runtime
AntPreferencePage class takes FieldEditorPreferencePage as its super class and implements IWorkbenchPrefencePage interface.

public class AntPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
}
Create AntPrefencePage by its construtor

/**
 	 * Create the Ant page.
     */
	public AntPreferencePage() {
		super(GRID);
		setDescription(AntPreferencesMessages.AntPreferencePage_General);
		setPreferenceStore(AntUIPlugin.getDefault().getPreferenceStore());
	}
For detailed explanation, please refer to wiki from http://eclipsepluginsite.com/preference-pages.html



你可能感兴趣的:(Java,ant,ANT,Ant,eclipse,Eclipse,plug-in)