在 Eclipse 中自动将项目构建到 JAR 中 [英] Build project into a JAR automatically in Eclipse

查看:38
本文介绍了在 Eclipse 中自动将项目构建到 JAR 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Eclipse 项目,我想在其中自动将我的 Java 项目内置到 JAR 中.我知道我可以选择将项目导出到 JAR 中;如果我右键单击;但我真正想要的是,像 Eclipse 一样自动构建项目的 .class 文件并将它们放在目标文件夹中;它还应该自动构建一个 JAR 并在某个或特定位置复制最新的 JAR.

I have an Eclipse project where I want to keep my Java project built into a JAR automatically. I know I have an option to export the project into a JAR; if I do a right click; but what I am really looking for is, that like Eclipse automatically builds a project's .class files and put them in target folder; it should also build a JAR automatically and copy the latest JAR at some or a specific location.

是否可以选择以这种方式配置 Eclipse 以自动构建 JAR?

Is there a option to configure Eclipse in such a way, to build JARs automatically?

只是为了让伙计们清楚,耐心回答我的问题;我不是将 ANT 视为解决方案;因为我已经在使用它,但我希望它可以通过基于时间的触发器或通过更改立即构建自动启动.

Just to make it clear for guys, patient enough to answer my question; I am not looking at ANT as solution; as I already use it, but what I would like it something that gets initiated automatically either with a time based trigger or immediate build with change.

推荐答案

查看 Apache Ant

可以将 Ant 用于 Eclipse 的自动构建,方法如下

It's possible to use Ant for automatic builds with eclipse, here's how

这篇关于在 Eclipse 中自动将项目构建到 JAR 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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