-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
LICENSE.vm
76 lines (71 loc) · 3.45 KB
/
LICENSE.vm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
##
## 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.
##
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)
#* *##set ( $groupId = $project.artifact.groupId )
#* *##set ( $directory = 'lib' )
#* *##if ( !$apacheMavenGroupIds.contains( $groupId ) )
#* *### 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' )
#* *##elseif ( $MITLicenseNames.contains( $license.name ) )
#* *##set ( $spdx = 'MIT' )
#* *##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' )
#* *##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
#* *###
#* *### Classworlds is in boot directory, not in lib
#* *##if ( $project.artifact.artifactId == "plexus-classworlds" )
#* *##set ( $directory = 'boot' )
#* *##end
#* *###
#* *### copy license file to lib/$artifactId.license
#* *##set ( $licFile = $directory + '/' + $project.artifact.artifactId + '.license' )
#* *##set ( $downloaded = $locator.getResourceAsFile( "licenses/${spdx}.txt", "licenses/${licFile}" ) )
#* *### add dependency info to output
- $directory/${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 $license.url ($licFile)
#* *##end
#**##end
#end