【问题标题】:maven-assembly-plugin: Excluding filesmaven-assembly-plugin:排除文件
【发布时间】:2020-10-19 14:34:15
【问题描述】:

我的 pom.xml 文件中有这段代码

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>             
                    <descriptors>
                        <descriptor>assembly.xml</descriptor>
                    </descriptors>
                    <finalName>elcordelaciutat-${project.version}</finalName>
                    <packagingExcludes>***/*.pom</packagingExcludes>                                                    
                </configuration>
                                
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>       

但我有这个错误:Element packagingExcludes is not allowed here

【问题讨论】:

    标签: maven maven-plugin maven-assembly-plugin


    【解决方案1】:

    packagingExcludes 没有appear anywhere in maven-assembly

    issues related to packagingExcludes 涉及像apache/maven-war-plugin 这样的项目,它确实声明了packagingExcludes in WarMojo.java

    因此,您可能没有该选项可用于使用 maven-assembly 进行存档。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-25
      • 1970-01-01
      • 2016-10-13
      • 2016-02-13
      相关资源
      最近更新 更多