Open tkobayas opened 2 weeks ago
Thank you @tkobayas, I have something similar in my head longer time. What I see as we should do as part of this ticket is to unify the approach. Because there were already some initiatives to have licenses checks.
Used for example in kogito-runtimes https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/pom.xml
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>${version.apache-rat-plugin}</version>
<configuration>
<excludes>
<exclude>.mvn/maven.config</exclude>
<exclude>**/simple_invalid_migration.invalid</exclude>
<exclude>**/*.mpf</exclude>
<exclude>**/src/test/**/*.txt</exclude>
<exclude>**/.gitkeep</exclude>
<exclude>**/checkstyle-cachefile</exclude>
<exclude>**/*.log</exclude>
<exclude>**/*.lst</exclude>
<exclude>**/requirements.txt</exclude>
<exclude>**/*.addon</exclude>
<exclude>**/*.avsc</exclude>
<exclude>**/LoanUnit.xls.properties.test</exclude>
<exclude>**/src_test_resources_application.yml</exclude>
<exclude>**/BPMN*.xsd</exclude>
<exclude>**/bpsim.xsd</exclude>
<exclude>**/DC.xsd</exclude>
<exclude>**/DI.xsd</exclude>
<exclude>**/DiagramDefinition.xsd</exclude>
<exclude>**/DiagramInterchange.xsd</exclude>
<exclude>**/Semantic.xsd</exclude>
</excludes>
</configuration>
</plugin>
Used in a lot of our maven projects
<checkstyle.header.template
><![CDATA[
^\/\*$\n^
\* Licensed to the Apache Software Foundation \(ASF\) under one$\n^
\* or more contributor license agreements\. See the NOTICE file$\n^
\* distributed with this work for additional information$\n^
\* regarding copyright ownership\. The ASF licenses this file$\n^
\* to you under the Apache License, Version 2\.0 \(the$\n^
\* "License"\); you may not use this file except in compliance$\n^
\* with the License\. You may obtain a copy of the License at$\n^
\*$\n^
\* http:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0$\n^
\*$\n^
\* Unless required by applicable law or agreed to in writing,$\n^
\* software distributed under the License is distributed on an$\n^
\* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY$\n^
\* KIND, either express or implied\. See the License for the$\n^
\* specific language governing permissions and limitations$\n^
\* under the License\.$\n^
\*\/$
]]>
</checkstyle.header.template>
I think we should avoid the situation we have in parallel use of:
apache-rat-plugin
checkstyle.header.template
apache-rat java cli tool
I think we should use just one of the above, while the last seems to me as best candidate as it is not bind to maven projects. What is your opinion?
Hi @jomarko
I think we should use just one of the above, while the last seems to me as best candidate as it is not bind to maven projects. What is your opinion?
Yeah, +1 for apache-rat java cli tool
.
Indeed, I merged https://github.com/apache/incubator-kie-drools/pull/6149 with removing apache-rat-plugin
. I think @baldimir has the same opinion, but it's good to discuss it in dev at kie.apache ML. I'll send an email very soon.
Also thanks for mentioning that checkstyle.header.template
can be removed as well.
Also a +1 from me about using the CLI tool.
FYI, "kogito-images" will be not updated with "CI :: Check license headers" workflow, see the explanation here https://github.com/apache/incubator-kie-kogito-images/pull/1811#issuecomment-2489695430.
In order to check
All files have license headers if necessary.
https://kie.apache.org/docs/community/verify/ , add.rat-excludes
to the root directory of each repository.incubator-kie-kogito-images https://github.com/apache/incubator-kie-kogito-images/pull/1811For example, running
can easily confirm license headers.
Each repository committers should add ignorable file names/paths in
.rat-excludes
.Note:
.*\.csv
. We cannot express file path.--input-exclude-file
option. e.g.**/optaplanner-examples/data/**/import/**