简体   繁体   English

如何从多模块Maven许可证插件聚合中排除项目?

[英]How to exclude project from multi module Maven License Plugin aggregation?

I'm having trouble trying to ignore some modules when I add headers to my files using maven license plugin. 使用maven许可证插件将标头添加到文件时,尝试忽略某些模块时遇到麻烦。 The way I am trying to do is to put the modules path in the excludes tag. 我想做的方法是将模块路径放在excludes标记中。 Here is the plugin in pom.xml: 这是pom.xml中的插件:

    <plugin>
            <groupId>com.mycila.maven-license-plugin</groupId>
            <artifactId>maven-license-plugin</artifactId>
            <version>1.10.b1</version>
            <executions>
                <execution>
                    <goals>
                        <goal>format</goal>
                    </goals>
                    <phase>validate</phase>
                    <configuration>
                        <header>header.txt</header>
                        <aggregate>true</aggregate>
                        <excludes>          
                            <exclude>**/a/**</exclude>
                            <exclude>**/b/**</exclude>
                            <exclude>**/c/**</exclude>
                        </excludes>
                    </configuration>
                </execution>
            </executions>
        </plugin>

This is the way I'm trying to ignore the projects inside this parent pom.xml. 这就是我试图忽略此父pom.xml中的项目的方式。 I have already tried also with ${project.basedir}/a/ and ${basedir}/a/ 我已经尝试过$ {project.basedir} / a /和$ {basedir} / a /

Thank you in advance. 先感谢您。

Please try: 请试试:

<excludes>          
   <exclude>a/**</exclude>
   <exclude>b/**</exclude>
   <exclude>c/**</exclude>
</excludes>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在多模块项目中使用License Maven插件时出错 - An error while using the License Maven Plugin in a multi module project license-maven-plugin:update-file-header 如何排除项目名称? - license-maven-plugin:update-file-header How to exclude project name? 如何在多模块项目中配置Maven shade插件? - How to configure Maven shade plugin in a multi-module project? 如何在多模块项目中使用maven checkstyle插件? - How to use maven checkstyle plugin in multi-module project? Maven-多模块项目-如何配置/控制插件执行顺序 - Maven - Multi module project - How to configure/control plugin execution order aspectj-maven-plugin 多模块项目 - aspectj-maven-plugin multi module project 如何从maven插件使用的类路径中排除项目依赖项 - How to exclude project dependency from classpath used by maven plugin JAVA 和 MAVEN - 多模块项目,子项目不包括父亲的一些 class - JAVA and MAVEN - Multi module project, child exclude some class of father Jboss作为部署Multi Module Maven项目的maven插件 - Jboss as maven plugin to deploy Multi Module Maven Project 使用frontend-maven-plugin构建Maven多模块项目时出错 - Error building maven multi module project with frontend-maven-plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM