Run Ant in Eclipse

zhaozj2021-02-16  84

Ant support has been built in Eclipse. Create a build.xml in Project, double-click Eclipse, open editing with ANTEDITOR. Right click on build.xml, run ant, you can set the calling parameters, run the directory, run the target, class path, attribute, etc. in the dialog box.

After setting it, Run is OK. The output result can be seen in the output window, and the output result is linked to the editor. For example, you can locate the corresponding delete task in the Ant Editor. After running once, the run setting is saved in Run> External Tools, and then running RUN.

ANT settings

There are many ANT configuration parameters in Window> Preferences> Ant.

One is "names", specifies what XML file opens with Ant Editor, what kind of file is opened with a general XML Editor. The default is "build.xml", which can be set to separate the name, such as "build.xml", "dist.xml", etc.

If you need to use an external task (see "Ant Advanced Features: Use External Task"), you need to set the ClassPath at the ANT runtime:

Use the Add Jars or Add Folder to point to the dependent external class library.

转载请注明原文地址:https://www.9cbs.com/read-13876.html

New Post(0)