Maven-自定义包装扩展名? [英] Maven - custom packaging extension?

查看:125
本文介绍了Maven-自定义包装扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以创建一个maven插件,该插件将使用自定义文件扩展名打包我的项目?我知道有很多预先定义的对象,例如jar,ear,war等,但我想要自己的.我也知道如何创建自己的包装类型(使用components.xml),但是我仍然必须告诉它应该使用什么扩展名.我是否必须实现自己的存档器或其他工具? (基本上,这将像一场战争,但使用不同的名称)

就像我在上面的评论中说的那样,

解决方案

好吧-可行,但是您需要实现自己的存档器(或者可以使用现有的存档器并重命名生成的文件-不确定此选项). 此博客中对此进行了详细说明.. >

Is it possible to create a maven plugin, which would package my project using a custom file extension? I know that there's a bunch of pre-defined ones like jar, ear, war etc. but I want my own. I also know how to create my own packaging type (using the components.xml), but I still have to tell it what extension it should use. Do I have to implement my own archiver or something? (basically it will be something like a war but with a different name)

解决方案

Well just as I said in the comment above - it is doable but you need to implement your own archiver (or you can use somehow the existing ones and just rename the resulting file - not sure about this option). It's all described in detail in this blog.

这篇关于Maven-自定义包装扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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