You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/11/16 23:11:48 UTC
[maven] 05/07: [MNG-6771] simplified and documented script
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch MNG-6771
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 8abb9e318eb9fe5d6934af20934d63ed5a52628f
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Nov 16 22:35:34 2019 +0100
[MNG-6771] simplified and documented script
---
.../main/appended-resources/META-INF/LICENSE.vm | 41 +++++++++++-----------
1 file changed, 20 insertions(+), 21 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 cfdaa9d..9bcb20d 100644
--- a/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
+++ b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
@@ -29,43 +29,42 @@ subject to the terms and conditions of the following licenses:
#**##foreach ( $license in $project.licenses)
#* *##set ( $groupId = $project.artifact.groupId )
#* *##if ( !$apacheMavenGroupIds.contains( $groupId ) )
-#* *##set ( $artId = $project.artifact.artifactId )
-#* *##set ( $url = $license.url )
-#* *##set ( $spdx = false )
-#* *##set ( $includeLicense = true )
+#* *### advertise about each non-Maven dependency
#* *###
+#* *### infer SPDX license code
#* *##if ( $license.name == "COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0" )
#* *##set ( $spdx = 'CDDL-1.0' )
-#* *##end
-#* *##if ( $MITLicenseNames.contains( $license.name ) )
+#* *##elseif ( $MITLicenseNames.contains( $license.name ) )
#* *##set ( $spdx = 'MIT' )
-#* *##end
-#* *##if ( $license.name == "Eclipse Public License, Version 1.0" )
+#* *##elseif ( $license.name == "Eclipse Public License, Version 1.0" )
#* *##set ( $spdx = 'EPL-1.0' )
-#* *##end
-#* *##if ( $license.url.contains( "www.apache.org/licenses/LICENSE-2.0" ) )
+#* *##elseif ( $license.url.contains( "www.apache.org/licenses/LICENSE-2.0" ) )
#* *##set ( $spdx = 'ASL-2.0' )
+#* *##else
+#* *### unrecognized license will require analysis to know obligations
+#* *##set ( $spdx = 'unrecognized' )
#* *##end
+#* *###
+#* *### fix project urls that are wrong in pom
#* *##if ( $project.url.startsWith( "http://www.eclipse.org/sisu/" ) )
#* *##set ( $project.url = 'https://www.eclipse.org/sisu/' )
+#* *##elseif ( $project.url.startsWith( "https://github.com/google/guava/" ) )
+#* *##set ( $project.url = 'https://github.com/google/guava/' )
+#* *##elseif ( $project.url.startsWith( "https://github.com/google/guice/" ) )
+#* *##set ( $project.url = 'https://github.com/google/guice/' )
#* *##end
-#* *##if ( $includeLicense )
-#* *##if ( $url || $spdx )
-#* *##set ( $licFile = 'lib/' + $artId + '.license' )
-#* *##if ( $spdx )
-#* *##set ( $downloaded = $locator.getResourceAsFile( "licenses/${spdx}.txt", "licenses/${licFile}" ) )
-#* *##else
-#* *##set ( $downloaded = $locator.getResourceAsFile( $url, "licenses/${licFile}" ) )
-#* *##end
-#* *##end
+#* *###
+#* *### copy license file to lib/$artifactId.license
+#* *##set ( $licFile = 'lib/' + $project.artifact.artifactId + '.license' )
+#* *##set ( $downloaded = $locator.getResourceAsFile( "licenses/${spdx}.txt", "licenses/${licFile}" ) )
+#* *### add dependency info to output
- lib/${project.artifact.artifactId}-${project.artifact.version}.jar: $project.artifact.toString().replace( ':eclipse-plugin:', ':jar:' )
$project.name
#if ( $project.url )Project URL: ${project.url}#end
- License: $license.name#if ( $spdx ) ($spdx)#end#if ( $url ) $url ($licFile)#end
+ License: $license.name#if ( $spdx ) ($spdx)#end $license.url ($licFile)
-#* *##end
#* *##end
#**##end
#end