| 1 |
## |
| 2 |
## Licensed to the Apache Software Foundation (ASF) under one |
| 3 |
## or more contributor license agreements. See the NOTICE file |
| 4 |
## distributed with this work for additional information |
| 5 |
## regarding copyright ownership. The ASF licenses this file |
| 6 |
## to you under the Apache License, Version 2.0 (the |
| 7 |
## "License"); you may not use this file except in compliance |
| 8 |
## with the License. You may obtain a copy of the License at |
| 9 |
## |
| 10 |
## http://www.apache.org/licenses/LICENSE-2.0 |
| 11 |
## |
| 12 |
## Unless required by applicable law or agreed to in writing, |
| 13 |
## software distributed under the License is distributed on an |
| 14 |
## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 |
## KIND, either express or implied. See the License for the |
| 16 |
## specific language governing permissions and limitations |
| 17 |
## under the License. |
| 18 |
## |
| 19 |
|
| 20 |
|
| 21 |
Apache Maven includes a number of components and libraries with separate |
| 22 |
copyright notices and license terms. Your use of those components are |
| 23 |
subject to the terms and conditions of the following licenses: |
| 24 |
## |
| 25 |
#set ( $apacheMavenGroupIds = [ "org.apache.maven", "org.apache.maven.wagon", "org.apache.maven.resolver", |
| 26 |
"org.apache.maven.shared" ] ) |
| 27 |
#set ( $MITLicenseNames = [ "MIT License", "MIT license", "The MIT License" ] ) |
| 28 |
#foreach ( $project in $projects ) |
| 29 |
#**##foreach ( $license in $project.licenses ) |
| 30 |
#* *##set ( $groupId = $project.artifact.groupId ) |
| 31 |
#* *##set ( $directory = 'lib' ) |
| 32 |
#* *##if ( !$apacheMavenGroupIds.contains( $groupId ) ) |
| 33 |
#* *### advertise about each non-Maven dependency |
| 34 |
#* *### |
| 35 |
#* *### infer SPDX license id |
| 36 |
#* *##if ( $MITLicenseNames.contains( $license.name ) ) |
| 37 |
#* *##set ( $spdx = 'MIT' ) |
| 38 |
#* *##elseif ( $license.name == "Eclipse Public License, Version 1.0" ) |
| 39 |
#* *##set ( $spdx = 'EPL-1.0' ) |
| 40 |
#* *##elseif ( $license.name == "Eclipse Public License, Version 2.0" ) |
| 41 |
#* *##set ( $spdx = 'EPL-2.0' ) |
| 42 |
#* *##elseif ( $license.url.contains( "www.apache.org/licenses/LICENSE-2.0" ) ) |
| 43 |
#* *##set ( $spdx = 'Apache-2.0' ) |
| 44 |
#* *##else |
| 45 |
#* *### unrecognized license will require analysis to know obligations |
| 46 |
#* *##set ( $spdx = 'unrecognized' ) |
| 47 |
#* *##end |
| 48 |
#* *### |
| 49 |
#* *### fix project urls that are wrong in pom |
| 50 |
#* *##if ( $project.url.startsWith( "http://www.eclipse.org/sisu/" ) ) |
| 51 |
#* *##set ( $project.url = 'https://www.eclipse.org/sisu/' ) |
| 52 |
#* *##elseif ( $project.url.startsWith( "https://github.com/google/guava/" ) ) |
| 53 |
#* *##set ( $project.url = 'https://github.com/google/guava/' ) |
| 54 |
#* *##elseif ( $project.url.startsWith( "https://github.com/google/guice/" ) ) |
| 55 |
#* *##set ( $project.url = 'https://github.com/google/guice/' ) |
| 56 |
#* *##end |
| 57 |
#* *### |
| 58 |
#* *### Classworlds is in boot directory, not in lib |
| 59 |
#* *##if ( $project.artifact.artifactId == "plexus-classworlds" ) |
| 60 |
#* *##set ( $directory = 'boot' ) |
| 61 |
#* *##end |
| 62 |
#* *### |
| 63 |
#* *### copy license file to lib/$artifactId.license |
| 64 |
#* *##set ( $licFile = $directory + '/' + $project.artifact.artifactId + '.license' ) |
| 65 |
#* *##if ( $spdx == "MIT" || $spdx == "unrecognized" ) |
| 66 |
#* *### MIT license contains date and copyright that makes the file specific to each artifact |
| 67 |
#* *##set ( $downloaded = $locator.getResourceAsFile( "licenses/${spdx}-${project.artifact.artifactId}-${project.artifact.version}.txt", "licenses/${licFile}" ) ) |
| 68 |
#* *##else |
| 69 |
#* *##set ( $downloaded = $locator.getResourceAsFile( "licenses/${spdx}.txt", "licenses/${licFile}" ) ) |
| 70 |
#* *##end |
| 71 |
|
| 72 |
#* *### add dependency info to output |
| 73 |
|
| 74 |
- $directory/${project.artifact.artifactId}-${project.artifact.version}.jar: $project.artifact.toString().replace( ':eclipse-plugin:', ':jar:' ) |
| 75 |
Project: $project.name |
| 76 |
#if ( $project.url )Project URL: ${project.url}#end |
| 77 |
|
| 78 |
License: $license.name#if ( $spdx ) ($spdx)#end |
| 79 |
|
| 80 |
License URL: $license.url ($licFile) |
| 81 |
|
| 82 |
#* *##end |
| 83 |
#**##end |
| 84 |
#end |