gpt4 book ai didi

maven assembly- 子文件夹

转载 作者:行者123 更新时间:2023-12-02 08:41:15 28 4
gpt4 key购买 nike

我想使用maven 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>'

我的描述 rune 件是:

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/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

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

我该如何配置它?

最佳答案

添加

 <includeBaseDirectory>false</includeBaseDirectory>

到您的程序集描述符。

关于maven assembly- 子文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16338143/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com