简体   繁体   English

如何在Eclipse中使用Ant源?

[英]How to use Ant sources with Eclipse?

my question relates to the Ant libs and source included with various Eclipse distributions. 我的问题与各种Eclipse发行版中包含的Ant库和源有关。 eg 例如

eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145 and eclipse/plugins/org.apache.ant.source_1.7.1.v20090120-1145.jar eclipse / plugins / org.apache.ant_1.7.1.v20090120-1145eclipse / plugins / org.apache.ant.source_1.7.1.v20090120-1145.jar

How can I associate these together? 如何将它们关联在一起? What I'd like to do is set a breakpoint in the Ant Javac task, so I can confirm precisely which arguments are being passed to it. 我想做的是在Ant Javac任务中设置一个断点,这样我就可以精确地确定将哪些参数传递给它。 (This is proving very difficult to analyse from the build.xml itself due to a complicated structure with lots of imports and taskdefs). (由于具有大量导入和taskdef的复杂结构,从build.xml本身进行分析非常困难)。

I can see no way to associate them within Preferences/Ant, and when adding the jar to my Ant launcher's classpath it seems to just ignore my breakpoints in it, no matter even if I put it higher on the classpath than "Ant Home (Default)" itself. 我看不到将它们关联到Preferences / Ant中的任何方法,将jar添加到我的Ant启动器的类路径中时,它似乎只是忽略了其中的断点,即使我将其放在类路径上的位置也比“ Ant Home(默认”本身。

I'm presumably missing something obvious, your answers are much appreciated. 我想可能遗漏了一些明显的内容,非常感谢您的回答。

You can configure your Run Configuration. 您可以配置运行配置。 Go to Run -> Run Configurations... -> Source tab, and press Add button. 转到运行->运行配置...->源选项卡,然后按添加按钮。 From here you can add it as external archive. 在这里,您可以将其添加为外部存档。 If you have it configured as variable, you can also use this option. 如果已将其配置为变量,则也可以使用此选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM