在Java中构建Eclipse后,如何自动导出WAR? [英] How do I automatically export a WAR after Java build in Eclipse?

查看:270
本文介绍了在Java中构建Eclipse后,如何自动导出WAR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse 3.2中有一个J2EE项目,在每个构建结束时,我想自动创建和部署一个WAR文件。在这一刻,我必须用手做这个5或6个鼠标cliks,这将是很高兴自动化。



我知道我可以做到这一点与我有使用ANT的自定义构建脚本,但我希望使用Eclipse本机解决方案。



我已经安装了J2EE标准工具(JST)和Web标准工具(WST)插件在我的Eclipse环境中。

解决方案

如果可以将其实现为Ant脚本,那么可以让Eclipse调用Ant脚本每个构建自动(并在Eclipse环境中)。使用Project-> Properties-> Builders-> Add-> Ant Builder。
将该构建器赋予您定制的Ant脚本,并在项目正常构建器之后自动执行。


I have a J2EE project in Eclipse 3.2 and at the end of every build I want to automatically create and deploy a WAR file. At the moment I have to do this by hand which is 5 or 6 mouse-cliks and it would be nice to automate it.

I know I can do this with a custom build script using ANT but I am hoping for an Eclipse native solution.

I have the J2EE standard tools (JST) and Web Standard Tools (WST) plug-ins installed in my Eclipse environment.

解决方案

If you can implement it as an Ant script, then you can have Eclipse invoke that Ant script on each build automatically (and inside the Eclipse environment). Use Project->Properties->Builders->Add->Ant Builder. Give that builder you custom Ant script and it will automatically be executed after the "normal" builders of your project.

这篇关于在Java中构建Eclipse后,如何自动导出WAR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆