是否有使用Apache Ant某种程度上,它的建成后更新一个jar文件? [英] Is there a way with Apache Ant to update a jar file after it's been built?

查看:148
本文介绍了是否有使用Apache Ant某种程度上,它的建成后更新一个jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来更新Ant的一个jar文件?

Is there a way to update a jar file in Ant?

编辑:例如,如果我想一些额外的文件添加到已经存在的JAR文件

For example, if I wanted to add some additional files to an already existing JAR file?

推荐答案

当然,这是完全可能的。蚂蚁 jar任务可以做任何事情的jar 命令行可以做的。你用更新标志设置为true,而不是假的做到这一点。

Sure, that's totally possible. The Ant Jar task can do anything the jar command line can do. You do it with the update flag set to true instead of false.

  <jar destfile="/x/y/z/file.jar"
       basedir="/a/b/c/"
       update="true"
  />

当目的地罐子已经存在于这条道路。

Where the destination jar is already in existence at that path.

编辑:要设置一个路径

  <jar destfile="/x/y/z/file.jar"
       update="true">
      <zipfileset dir="/a/b/c"/ prefix="x/y/z" />
  </jar>

这篇关于是否有使用Apache Ant某种程度上,它的建成后更新一个jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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