简体   繁体   English

如何在Eclipse中的现有GWT项目中添加build.xml?

[英]How do I add a build.xml to an existing GWT project in Eclipse?

I have a running Java GWT application, that I can compile using Eclipse. 我有一个正在运行的Java GWT应用程序,我可以使用Eclipse进行编译。

Now I wan't to also be able to build this application from the command line using ant. 现在我也不想使用ant从命令行构建这个应用程序。

As of my understanding I therefore need a build.xml file. 据我所知,因此我需要一个build.xml文件。 I used the webAppCreator tool , that comes with the SDK to create this build.xml file and adapted it to my needs and got it working. 我使用了SDK附带的webAppCreator工具来创建这个build.xml文件,并根据我的需要调整它并使其正常工作。

But how do I tell Eclipse now to automatically update the build.xml file upon code changes? 但是,如何告诉Eclipse现在在代码更改时自动更新build.xml文件?

I know it is possible for it works in projects created with webAppCreator. 我知道它可以在使用webAppCreator创建的项目中工作。 But I just copied the build.xml to another project. 但我只是将build.xml复制到另一个项目。 So what do I need to adapt? 那么我需要适应什么呢? Or where do I need to set up the link to the build.xml? 或者我需要在哪里设置build.xml的链接?

You could use Ant4Eclipse to get the Eclipse classpath into your ant build file. 您可以使用Ant4Eclipse将Eclipse类路径放入您的ant构建文件中。 That's probably only part of the solution you're looking for... I'm not sure, how useful this will actually be when used together with a GWT project (do you want automatic copying of the libraries to WEB-INF/lib, too? Etc...) 这可能只是你正在寻找的解决方案的一部分......我不确定,当与GWT项目一起使用时,它实际上有多大用处(你想要将库自动复制到WEB-INF / lib,呢?等等......)

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

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