Skip to content

Commit

Permalink
OPENNLP-1704: Auto-generate NOTICE for OpenNLP Core Project (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 authored Feb 8, 2025
1 parent 6daacd3 commit dff06c8
Show file tree
Hide file tree
Showing 6 changed files with 268 additions and 46 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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 Main - Regenerate NOTICE

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-master-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-master-m2

- name: Generate Dependency Licenses
run: |
mvn license:aggregate-add-third-party@generate-and-check-licenses \
-Dlicense.skipAggregateAddThirdParty=false \
-B \
-Dlicense.thirdPartyFilename=DEPENDENCY-LICENSES \
-Dlicense.outputDirectory=target
- name: Create NOTICE File
run: |
cat src/license/NOTICE.template target/DEPENDENCY-LICENSES > NOTICE
- name: Create Pull Request after License Regeneration
uses: peter-evans/create-pull-request@v7
with:
base: main
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Minor: Regenerated NOTICE File for ${{ github.sha }}"
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: true
branch: regenerate_license_file_after_dep_upgrade
delete-branch: true
title: "Regenerated NOTICE file after dependency changes"
body: |
Found some uncommited changes (from NOTICE regeneration) after running build on OpenNLP
labels: |
dependency
68 changes: 22 additions & 46 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache OpenNLP
Copyright 2021-2024 The Apache Software Foundation
Copyright 2021-2025 The Apache Software Foundation

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

============================================================================

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

The MIT License (MIT)

Expand All @@ -41,55 +41,31 @@ SOFTWARE.

============================================================================

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

MIT License

Copyright (c) Microsoft Corporation
Apache License, Version 2.0

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

============================================================================
* Apache Log4j API (org.apache.logging.log4j:log4j-api:2.24.3 - https://logging.apache.org/log4j/2.x/log4j/log4j-api/)
* Apache Log4j Core (org.apache.logging.log4j:log4j-core:2.24.3 - https://logging.apache.org/log4j/2.x/log4j/log4j-core/)
* Apache UIMA Base: uimaj-core (org.apache.uima:uimaj-core:3.6.0 - https://uima.apache.org)
* HPPC Collections (com.carrotsearch:hppc:0.7.2 - http://labs.carrotsearch.com/hppc.html/hppc)
* jcommander (com.beust:jcommander:1.78 - https://jcommander.org)
* 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/)

SLF4J API
https://github.com/qos-ch/slf4j
BSD License

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

Copyright (c) 2004-2022 QOS.ch Sarl (Switzerland)
All rights reserved.
MIT License

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ClassGraph (io.github.classgraph:classgraph:4.8.179 - https://github.com/classgraph/classgraph)
117 changes: 117 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@
<maven.failsafe.plugin>3.5.2</maven.failsafe.plugin>
<maven.javadoc.plugin>3.11.2</maven.javadoc.plugin>
<forbiddenapis.plugin>3.8</forbiddenapis.plugin>
<license-maven-plugin.version>2.5.0</license-maven-plugin.version>

</properties>

<build>
Expand Down Expand Up @@ -454,6 +456,121 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<configuration>
<useMissingFile>true</useMissingFile>
<failOnMissing>true</failOnMissing>
<includeTransitiveDependencies>true</includeTransitiveDependencies>
<fileTemplate>/org/codehaus/mojo/license/third-party-file-groupByMultiLicense.ftl
</fileTemplate>
<excludedScopes>system,test</excludedScopes>
<excludedGroups>${project.groupId}</excludedGroups>
<licenseMerges>
<licenseMerge>
Apache License, Version 2.0 |
Apache License, version 2.0 |
Apache License Version 2 |
Apache License Version 2.0 |
Apache License version 2.0 |
Apache 2 |
Apache 2.0 |
Apache-2.0 |
Apache 2.0 License |
Apache License, 2.0 |
Apache License 2 |
Apache License 2.0 |
Apache Public License 2.0 |
Apache Software License - Version 2.0 |
Apache v2 |
ASL, version 2 |
The Apache License, Version 2.0 |
The Apache Software License, Version 2.0
</licenseMerge>
<licenseMerge>
Apache License |
Apache Software Licenses
</licenseMerge>
<licenseMerge>
BSD License |
BSD license |
BSD licence |
BSD |
The BSD License
</licenseMerge>
<licenseMerge>
BSD 2-Clause License |
BSD 2-Clause license |
</licenseMerge>
<licenseMerge>
BSD 3-Clause License |
BSD 3-Clause |
BSD 3-clause |
BSD-3-Clause |
The BSD 3-Clause License |
New BSD License |
New BSD license
</licenseMerge>
<licenseMerge>
Common Development and Distribution License (CDDL) v1.0 |
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 |
CDDL 1.0
</licenseMerge>
<licenseMerge>
Common Development and Distribution License (CDDL) v1.1 |
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 |
CDDL 1.1 |
Common Development and Distribution License (CDDL), Version 1.1
</licenseMerge>
<licenseMerge>
Common Development and Distribution License |
<!-- Multilicense, choosing CDDL -->
CDDL+GPL |
CDDL+GPL License |
CDDL + GPLv2 with classpath exception
</licenseMerge>
<licenseMerge>
Eclipse Public License, Version 1.0 |
Eclipse Public License 1.0 |
Eclipse Public License - v 1.0
</licenseMerge>
<licenseMerge>
Eclipse Public License, Version 2.0 |
EPL-2.0 |
EPL 2.0
</licenseMerge>
<licenseMerge>
Eclipse Distribution License, Version 1.0 |
Eclipse Distribution License - v 1.0 |
EDL 1.0
</licenseMerge>
<licenseMerge>
MIT License |
The MIT License |
MIT license |
MIT X11 License |
MIT
</licenseMerge>
<licenseMerge>
The GNU General Public License (GPL), Version 2, With Classpath Exception |
GPL2 w/ CPE
</licenseMerge>
<licenseMerge>
GNU Lesser General Public License (LGPL), Version 2.1 |
LGPL, version 2.1 |
GNU Lesser General Public License Version 2.1 |
GNU Lesser General Public License, version 2.1
</licenseMerge>
<licenseMerge>
Common Public License Version 1.0 |
Common Public License - v 1.0
</licenseMerge>
</licenseMerges>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
1 change: 1 addition & 0 deletions rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
under the License.
-->

src/license/NOTICE.template
src/test/resources/opennlp/tools/*/*.txt
src/test/resources/opennlp/tools/*/*.sample
src/test/resources/opennlp/tools/*/*.txt
Expand Down
42 changes: 42 additions & 0 deletions src/license/NOTICE.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Apache OpenNLP
Copyright 2021-2025 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

============================================================================

The snowball stemmers in
opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball
were developed by Martin Porter and Richard Boulton.
The full snowball package is available from
http://snowball.tartarus.org/

============================================================================

The Wordpiece tokenizer in opennlp-tools/main/java/opennlp/tools/tokenize
is taken from https://github.com/robrua/easy-bert licensed under

The MIT License (MIT)

Copyright (c) 2019 Rob Rua

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

============================================================================
16 changes: 16 additions & 0 deletions src/license/THIRD-PARTY.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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.
#

0 comments on commit dff06c8

Please sign in to comment.