Skip to content

Commit 139cb30

Browse files
committed
kie-issues#1613: Add CI :: Check license headers GitHub Actions workflow (apache#3130)
* Add license header * Revert "Add license header" This reverts commit be404f1. * .rat-excludes * align naming with kie-issues#1613 ensemble * moce licenses into single file * LICENSE.txt -> LICENSE * Remove NOTICE * Add jstree, jquery in .rat-excludes * NOTICE recreated
1 parent 6bb800f commit 139cb30

File tree

5 files changed

+164
-24
lines changed

5 files changed

+164
-24
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
name: "CI :: Check license headers"
21+
22+
on:
23+
pull_request:
24+
types: [opened, synchronize, reopened, ready_for_review]
25+
26+
jobs:
27+
check-license-headers:
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v3
33+
34+
- name: Download Apache RAT
35+
run: |
36+
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
37+
38+
- name: Run Apache RAT
39+
run: |
40+
java -jar apache-rat-0.17-20241115.065104-374.jar --input-exclude-file .rat-excludes -- . > .tmp-rat-check-output
41+
cat .tmp-rat-check-output
42+
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."

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@
3232

3333
# Repository wide ignore mac DS_Store files
3434
.DS_Store
35+
36+
# Apache RAT check excludes file
37+
!.rat-excludes

.rat-excludes

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
### general excludes
2+
**/target/**
3+
**/.*
4+
*README*
5+
*readme*
6+
DISCLAIMER-WIP
7+
**/src/test/resources/**
8+
**/src/test/filtered-resources/**
9+
**/*integration-test*/src/main/resources/**
10+
**/**example**/**/resources/**
11+
**/META-INF/services/**
12+
**/META-INF/beans.xml
13+
14+
### optaplanner specific excludes
15+
**/optaplanner-docs/src/modules/ROOT/images/website/jquery/jquery.min.js
16+
**/optaplanner-docs/src/modules/ROOT/images/website/jstree/**
17+
**/optaplanner-examples/data/**/import/**
18+
**/eclipse.importorder
19+
**/src/main/resources/org/optaplanner/benchmark/impl/report/twitterbootstrap/css/**
20+
**/src/main/resources/org/optaplanner/benchmark/impl/report/twitterbootstrap/img/**
21+
**/src/main/resources/org/optaplanner/benchmark/impl/report/twitterbootstrap/js/**
22+
**/benchmark.xsd
23+
**/solver.xsd

LICENSE.txt renamed to LICENSE

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,97 @@
200200
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201201
See the License for the specific language governing permissions and
202202
limitations under the License.
203+
204+
------------------------------------------------------------------------------------------------------------------
205+
for optaplanner-benchmark/src/main/resources/org/optaplanner/benchmark/impl/report/twitterbootstrap/css/bootstrap*
206+
optaplanner-benchmark/src/main/resources/org/optaplanner/benchmark/impl/report/twitterbootstrap/img/**
207+
optaplanner-benchmark/src/main/resources/org/optaplanner/benchmark/impl/report/twitterbootstrap/js/bootstrap*
208+
209+
(https://github.com/twbs/bootstrap/)
210+
The MIT License (MIT)
211+
212+
Copyright (c) 2011-2019 Twitter, Inc.
213+
Copyright (c) 2011-2019 The Bootstrap Authors
214+
215+
Permission is hereby granted, free of charge, to any person obtaining a copy
216+
of this software and associated documentation files (the "Software"), to deal
217+
in the Software without restriction, including without limitation the rights
218+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
219+
copies of the Software, and to permit persons to whom the Software is
220+
furnished to do so, subject to the following conditions:
221+
222+
The above copyright notice and this permission notice shall be included in
223+
all copies or substantial portions of the Software.
224+
225+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
226+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
227+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
228+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
229+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
230+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
231+
THE SOFTWARE.
232+
233+
--------------------------------------------------------------------------------------------------------------
234+
for optaplanner-docs/src/modules/ROOT/images/website/jquery/jquery.min.js
235+
optaplanner-benchmark/src/main/resources/org/optaplanner/benchmark/impl/report/twitterbootstrap/js/jquery*
236+
237+
(https://github.com/jquery/jquery)
238+
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
239+
240+
Permission is hereby granted, free of charge, to any person obtaining
241+
a copy of this software and associated documentation files (the
242+
"Software"), to deal in the Software without restriction, including
243+
without limitation the rights to use, copy, modify, merge, publish,
244+
distribute, sublicense, and/or sell copies of the Software, and to
245+
permit persons to whom the Software is furnished to do so, subject to
246+
the following conditions:
247+
248+
The above copyright notice and this permission notice shall be
249+
included in all copies or substantial portions of the Software.
250+
251+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
252+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
253+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
254+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
255+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
256+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
257+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
258+
259+
--------------------------------------------------------------------------------------------------------------------
260+
for optaplanner-benchmark/src/main/resources/org/optaplanner/benchmark/impl/report/twitterbootstrap/css/prettify.css
261+
optaplanner-benchmark/src/main/resources/org/optaplanner/benchmark/impl/report/twitterbootstrap/js/prettify.js
262+
263+
(https://github.com/googlearchive/code-prettify)
264+
http://www.apache.org/licenses/LICENSE-2.0
265+
266+
-------------------------------------------------------------------------
267+
for optaplanner-docs/src/modules/ROOT/images/website/jstree/32px.png
268+
optaplanner-docs/src/modules/ROOT/images/website/jstree/40px.png
269+
optaplanner-docs/src/modules/ROOT/images/website/jstree/jstree.js
270+
optaplanner-docs/src/modules/ROOT/images/website/jstree/jstree.min.js
271+
optaplanner-docs/src/modules/ROOT/images/website/jstree/style.css
272+
optaplanner-docs/src/modules/ROOT/images/website/jstree/throbber.gif
273+
274+
(https://github.com/vakata/jstree)
275+
Copyright (c) 2014 Ivan Bozhanov
276+
277+
Permission is hereby granted, free of charge, to any person
278+
obtaining a copy of this software and associated documentation
279+
files (the "Software"), to deal in the Software without
280+
restriction, including without limitation the rights to use,
281+
copy, modify, merge, publish, distribute, sublicense, and/or sell
282+
copies of the Software, and to permit persons to whom the
283+
Software is furnished to do so, subject to the following
284+
conditions:
285+
286+
The above copyright notice and this permission notice shall be
287+
included in all copies or substantial portions of the Software.
288+
289+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
290+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
291+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
292+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
293+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
294+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
295+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
296+
OTHER DEALINGS IN THE SOFTWARE.

NOTICE

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,5 @@ This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).
66

77
The Initial Developer of some parts of the framework, which are copied from, derived from, or
8-
inspired by KIE (Knowledge Is Everthing) group, is Red Hat, Inc (https://www.redhat.com/).
9-
Copyright Red Hat, Inc. and/or its affiliates.. All Rights Reserved.
10-
11-
This product also includes the following third-party components:
12-
13-
* Twitter bootstrap version: 2.3.2
14-
Downloaded from: https://getbootstrap.com/
15-
License: Apache License v2.0 (just like OptaPlanner)
16-
17-
* jQuery version: 1.9.1
18-
Downloaded from: http://jquery.com/
19-
License: MIT (which can be used by Apache License v2.0 projects)
20-
21-
* google-code-pretty version: 4-Mar-2013
22-
Downloaded from: http://code.google.com/p/google-code-prettify
23-
License: Apache License v2.0 (just like OptaPlanner)
24-
25-
* jQuery version: 3.3.1
26-
Downloaded from: http://jquery.com/
27-
License: MIT - this is compatible with ASL 2.0: http://www.apache.org/legal/resolved.html#category-a
28-
29-
* jstree version: 3.3.5
30-
Downloaded from: https://www.jstree.com/
31-
License: MIT - this is compatible with ASL 2.0: http://www.apache.org/legal/resolved.html#category-a
8+
inspired by KIE (Knowledge Is Everything) group, is Red Hat, Inc (https://www.redhat.com/).
9+
Copyright Red Hat, Inc. and/or its affiliates.. All Rights Reserved.

0 commit comments

Comments
 (0)