Skip to content

Commit dff06c8

Browse files
authored
OPENNLP-1704: Auto-generate NOTICE for OpenNLP Core Project (#746)
1 parent 6daacd3 commit dff06c8

File tree

6 files changed

+268
-46
lines changed

6 files changed

+268
-46
lines changed

.github/workflows/license.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: CI Main - Regenerate NOTICE
17+
18+
on:
19+
push:
20+
branches:
21+
- main
22+
workflow_dispatch:
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Set up JDK 17
31+
uses: actions/setup-java@v4
32+
with:
33+
java-version: '17'
34+
distribution: 'temurin'
35+
36+
- name: Cache Maven packages
37+
uses: actions/cache@v4
38+
with:
39+
path: ~/.m2
40+
key: ${{ runner.os }}-master-m2-${{ hashFiles('**/pom.xml') }}
41+
restore-keys: ${{ runner.os }}-master-m2
42+
43+
- name: Generate Dependency Licenses
44+
run: |
45+
mvn license:aggregate-add-third-party@generate-and-check-licenses \
46+
-Dlicense.skipAggregateAddThirdParty=false \
47+
-B \
48+
-Dlicense.thirdPartyFilename=DEPENDENCY-LICENSES \
49+
-Dlicense.outputDirectory=target
50+
51+
- name: Create NOTICE File
52+
run: |
53+
cat src/license/NOTICE.template target/DEPENDENCY-LICENSES > NOTICE
54+
55+
- name: Create Pull Request after License Regeneration
56+
uses: peter-evans/create-pull-request@v7
57+
with:
58+
base: main
59+
token: ${{ secrets.GITHUB_TOKEN }}
60+
commit-message: "Minor: Regenerated NOTICE File for ${{ github.sha }}"
61+
committer: GitHub <[email protected]>
62+
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
63+
signoff: true
64+
branch: regenerate_license_file_after_dep_upgrade
65+
delete-branch: true
66+
title: "Regenerated NOTICE file after dependency changes"
67+
body: |
68+
Found some uncommited changes (from NOTICE regeneration) after running build on OpenNLP
69+
labels: |
70+
dependency

NOTICE

+22-46
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Apache OpenNLP
2-
Copyright 2021-2024 The Apache Software Foundation
2+
Copyright 2021-2025 The Apache Software Foundation
33

44
This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).
@@ -14,8 +14,8 @@ http://snowball.tartarus.org/
1414

1515
============================================================================
1616

17-
Wordpiece tokenizer
18-
https://github.com/robrua/easy-bert
17+
The Wordpiece tokenizer in opennlp-tools/main/java/opennlp/tools/tokenize
18+
is taken from https://github.com/robrua/easy-bert license under
1919

2020
The MIT License (MIT)
2121

@@ -41,55 +41,31 @@ SOFTWARE.
4141

4242
============================================================================
4343

44-
ONNX Runtime
44+
List of third-party dependencies grouped by their license type.
4545

46-
MIT License
4746

48-
Copyright (c) Microsoft Corporation
47+
Apache License, Version 2.0
4948

50-
Permission is hereby granted, free of charge, to any person obtaining a copy
51-
of this software and associated documentation files (the "Software"), to deal
52-
in the Software without restriction, including without limitation the rights
53-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54-
copies of the Software, and to permit persons to whom the Software is
55-
furnished to do so, subject to the following conditions:
56-
57-
The above copyright notice and this permission notice shall be included in all
58-
copies or substantial portions of the Software.
59-
60-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
66-
SOFTWARE.
67-
68-
============================================================================
49+
* Apache Log4j API (org.apache.logging.log4j:log4j-api:2.24.3 - https://logging.apache.org/log4j/2.x/log4j/log4j-api/)
50+
* Apache Log4j Core (org.apache.logging.log4j:log4j-core:2.24.3 - https://logging.apache.org/log4j/2.x/log4j/log4j-core/)
51+
* Apache UIMA Base: uimaj-core (org.apache.uima:uimaj-core:3.6.0 - https://uima.apache.org)
52+
* HPPC Collections (com.carrotsearch:hppc:0.7.2 - http://labs.carrotsearch.com/hppc.html/hppc)
53+
* jcommander (com.beust:jcommander:1.78 - https://jcommander.org)
54+
* SLF4J 2 Provider for Log4j API (org.apache.logging.log4j:log4j-slf4j2-impl:2.24.3 - https://logging.apache.org/log4j/2.x/log4j/log4j-slf4j2-impl/)
6955

70-
SLF4J API
71-
https://github.com/qos-ch/slf4j
56+
BSD License
7257

73-
MIT License
58+
* Morfologik Command Line Tools (org.carrot2:morfologik-tools:2.1.9 - http://morfologik.blogspot.com/morfologik-tools/)
59+
* Morfologik FSA (Builder) (org.carrot2:morfologik-fsa-builders:2.1.9 - http://morfologik.blogspot.com/morfologik-fsa-builders/)
60+
* Morfologik FSA (Traversal) (org.carrot2:morfologik-fsa:2.1.9 - http://morfologik.blogspot.com/morfologik-fsa/)
61+
* Morfologik Stemming APIs (org.carrot2:morfologik-stemming:2.1.9 - http://morfologik.blogspot.com/morfologik-stemming/)
7462

75-
Copyright (c) 2004-2022 QOS.ch Sarl (Switzerland)
76-
All rights reserved.
63+
MIT License
7764

78-
Permission is hereby granted, free of charge, to any person obtaining
79-
a copy of this software and associated documentation files (the
80-
"Software"), to deal in the Software without restriction, including
81-
without limitation the rights to use, copy, modify, merge, publish,
82-
distribute, sublicense, and/or sell copies of the Software, and to
83-
permit persons to whom the Software is furnished to do so, subject to
84-
the following conditions:
65+
* onnx-runtime (com.microsoft.onnxruntime:onnxruntime_gpu:1.20.0 - https://microsoft.github.io/onnxruntime/)
66+
* onnx-runtime (com.microsoft.onnxruntime:onnxruntime:1.20.0 - https://microsoft.github.io/onnxruntime/)
67+
* SLF4J API Module (org.slf4j:slf4j-api:2.0.16 - http://www.slf4j.org)
8568

86-
The above copyright notice and this permission notice shall be
87-
included in all copies or substantial portions of the Software.
69+
The MIT License (MIT)
8870

89-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
90-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
91-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
92-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
93-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
94-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
95-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
71+
* ClassGraph (io.github.classgraph:classgraph:4.8.179 - https://github.com/classgraph/classgraph)

pom.xml

+117
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@
191191
<maven.failsafe.plugin>3.5.2</maven.failsafe.plugin>
192192
<maven.javadoc.plugin>3.11.2</maven.javadoc.plugin>
193193
<forbiddenapis.plugin>3.8</forbiddenapis.plugin>
194+
<license-maven-plugin.version>2.5.0</license-maven-plugin.version>
195+
194196
</properties>
195197

196198
<build>
@@ -454,6 +456,121 @@
454456
<groupId>org.apache.maven.plugins</groupId>
455457
<artifactId>maven-checkstyle-plugin</artifactId>
456458
</plugin>
459+
460+
<plugin>
461+
<groupId>org.codehaus.mojo</groupId>
462+
<artifactId>license-maven-plugin</artifactId>
463+
<version>${license-maven-plugin.version}</version>
464+
<configuration>
465+
<useMissingFile>true</useMissingFile>
466+
<failOnMissing>true</failOnMissing>
467+
<includeTransitiveDependencies>true</includeTransitiveDependencies>
468+
<fileTemplate>/org/codehaus/mojo/license/third-party-file-groupByMultiLicense.ftl
469+
</fileTemplate>
470+
<excludedScopes>system,test</excludedScopes>
471+
<excludedGroups>${project.groupId}</excludedGroups>
472+
<licenseMerges>
473+
<licenseMerge>
474+
Apache License, Version 2.0 |
475+
Apache License, version 2.0 |
476+
Apache License Version 2 |
477+
Apache License Version 2.0 |
478+
Apache License version 2.0 |
479+
Apache 2 |
480+
Apache 2.0 |
481+
Apache-2.0 |
482+
Apache 2.0 License |
483+
Apache License, 2.0 |
484+
Apache License 2 |
485+
Apache License 2.0 |
486+
Apache Public License 2.0 |
487+
Apache Software License - Version 2.0 |
488+
Apache v2 |
489+
ASL, version 2 |
490+
The Apache License, Version 2.0 |
491+
The Apache Software License, Version 2.0
492+
</licenseMerge>
493+
<licenseMerge>
494+
Apache License |
495+
Apache Software Licenses
496+
</licenseMerge>
497+
<licenseMerge>
498+
BSD License |
499+
BSD license |
500+
BSD licence |
501+
BSD |
502+
The BSD License
503+
</licenseMerge>
504+
<licenseMerge>
505+
BSD 2-Clause License |
506+
BSD 2-Clause license |
507+
</licenseMerge>
508+
<licenseMerge>
509+
BSD 3-Clause License |
510+
BSD 3-Clause |
511+
BSD 3-clause |
512+
BSD-3-Clause |
513+
The BSD 3-Clause License |
514+
New BSD License |
515+
New BSD license
516+
</licenseMerge>
517+
<licenseMerge>
518+
Common Development and Distribution License (CDDL) v1.0 |
519+
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 |
520+
CDDL 1.0
521+
</licenseMerge>
522+
<licenseMerge>
523+
Common Development and Distribution License (CDDL) v1.1 |
524+
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 |
525+
CDDL 1.1 |
526+
Common Development and Distribution License (CDDL), Version 1.1
527+
</licenseMerge>
528+
<licenseMerge>
529+
Common Development and Distribution License |
530+
<!-- Multilicense, choosing CDDL -->
531+
CDDL+GPL |
532+
CDDL+GPL License |
533+
CDDL + GPLv2 with classpath exception
534+
</licenseMerge>
535+
<licenseMerge>
536+
Eclipse Public License, Version 1.0 |
537+
Eclipse Public License 1.0 |
538+
Eclipse Public License - v 1.0
539+
</licenseMerge>
540+
<licenseMerge>
541+
Eclipse Public License, Version 2.0 |
542+
EPL-2.0 |
543+
EPL 2.0
544+
</licenseMerge>
545+
<licenseMerge>
546+
Eclipse Distribution License, Version 1.0 |
547+
Eclipse Distribution License - v 1.0 |
548+
EDL 1.0
549+
</licenseMerge>
550+
<licenseMerge>
551+
MIT License |
552+
The MIT License |
553+
MIT license |
554+
MIT X11 License |
555+
MIT
556+
</licenseMerge>
557+
<licenseMerge>
558+
The GNU General Public License (GPL), Version 2, With Classpath Exception |
559+
GPL2 w/ CPE
560+
</licenseMerge>
561+
<licenseMerge>
562+
GNU Lesser General Public License (LGPL), Version 2.1 |
563+
LGPL, version 2.1 |
564+
GNU Lesser General Public License Version 2.1 |
565+
GNU Lesser General Public License, version 2.1
566+
</licenseMerge>
567+
<licenseMerge>
568+
Common Public License Version 1.0 |
569+
Common Public License - v 1.0
570+
</licenseMerge>
571+
</licenseMerges>
572+
</configuration>
573+
</plugin>
457574
</plugins>
458575
</build>
459576

rat-excludes

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
under the License.
1818
-->
1919

20+
src/license/NOTICE.template
2021
src/test/resources/opennlp/tools/*/*.txt
2122
src/test/resources/opennlp/tools/*/*.sample
2223
src/test/resources/opennlp/tools/*/*.txt

src/license/NOTICE.template

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Apache OpenNLP
2+
Copyright 2021-2025 The Apache Software Foundation
3+
4+
This product includes software developed at
5+
The Apache Software Foundation (http://www.apache.org/).
6+
7+
============================================================================
8+
9+
The snowball stemmers in
10+
opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball
11+
were developed by Martin Porter and Richard Boulton.
12+
The full snowball package is available from
13+
http://snowball.tartarus.org/
14+
15+
============================================================================
16+
17+
The Wordpiece tokenizer in opennlp-tools/main/java/opennlp/tools/tokenize
18+
is taken from https://github.com/robrua/easy-bert licensed under
19+
20+
The MIT License (MIT)
21+
22+
Copyright (c) 2019 Rob Rua
23+
24+
Permission is hereby granted, free of charge, to any person obtaining a copy
25+
of this software and associated documentation files (the "Software"), to deal
26+
in the Software without restriction, including without limitation the rights
27+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28+
copies of the Software, and to permit persons to whom the Software is
29+
furnished to do so, subject to the following conditions:
30+
31+
The above copyright notice and this permission notice shall be included in all
32+
copies or substantial portions of the Software.
33+
34+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
40+
SOFTWARE.
41+
42+
============================================================================

src/license/THIRD-PARTY.properties

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#

0 commit comments

Comments
 (0)