Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kie-issues#1613: Add CI :: License headers GitHub Actions workflow #3714

Merged
merged 27 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
00cfcc5
Add license header
jomarko Oct 10, 2024
eb60175
Revert "Add license header"
jomarko Oct 10, 2024
5727aeb
Add license header
jomarko Oct 10, 2024
2dd019c
revert beans.xml
jomarko Oct 11, 2024
012973d
Merge branch 'main' into runtimes-license
jomarko Nov 15, 2024
a83d727
.rat-excludes and rat check action
jomarko Nov 15, 2024
1361fed
remove checkstyle.header.template
jomarko Nov 15, 2024
8ac99a2
OMG BPMN SPEC files license
jomarko Nov 15, 2024
ab721ea
.rat-excludes fix format - escaping
jomarko Nov 15, 2024
360aa1e
.rat-excludes
jomarko Nov 15, 2024
bcd348d
storage-jpa license
jomarko Nov 15, 2024
906228d
apache rat 17
jomarko Nov 15, 2024
f4d6031
fix exit logic
jomarko Nov 15, 2024
ee0d2e9
print rat check output
jomarko Nov 15, 2024
3a59917
align with other PRs of kie-issues#1613
jomarko Nov 18, 2024
46927e6
license text placeholder
jomarko Nov 18, 2024
3e4e2f8
LICENSE SPEC
jomarko Nov 18, 2024
28d419e
Revert "LICENSE SPEC"
jomarko Nov 18, 2024
0a6bcaa
List explicitely all files in the .rat-excludes
jomarko Nov 21, 2024
8e0651d
Use apache-rat v0.16.1
jomarko Nov 21, 2024
62e9a72
Everthing -> Everything
jomarko Nov 21, 2024
b78016f
BPMN LICENSE text
jomarko Nov 21, 2024
4780813
Merge branch 'main' into runtimes-license
jomarko Nov 22, 2024
a217085
CI :: License headers
jomarko Nov 22, 2024
d0e2f80
kogito-codegen-modules/kogito-codegen-processes-integration-tests/src…
jomarko Nov 22, 2024
e376fd9
.bpmn[2] files
jomarko Nov 25, 2024
a6cac6b
Merge branch 'main' into runtimes-license
jomarko Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci_check_license_headers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# 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: "CI :: Check license headers"

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

jobs:
check-license-headers:
runs-on: ubuntu-latest

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

- name: Download Apache RAT
run: |
curl -LO https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.17-SNAPSHOT/apache-rat-0.17-20241115.065104-374.jar

- name: Run Apache RAT
run: |
java -jar apache-rat-0.17-20241115.065104-374.jar --input-exclude-file .rat-excludes -- . > .tmp-rat-check-output
cat .tmp-rat-check-output
grep "Files with unapproved licenses:" .tmp-rat-check-output && rm .tmp-rat-check-output && echo "There are files with missing or unapproved license headers." && exit 1 || rm .tmp-rat-check-output && echo "All files have correct license headers."
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ target/
.run/
.checkstyle

*.log
*.log

# Apache RAT check excludes file
!.rat-excludes
20 changes: 20 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### general excludes
**/target/**
**/.*
*README*
*readme*
DISCLAIMER-WIP
**/src/test/resources/**
**/src/test/filtered-resources/**
**/*integration-test*/src/main/resources/**
**/**example**/**/resources/**
**/META-INF/services/**
**/META-INF/beans.xml
**/licenses/**

### kogito-runtimes specific excludes
**/META-INF/kogito.addon
**/*.avsc
**/jbpm-tests/src/test/bpmn/**
**/jbpm-bpmn2/**/*.xsd
**/requirements.txt
10 changes: 10 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,13 @@
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.


------------------------------------------------------------------------------------
for jbpm/jbpm-bpmn2/src/main/resources/META-INF/BPMN20.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/BPMNDI.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/DC.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/DI.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/Semantic.xsd

TODO put license text for files listed above here.
Copy link
Contributor

@tkobayas tkobayas Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know when https://issues.apache.org/jira/browse/LEGAL-690 will be answered, but I hope it wouldn't be a blocker for 10.0.0 release. At least for this PR, I think you can keep the "TODO", or align with drools main (https://github.com/apache/incubator-kie-drools/blob/main/LICENSE#L248-L382 , note that it was taken from DMN spec, this PR needs to take from BPMN spec). @porcelli thoughts?

18 changes: 18 additions & 0 deletions addons/common/jbpm-usertask-storage-jpa/pom.xml
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand Down
20 changes: 20 additions & 0 deletions jbpm/jbpm-deps-groups/jbpm-deps-group-bpmn2-compiler/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<?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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand Down
20 changes: 20 additions & 0 deletions jbpm/jbpm-deps-groups/jbpm-deps-group-compiler/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<?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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand Down
20 changes: 20 additions & 0 deletions jbpm/jbpm-deps-groups/jbpm-deps-group-engine/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<?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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand Down
20 changes: 20 additions & 0 deletions jbpm/jbpm-deps-groups/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!--
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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand Down
18 changes: 18 additions & 0 deletions jbpm/jbpm-usertask-workitem/pom.xml
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand Down
20 changes: 20 additions & 0 deletions jbpm/jbpm-usertask/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<?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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand Down
26 changes: 0 additions & 26 deletions kogito-build/kogito-build-no-bom-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,6 @@
-->
<properties>
<checkstyle.failOnViolation>false</checkstyle.failOnViolation>
<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^
\* &quot;License&quot;\); 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^
\* &quot;AS IS&quot; 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>
<checkstyle.header.extensions>java,groovy</checkstyle.header.extensions>
<checkstyle.logViolationsToConsole>true</checkstyle.logViolationsToConsole>

<!-- container images for testing -->
Expand Down Expand Up @@ -190,10 +168,6 @@
<configuration>
<checkstyleRules>
<module name="Checker">
<module name="RegexpHeader">
<property name="header" value="${checkstyle.header.template}"/>
<property name="fileExtensions" value="${checkstyle.header.extensions}"/>
</module>
<module name="TreeWalker">
<module name="RegexpSinglelineJava">
<property name="format" value="@author"/>
Expand Down
30 changes: 0 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.outputTimestamp>2024-01-16T00:00:00Z</project.build.outputTimestamp>
<version.maven.artifact.plugin>3.4.1</version.maven.artifact.plugin>
<version.apache-rat-plugin>0.16.1</version.apache-rat-plugin>
<version.maven-javadoc-plugin>3.6.2</version.maven-javadoc-plugin>
</properties>

Expand All @@ -115,35 +114,6 @@
<outputTimestamp>${project.build.outputTimestamp}</outputTimestamp>
</configuration>
</plugin>
<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>
</plugins>
</pluginManagement>
</build>
Expand Down
20 changes: 20 additions & 0 deletions quarkus/addons/dynamic/integration-tests/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<?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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
quarkus.native.auto-service-loader-registration=true
# 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.

quarkus.native.auto-service-loader-registration=true
Loading
Loading