This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new ac4debe8f5 Fix distribution licenses (#1525)
ac4debe8f5 is described below

commit ac4debe8f523e962c18ab4a392371e63663a25a1
Author: Guillaume Nodet <gno...@gmail.com>
AuthorDate: Fri May 17 21:14:22 2024 +0200

    Fix distribution licenses (#1525)
    
    It's really painful to have to rename the file whenever a dependency is 
upgraded, so enhance support for various licenses.
---
 .../main/appended-resources/META-INF/LICENSE.vm    | 17 +++++++----
 .../appended-resources/licenses/BSD-2-Clause.txt   | 24 +++++++++++++++
 .../appended-resources/licenses/BSD-3-Clause.txt   | 28 +++++++++++++++++
 ...txt => CDDL+GPLv2-with-classpath-exception.txt} |  0
 .../licenses/{MIT-slf4j-api-2.0.11.txt => MIT.txt} |  3 +-
 ...nized-aopalliance-1.0.txt => Public-Domain.txt} |  0
 .../licenses/unrecognized-asm-9.6.txt              | 27 -----------------
 .../licenses/unrecognized-jline-3.26.1.txt         | 35 ----------------------
 .../licenses/unrecognized-stax2-api-4.2.1.txt      |  3 --
 9 files changed, 64 insertions(+), 73 deletions(-)

diff --git a/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm 
b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
index b589e36e02..491afcbf98 100644
--- a/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
+++ b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
@@ -39,6 +39,16 @@ subject to the terms and conditions of the following 
licenses:
 #*      *##set ( $spdx = 'EPL-1.0' )
 #*    *##elseif ( $license.url.contains( "www.apache.org/licenses/LICENSE-2.0" 
) )
 #*      *##set ( $spdx = 'Apache-2.0' )
+#*    *##elseif ( $license.name == "BSD-2-Clause" || $license.name == "The BSD 
2-Clause License"
+                    || 
$license.url.contains("www.opensource.org/licenses/bsd-license") )
+#*      *##set ( $spdx = 'BSD-2-Clause' )
+#*    *##elseif ( $license.name == "BSD-3-Clause"
+                    || 
$license.url.contains("opensource.org/licenses/BSD-3-Clause") )
+#*      *##set ( $spdx = 'BSD-3-Clause' )
+#*    *##elseif ( $license.name == "Public Domain" )
+#*      *##set ( $spdx = 'Public-Domain' )
+#*    *##elseif ( $license.name == "CDDL + GPLv2 with classpath exception" )
+#*      *##set ( $spdx = 'CDDL+GPLv2-with-classpath-exception' )
 #*    *##else
 #*      *### unrecognized license will require analysis to know obligations
 #*      *##set ( $spdx = 'unrecognized' )
@@ -60,12 +70,7 @@ subject to the terms and conditions of the following 
licenses:
 #*    *###
 #*    *### copy license file to lib/$artifactId.license
 #*    *##set ( $licFile = $directory + '/' + $project.artifact.artifactId + 
'.license' )
-#*    *##if ( $spdx == "MIT" || $spdx == "unrecognized" )
-#*      *### MIT license contains date and copyright that makes the file 
specific to each artifact
-#*      *##set ( $downloaded = $locator.getResourceAsFile( 
"licenses/${spdx}-${project.artifact.artifactId}-${project.artifact.version}.txt",
 "licenses/${licFile}" ) )
-#*    *##else
-#*      *##set ( $downloaded = $locator.getResourceAsFile( 
"licenses/${spdx}.txt", "licenses/${licFile}" ) )
-#*    *##end
+#*    *##set ( $downloaded = $locator.getResourceAsFile( 
"licenses/${spdx}.txt", "licenses/${licFile}" ) )
 
 #*    *### add dependency info to output
 
diff --git a/apache-maven/src/main/appended-resources/licenses/BSD-2-Clause.txt 
b/apache-maven/src/main/appended-resources/licenses/BSD-2-Clause.txt
new file mode 100644
index 0000000000..04e0d09568
--- /dev/null
+++ b/apache-maven/src/main/appended-resources/licenses/BSD-2-Clause.txt
@@ -0,0 +1,24 @@
+Copyright <YEAR> <COPYRIGHT HOLDER>
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+“AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/apache-maven/src/main/appended-resources/licenses/BSD-3-Clause.txt 
b/apache-maven/src/main/appended-resources/licenses/BSD-3-Clause.txt
new file mode 100644
index 0000000000..fdc6a97e5f
--- /dev/null
+++ b/apache-maven/src/main/appended-resources/licenses/BSD-3-Clause.txt
@@ -0,0 +1,28 @@
+Copyright <YEAR> <COPYRIGHT HOLDER>
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+“AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git 
a/apache-maven/src/main/appended-resources/licenses/unrecognized-javax.annotation-api-1.3.2.txt
 
b/apache-maven/src/main/appended-resources/licenses/CDDL+GPLv2-with-classpath-exception.txt
similarity index 100%
rename from 
apache-maven/src/main/appended-resources/licenses/unrecognized-javax.annotation-api-1.3.2.txt
rename to 
apache-maven/src/main/appended-resources/licenses/CDDL+GPLv2-with-classpath-exception.txt
diff --git 
a/apache-maven/src/main/appended-resources/licenses/MIT-slf4j-api-2.0.11.txt 
b/apache-maven/src/main/appended-resources/licenses/MIT.txt
similarity index 95%
rename from 
apache-maven/src/main/appended-resources/licenses/MIT-slf4j-api-2.0.11.txt
rename to apache-maven/src/main/appended-resources/licenses/MIT.txt
index 8e501b3987..d69be60416 100644
--- a/apache-maven/src/main/appended-resources/licenses/MIT-slf4j-api-2.0.11.txt
+++ b/apache-maven/src/main/appended-resources/licenses/MIT.txt
@@ -1,5 +1,4 @@
- Copyright (c) 2004-2023 QOS.ch
- All rights reserved.
+ Copyright <YEAR> <COPYRIGHT HOLDER>
 
  Permission is hereby granted, free  of charge, to any person obtaining
  a  copy  of this  software  and  associated  documentation files  (the
diff --git 
a/apache-maven/src/main/appended-resources/licenses/unrecognized-aopalliance-1.0.txt
 b/apache-maven/src/main/appended-resources/licenses/Public-Domain.txt
similarity index 100%
rename from 
apache-maven/src/main/appended-resources/licenses/unrecognized-aopalliance-1.0.txt
rename to apache-maven/src/main/appended-resources/licenses/Public-Domain.txt
diff --git 
a/apache-maven/src/main/appended-resources/licenses/unrecognized-asm-9.6.txt 
b/apache-maven/src/main/appended-resources/licenses/unrecognized-asm-9.6.txt
deleted file mode 100644
index 631ee53c53..0000000000
--- a/apache-maven/src/main/appended-resources/licenses/unrecognized-asm-9.6.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-ASM: a very small and fast Java bytecode manipulation framework
-Copyright (c) 2000-2011 INRIA, France Telecom
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-3. Neither the name of the copyright holders nor the names of its
-  contributors may be used to endorse or promote products derived from
-  this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git 
a/apache-maven/src/main/appended-resources/licenses/unrecognized-jline-3.26.1.txt
 
b/apache-maven/src/main/appended-resources/licenses/unrecognized-jline-3.26.1.txt
deleted file mode 100644
index 9739c6993f..0000000000
--- 
a/apache-maven/src/main/appended-resources/licenses/unrecognized-jline-3.26.1.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Copyright (c) 2002-2024, the original author or authors.
-All rights reserved.
-
-https://opensource.org/licenses/BSD-3-Clause
-
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the following
-conditions are met:
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with
-the distribution.
-
-Neither the name of JLine nor the names of its contributors
-may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git 
a/apache-maven/src/main/appended-resources/licenses/unrecognized-stax2-api-4.2.1.txt
 
b/apache-maven/src/main/appended-resources/licenses/unrecognized-stax2-api-4.2.1.txt
deleted file mode 100644
index df1288e781..0000000000
--- 
a/apache-maven/src/main/appended-resources/licenses/unrecognized-stax2-api-4.2.1.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Copyright (c) 2008 FasterXML LLC i...@fasterxml.com
-
-This source code is licensed under standard BSD license, which is compatible 
with all Free and Open Software (OSS) licenses.
\ No newline at end of file

Reply via email to