Skip to content

Commit

Permalink
[incubator-kie-issues-1613] Add .rat-excludes file to each repository
Browse files Browse the repository at this point in the history
  • Loading branch information
tkobayas committed Nov 13, 2024
1 parent 5af319c commit f164a69
Show file tree
Hide file tree
Showing 14 changed files with 205 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/pr-rat-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: Run Apache RAT check

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
apache-rat-check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Download Apache RAT
run: |
curl -LO https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.16.1/apache-rat-0.16.1.jar
- name: Run Apache RAT
run: |
java -jar apache-rat-0.16.1.jar -d . -E .rat-excludes | grep "== File:" && exit 1 || echo "All files have license headers."
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ local/
!.github
!.git-blame-ignore-revs
!.openrewrite
!.rat-excludes
nbproject
*.ipr
*.iws
Expand Down
40 changes: 40 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
\.rat-excludes
\.gitignore
DISCLAIMER-WIP
ui-bundle\.zip
\.git-blame-ignore-revs
dependency-reduced-pom\.xml
lunr-2\.3\.9\.min\.js
search-ui\.js
branch\.yaml
main\.yaml
mvel\.jj
JavaLexer\.g4
JavaParser\.g4
.*\.sdo
.*\.sdt
TestingEmptyFile\.txt
.*\.test_json
.*\.pmml_json
.*\.drl_json
.*\.dslr
DMN.*\.xsd
DC\.xsd
DI\.xsd
KiePMML.*\.txt
TargetValueFactoryTest_01\.txt
TargetFieldFactoryTest_01\.txt
.*\.uml
drools-model
testFile\.txt
simple\.dot
.*\.log
.*\.lst
checkstyle-cachefile
test.*\.txt
test.*\.yml
drl\.ftl
goal\.txt
adult\.txt
antora\.yml
.*\.iml
4 changes: 4 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ This product also includes the following third-party components:
Downloaded from: https://gitlab.com/antora/antora-lunr-extension
License: Mozilla Public License 2.0

* antora ui-bundle
Downloaded from: https://github.com/stephengold/antora-ui-bundle
License: Mozilla Public License 2.0

* JavaParser, JavaLexer
Downloaded from: https://github.com/antlr/grammars-v4/tree/master/java/java
License: BSD License
8 changes: 7 additions & 1 deletion NOTICE-BINARY
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ efesto/efesto-core/efesto-common-api/src/test/resources/TestJar.jar : a compress
efesto/efesto-core/efesto-common-core/src/test/resources/TestJar.jar : a compressed JSON file for test
efesto/efesto-core/efesto-runtime-manager/efesto-runtime-manager-core/src/test/resources/TestJar.jar : a compressed JSON file for test

These files are used to validate the functionality and reliability of Apache KIE. They are not intended for production use or distribution beyond the scope of testing within this project.
These files are used to validate the functionality and reliability of Apache KIE. They are not intended for production use or distribution beyond the scope of testing within this project.

## Disclaimer for non-compiled resources Binaries

The following binaries are included in this project, but don't contain compiled resources.

drools-docs/ui-bundle/ui-bundle.zip : antora ui-bundle resources. For example, js and svg. See NOTICE file
19 changes: 19 additions & 0 deletions drools-test-coverage/drools-test-coverage-jars/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## drools-test-coverage-jars
This project is to build jars that are used in `drools-test-coverage` project. So we can avoid having jar binaries in the codebase.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.16.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand All @@ -69,6 +74,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions drools-test-coverage/drools-test-coverage-jars/surf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.16.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand All @@ -69,6 +74,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.16.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand All @@ -69,6 +74,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions drools-verifier/drools-verifier-test-jar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.16.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand All @@ -69,6 +74,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<definitions xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" expressionLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/" namespace="https://kie.org/dmn/_0F4F765C-8EB4-49EA-B0B7-1708350D85CB" id="_519DCACD-D3C7-4B4A-ABA9-862C791F1B50" name="DMN_38D7FBBB-9C00-411D-A3A9-FE7E52F1728B" xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="https://kie.org/dmn/extensions/1.0">
<itemDefinition id="_AA6B29A0-E5BF-4D8D-873A-E68F6E5E8388" name="tNumbers" isCollection="true" typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/">
<description></description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<definitions xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="https://kie.org/dmn/extensions/1.0" expressionLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/" namespace="https://kie.org/dmn/_A3317FB1-7BF8-4904-A5F4-2CD63AF3AFD0" id="_49F637EB-0176-4A4A-9E4A-CBE3A969732F" name="Risk Score Conditional">
<itemDefinition id="_0AB24AFF-A3D9-4BA5-82BC-F7850560A7E7" name="Region" isCollection="false" typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/">
<typeRef>string</typeRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<definitions xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="https://kie.org/dmn/extensions/1.0" expressionLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/" namespace="https://kie.org/dmn/_A3317FB1-7BF8-4904-A5F4-2CD63AF3AEC9" id="_49F637EB-0176-4A4A-9E4A-CBE3A969721E" name="DMN_A77074C1-21FE-4F7E-9753-F84661569AFC">
<itemDefinition id="_77090217-FF01-45CD-A561-C96D420D407A" name="Credit Score Rating" isCollection="false" typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/">
<typeRef>string</typeRef>
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@
<version>${version.apache-rat-plugin}</version>
<configuration>
<excludes>
<exclude>.rat-excludes</exclude>
<exclude>.gitignore</exclude>
<exclude>DISCLAIMER-WIP</exclude>
<exclude>**/ui-bundle.zip</exclude>
<exclude>.git-blame-ignore-revs</exclude>
<exclude>**/dependency-reduced-pom.xml</exclude>
<exclude>**/lunr-2.3.9.min.js</exclude>
Expand Down

0 comments on commit f164a69

Please sign in to comment.