使用ANT生成一个非常大的项目一个.jar [英] Using ANT to generate a .jar in a very large project

查看:114
本文介绍了使用ANT生成一个非常大的项目一个.jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用的1.5更新18 JDK,各种外部的JAR,而像一个大的项目我的工作(使用Eclipse)。这一切都被正确安装在Eclipse中。是否有可能创建从我的项目一个特定的源文件生成JAR Ant文件? (数字源文件都编译成Java应用程序。所有这些股票的很多相同的资源,从而巨大的项目工作区)。

I have a large project I'm working on (using Eclipse) that uses the 1.5 update 18 JDK, various external JARs, and the like. It's all been setup properly in Eclipse. Is it possible to create an Ant file that generates a JAR from a particular source file in my project? (A number of the source files are compilable into Java Applications. All of those share a lot of the same resources, thus the huge project workspace).

到目前为止,我只能够弄清楚如何创建为整个项目的Ant构建文件,而不是建立在特定的.java文件到一个应用程序,更不用说从中创建一个.jar。

So far, I've only been able to figure out how to create an Ant build file for the entire project, not build the specific .java file into an app, let alone create a .jar from it.

感谢所有帮助!

推荐答案

您可以指定哪些文件通过配置 JAR 任务jar文件包含。您可以通过使用包括 includesFile 选项配置配置文件放入罐子哪个类。请参阅 jar任务文档

You can specify which files to include in a jar file by configuring the jar task. You can configure which class files go into the jar by configuring using the includes and includesFile options. See the Jar task docs.

这篇关于使用ANT生成一个非常大的项目一个.jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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