Maven 程序集

编程入门 行业动态 更新时间:2024-10-27 12:38:58
本文介绍了Maven 程序集-子文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想使用maven程序集插件组装

I want to use maven assembly plugin assembly

'<plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>dist</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>src/main/dist.xml</descriptor> </descriptors> </configuration> </execution> </executions> </plugin>'

我的描述符文件是:

<assembly xmlns="maven.apache/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="www.w3/2001/XMLSchema-instance" xsi:schemaLocation="maven.apache/plugins/maven-assembly-plugin/assembly/1.1.2 maven.apache/xsd/assembly-1.1.2.xsd"> <id>dist</id> <formats> <format>dir</format> </formats> <files> <file> <source>pom.xml</source> <outputDirectory>/ET</outputDirectory> </file> </files> </assembly>

结果是文件夹层次结构是:ET-> MyProject-MySnapshot-dist -> pom.xml

the result is folder hierarchy is: ET-> MyProject-MySnapshot-dist -> pom.xml

我希望结果是:ET->pom.xml

I want the result to be : ET->pom.xml

我该如何配置?

推荐答案

添加

<includeBaseDirectory>false</includeBaseDirectory>

到你的程序集描述符.

更多推荐

Maven 程序集

本文发布于:2023-11-13 10:10:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584103.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   Maven

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!