我如何可以自动编译一个大的Java项目? [英] How can I automate compiling a large Java project?

查看:163
本文介绍了我如何可以自动编译一个大的Java项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的雇主自动化项目。我们有我们的源$ C ​​$ C的每次修订池。当您下载一个版本,你需要带着一帮第三方包括最终生成项目创建一个目录结构。我自动化的整个过程最多有我的脚本(蝙蝠)编译每个特定的可运行Java应用程序的地步。有许多应用程序,这单项目,目录列表看起来是这样的:

I'm working on an automation project for my employer. We have a pool for each revision of our source code. When you download a revision, you need to create a directory structure with a bunch of third party includes to eventually build the project. I've automated this entire process up to the point of having my script (.bat) compile each particular runnable java application. There are many applications to this single project, and the directory listing looks something like this:

Proj Name
   -variousincludesfolder1
   -variousincludesfolder2
   -variousincludesfolder3
   -variousincludesfolder4
   -runnableapplicationsandmoreincludes
       -con.java

现在,我想做con.java的自动编制,但我不知道从哪里开始。人建议我试试蚂蚁,但是任何自动化的Ant文件生成我得到使用Eclipse似乎只够而一个活跃的项目文件存在建立con.java。反正有没有使用eclipse自动化此,具有批处理文件生成一个.jar本身?点

Right now, I'd like to do an automated compiling of con.java, but I don't know where to begin. People have suggested I try Ant, but any automated Ant file generation I get using Eclipse seems only enough to build con.java while an active project file exists. Is there anyway to automate this without using eclipse, to the point of having the batch file generate a .jar itself?

推荐答案

这绝对是一个工作,蚂蚁 。不要依赖于Eclipse生成的Ant文件;通过手动读自己写一个。 (您可能会发现,蚂蚁做的事情,你没有想到这样做在你的构建脚本,太)。

This is definitely a job for Ant. Don't rely on Eclipse-generated Ant files; read through the manual and write one yourself. (You'll likely find out that Ant does things you didn't think of doing in your build script, too.)

要更具体,这里是jar任务的文档。

这篇关于我如何可以自动编译一个大的Java项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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