使用Ant构建多个罐子 [英] Using Ant to build multiple jars

查看:185
本文介绍了使用Ant构建多个罐子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有多个Java Eclipse项目。他们每个人都有建设罐子jardesc文件。这是很好的 - 双击 - >光洁度和jar文件的。但是,当我拥有自营出口几罐这是一个痛苦 - 我必须重复步骤数次。
请告诉我,我可以使用Ant脚本来同时运行多个jardesc文件(并根据每个jardesc文件中获取几罐)?怎么办呢?

I have multiple Java eclipse projects. Each of them has "jardesc" file for building jar. It's nice - double click -> finish and jar file is made. But when i have to export several jars it's a pain - i have to repeat procedure several times. Please tell me, can i use Ant script to run several "jardesc" files at once (and get several jars according to each jardesc file)? How to do it?

推荐答案

看看 subant 在Ant任务。您可以创建蚁文件,该文件将调用其他文件。

Take a look at subant task in ant. You can create ant-file which would call other files to.

    <subant target="create_jar1">
        <fileset dir="." includes="jar2.xml"/>
    </subant>
    <subant target="create_jar2">
        <fileset dir="." includes="jar1.xml"/>
    </subant>

这篇关于使用Ant构建多个罐子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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