You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/08/28 20:32:43 UTC

[maven] branch maven-3.8.x updated: Improve license handling

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

michaelo pushed a commit to branch maven-3.8.x
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/maven-3.8.x by this push:
     new 547dfdd  Improve license handling
547dfdd is described below

commit 547dfddb2ef02f44d9f2d0730348eaedfcd2e126
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Wed Jan 22 09:25:24 2020 +0100

    Improve license handling
    
    * Stream line the output of the license listing
    * Exclude jsoup from final distribution since we only need its license information
    * Use proper SPDX ID for our license
    
    This closes #317
---
 apache-maven/pom.xml                                  |  6 +++---
 .../src/main/appended-resources/META-INF/LICENSE.vm   | 19 +++++++++++--------
 .../licenses/{ASL-2.0.txt => Apache-2.0.txt}          |  0
 apache-maven/src/main/assembly/component.xml          |  1 +
 4 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 2cc6ca3..a4cf039 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -79,10 +79,10 @@ under the License.
         </exclusion>
       </exclusions>
     </dependency>
+    <!--  This is included in Wagon HTTP.
+          We are just making the dependency explicit
+          in order to ease license attribution -->
     <dependency>
-      <!-- this is included in Wagon Http
-           we are just making the dependency explicit
-           in order to ease license attribution -->
       <groupId>org.jsoup</groupId>
       <artifactId>jsoup</artifactId>
       <scope>runtime</scope>
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 25ac46f..43357d1 100644
--- a/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
+++ b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
@@ -18,21 +18,21 @@
 ##
 
 
-Apache Maven includes a number of components and libraries with separate 
-copyright notices and license terms. Your use of those components are 
-subject to the terms and conditions of the following licenses: 
+Apache Maven includes a number of components and libraries with separate
+copyright notices and license terms. Your use of those components are
+subject to the terms and conditions of the following licenses:
 ##
 #set ( $apacheMavenGroupIds = [ "org.apache.maven", "org.apache.maven.wagon", "org.apache.maven.resolver",
                                 "org.apache.maven.shared" ] )
 #set ( $MITLicenseNames = [ "MIT License", "MIT license", "The MIT License" ] )
 #foreach ( $project in $projects )
-#**##foreach ( $license in $project.licenses)
+#**##foreach ( $license in $project.licenses )
 #*  *##set ( $groupId = $project.artifact.groupId )
 #*  *##set ( $directory = 'lib' )
 #*  *##if ( !$apacheMavenGroupIds.contains( $groupId ) )
 #*    *### advertise about each non-Maven dependency
 #*    *###
-#*    *### infer SPDX license code
+#*    *### infer SPDX license id
 #*    *##if ( $license.name == "COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0" )
 #*      *##set ( $spdx = 'CDDL-1.0' )
 #*    *##elseif ( $MITLicenseNames.contains( $license.name ) )
@@ -40,7 +40,7 @@ subject to the terms and conditions of the following licenses:
 #*    *##elseif ( $license.name == "Eclipse Public License, Version 1.0" )
 #*      *##set ( $spdx = 'EPL-1.0' )
 #*    *##elseif ( $license.url.contains( "www.apache.org/licenses/LICENSE-2.0" ) )
-#*      *##set ( $spdx = 'ASL-2.0' )
+#*      *##set ( $spdx = 'Apache-2.0' )
 #*    *##else
 #*      *### unrecognized license will require analysis to know obligations
 #*      *##set ( $spdx = 'unrecognized' )
@@ -68,13 +68,16 @@ subject to the terms and conditions of the following licenses:
 #*    *##else
 #*      *##set ( $downloaded = $locator.getResourceAsFile( "licenses/${spdx}.txt", "licenses/${licFile}" ) )
 #*    *##end
+
 #*    *### add dependency info to output
 
 - $directory/${project.artifact.artifactId}-${project.artifact.version}.jar: $project.artifact.toString().replace( ':eclipse-plugin:', ':jar:' )
-    $project.name
+    Project: $project.name
     #if ( $project.url )Project URL: ${project.url}#end
 
-    License: $license.name#if ( $spdx ) ($spdx)#end  $license.url ($licFile)
+    License: $license.name#if ( $spdx ) ($spdx)#end
+
+    License URL: $license.url ($licFile)
 
 #*  *##end
 #**##end
diff --git a/apache-maven/src/main/appended-resources/licenses/ASL-2.0.txt b/apache-maven/src/main/appended-resources/licenses/Apache-2.0.txt
similarity index 100%
rename from apache-maven/src/main/appended-resources/licenses/ASL-2.0.txt
rename to apache-maven/src/main/appended-resources/licenses/Apache-2.0.txt
diff --git a/apache-maven/src/main/assembly/component.xml b/apache-maven/src/main/assembly/component.xml
index 4f9ff16..657d06b 100644
--- a/apache-maven/src/main/assembly/component.xml
+++ b/apache-maven/src/main/assembly/component.xml
@@ -31,6 +31,7 @@ under the License.
       <outputDirectory>lib</outputDirectory>
       <excludes>
         <exclude>org.codehaus.plexus:plexus-classworlds</exclude>
+        <exclude>org.jsoup:jsoup</exclude>
       </excludes>
     </dependencySet>
   </dependencySets>