本文介绍了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 程序集
发布评论