有一个用于执行常见文件系统操作的Maven插件吗? [英] is there a maven plugin for doing common file system operations?

查看:76
本文介绍了有一个用于执行常见文件系统操作的Maven插件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ant脚本,该脚本会生成自定义版本的tomcat,以便在我的服务器上使用.该ant脚本执行以下操作:

I have an ant script which produces a custom version of tomcat for use on my servers. This ant script does the following:

  • 解压缩tomcat .zip文件的原始副本
  • 删除一堆未使用的文件
  • 将一堆jar添加到tomcat \ lib文件夹中,例如数据库驱动程序和其他
  • 将其全部压缩到一个zip文件中

我注意到在 http://maven中有一个用于maven的蚂蚁运行插件.apache.org/plugins/maven-antrun-plugin/,但文档指出该ant run插件应谨慎使用.

I noticed that there is an ant run plugin for maven at http://maven.apache.org/plugins/maven-antrun-plugin/ but the documentation indicates that this ant run plugin should be used sparingly.

哪些maven插件可用于执行基本的文件io操作,例如复制,解压缩,删除,重命名,移动,压缩等...

What maven plugins are available for doing basic file io operations such as copy, unzip, delete, rename, move, zip, ... etc?

推荐答案

要解压缩文件,最好的解决方案是使用

For unzipping a file the best solution is to use the maven-dependency-plugin furthermore for packaging an archive like zip you can use the maven-assembly-plugin

这篇关于有一个用于执行常见文件系统操作的Maven插件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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