mathieucarbou / license-maven-plugin

Manage license headers in your source files

Home Page:https://oss.carbou.me/license-maven-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Excludes are ignored

devent opened this issue · comments

Version affected

4.2.rc3

Describe the bug

I need to exclude projects that I added with git-submodule. But no matter what pattern I use the license headers are checked and found invalid.

How to Reproduce

I tried just the like jenkins-cpp-docker, **/jenkins-cpp-docker, **/jenkins-cpp-docker/** *jenkins-cpp-docker/**` but nothing works.

Here is the relevant plugin configuration:

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>4.2.rc3</version>
                <configuration>
                    <properties>
                        <owner>${license.custom.license.owner}</owner>
                        <email>${license.custom.license.email}</email>
                    </properties>
                    <licenseSets>
                    <licenseSet>
                    <header>${license.custom.license.template}</header>
                    <excludes>
                        <exclude>**/README</exclude>
                        <exclude>**/LICENSE.txt</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                        <exclude>**/kiss09.cl</exclude>
                        <exclude>.directory</exclude>
                        <exclude>CNAME</exclude>
                        <exclude>**/anlopencl-doc/**</exclude>
                        <exclude>jenkins-cpp-docker</exclude>
                        <exclude>**/Debug/**</exclude>
                        <exclude>**/Debug-LLVM/**</exclude>
                        <exclude>**/Debug-OpenCL/**</exclude>
                        <exclude>**/OpenCL/**</exclude>
                        <exclude>**/Release-LLVM/**</exclude>
                        <exclude>**/benchmark/**</exclude>
                        <exclude>**/googletest/**</exclude>
                        <exclude>**/llvm-project/**</exclude>
                        <exclude>**/OpenCL-CLHPP/**</exclude>
                        <exclude>**/OpenCL-Headers/**</exclude>
                        <exclude>**/spdlog/**</exclude>
                    </excludes>
                    </licenseSet>
                    </licenseSets>
                    <mapping>
                        <h>DOUBLESLASH_STYLE</h>
                        <c>DOUBLESLASH_STYLE</c>
                        <cpp>DOUBLESLASH_STYLE</cpp>
                        <cl>DOUBLESLASH_STYLE</cl>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Here is the project example:

https://gitea.anrisoftware.com/com.anrisoftware.anlopencl/anl-opencl/src/branch/Feature-4590

I made it work by doubling the configuration. But according to the documentation this configuration below should be invalid.

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>4.2.rc3</version>
                <configuration>
                    <properties>
                        <owner>${license.custom.license.owner}</owner>
                        <email>${license.custom.license.email}</email>
                    </properties>
                    <licenseSets>
                        <licenseSet>
                            <header>${license.custom.license.template}</header>
                            <excludes>
                                <exclude>**/README</exclude>
                                <exclude>**/LICENSE.txt</exclude>
                                <exclude>src/test/resources/**</exclude>
                                <exclude>src/main/resources/**</exclude>
                                <exclude>**/kiss09.cl</exclude>
                                <exclude>**/.directory</exclude>
                                <exclude>**/CNAME</exclude>
                                <exclude>anlopencl-doc/**</exclude>
                                <exclude>jenkins-cpp-docker/**</exclude>
                                <exclude>html/**</exclude>
                                <exclude>out/**</exclude>
                                <exclude>Debug/**</exclude>
                                <exclude>Debug-LLVM/**</exclude>
                                <exclude>Debug-OpenCL/**</exclude>
                                <exclude>OpenCL/**</exclude>
                                <exclude>Release-LLVM/**</exclude>
                                <exclude>benchmark/**</exclude>
                                <exclude>googletest/**</exclude>
                                <exclude>llvm-project/**</exclude>
                                <exclude>OpenCL-CLHPP/**</exclude>
                                <exclude>OpenCL-Headers/**</exclude>
                                <exclude>spdlog/**</exclude>
                            </excludes>
                        </licenseSet>
                    </licenseSets>
                    <mapping>
                        <h>DOUBLESLASH_STYLE</h>
                        <c>DOUBLESLASH_STYLE</c>
                        <cpp>DOUBLESLASH_STYLE</cpp>
                        <cl>DOUBLESLASH_STYLE</cl>
                    </mapping>
                    <header>${license.custom.license.template}</header>
                    <excludes>
                        <exclude>**/README</exclude>
                        <exclude>**/LICENSE.txt</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                        <exclude>**/kiss09.cl</exclude>
                        <exclude>**/.directory</exclude>
                        <exclude>**/CNAME</exclude>
                        <exclude>anlopencl-doc/**</exclude>
                        <exclude>jenkins-cpp-docker/**</exclude>
                        <exclude>html/**</exclude>
                        <exclude>out/**</exclude>
                        <exclude>Debug/**</exclude>
                        <exclude>Debug-LLVM/**</exclude>
                        <exclude>Debug-OpenCL/**</exclude>
                        <exclude>OpenCL/**</exclude>
                        <exclude>Release-LLVM/**</exclude>
                        <exclude>benchmark/**</exclude>
                        <exclude>googletest/**</exclude>
                        <exclude>llvm-project/**</exclude>
                        <exclude>OpenCL-CLHPP/**</exclude>
                        <exclude>OpenCL-Headers/**</exclude>
                        <exclude>spdlog/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

I can close this because I had a wrong configuration in the parent Pom.