Skip to content

Commit

Permalink
[MNG-6414] Add more Apache license header patterns to skip downloadin…
Browse files Browse the repository at this point in the history
…g Apache license

Additional patterns for the Apache license exception list:
"Apache License, Version 2.0"
"The Apache Software License, Version 2.0"
"ASLv2"
"Apache Public License 2.0"

Fixes apache#167
  • Loading branch information
slachiewicz committed Sep 16, 2018
1 parent 10388b3 commit b29277a
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
Expand Up @@ -21,27 +21,27 @@ 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 ( $apacheTxt = "The Apache Software License, Version 2.0" )

#set ( $apacheLicTexts = [ "Apache License, Version 2.0", "The Apache Software License, Version 2.0",
"ASLv2", "Apache Public License 2.0", "Apache 2.0" ] )
#foreach ( $project in $projects )
#foreach ( $license in $project.licenses)
#if ( ! ($apacheTxt == $license.name) )
#set ( $artId = $project.artifact.artifactId)
#set ( $lf = $locator )
#set ( $url = $license.url )
## glass fish URL is now invalid, use a fixed one
#if ($url == "https://glassfish.dev.java.net/public/CDDLv1.0.html")
#set ( $url = 'https://glassfish.java.net/public/CDDLv1.0.html' )
#end
#if ($url)
#set ( $licFile = 'lib/' + $artId + '.license' )
#set ( $downloaded = $lf.getResourceAsFile($url, "licenses/${licFile}") )
#end
#foreach ( $license in $project.licenses)
#if ( !($apacheLicTexts.contains( $license.name)) )
#set ( $artId = $project.artifact.artifactId)
#set ( $lf = $locator )
#set ( $url = $license.url )
## glass fish URL is now invalid, use a fixed one
#if ($url == "https://glassfish.dev.java.net/public/CDDLv1.0.html")
#set ( $url = 'https://glassfish.java.net/public/CDDLv1.0.html' )
#end
#if ($url)
#set ( $licFile = 'lib/' + $artId + '.license' )
#set ( $downloaded = $lf.getResourceAsFile($url, "licenses/${licFile}") )
#end

$project.name #if ($project.url)($project.url)#end $project.artifact
License: $license.name #if ($url) $url ($licFile)#end

#end
#end
#end
#end
#end

0 comments on commit b29277a

Please sign in to comment.