|
1 | 1 | /*
|
2 |
| - This script augments the missing license information in our dependencies. |
3 |
| -*/ |
| 2 | + * This script augments the missing license information in our dependencies. |
| 3 | + */ |
4 | 4 | complete {
|
5 |
| - // license constants |
6 |
| - def apacheLicense = license("The Apache Software License, Version 2.0","http://www.apache.org/licenses/LICENSE-2.0.txt") |
7 |
| - def cddl = license("CDDL","http://www.sun.com/cddl/") |
8 |
| - def lgpl = license("LGPL 2.1","http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html") |
9 |
| - def mitLicense = license("MIT License","http://www.opensource.org/licenses/mit-license.php") |
10 |
| - def bsdLicense = license("BSD License","http://opensource.org/licenses/BSD-2-Clause") |
11 |
| - def jenkinsLicense = license("MIT License","https://www.jenkins.io/mit-license") |
12 |
| - def ccby = license("Creative Commons Attribution License","http://creativecommons.org/licenses/by/2.5") |
| 5 | + // license constants |
| 6 | + def apacheLicense = license("The Apache Software License, Version 2.0", "http://www.apache.org/licenses/LICENSE-2.0.txt") |
| 7 | + def cddl = license("CDDL", "http://www.sun.com/cddl/") |
| 8 | + def lgpl = license("LGPL 2.1", "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html") |
| 9 | + def mitLicense = license("MIT License", "http://www.opensource.org/licenses/mit-license.php") |
| 10 | + def bsdLicense = license("BSD License", "http://opensource.org/licenses/BSD-2-Clause") |
| 11 | + def jenkinsLicense = license("MIT License", "https://www.jenkins.io/mit-license") |
| 12 | + def ccby = license("Creative Commons Attribution License", "http://creativecommons.org/licenses/by/2.5") |
13 | 13 |
|
14 | 14 |
|
15 |
| - match("asm:*") { |
16 |
| - if (dependency.licenses.isEmpty()) |
17 |
| - rewriteLicense([], license("BSD License","http://asm.ow2.org/license.html")) |
18 |
| - } |
| 15 | + match("asm:*") { |
| 16 | + if (dependency.licenses.isEmpty()) |
| 17 | + rewriteLicense([], license("BSD License", "http://asm.ow2.org/license.html")) |
| 18 | + } |
19 | 19 |
|
20 |
| - // Apache components |
21 |
| - // logkit is a part of Avalon |
22 |
| - match(["org.apache.ant:*","commons-jelly:*","log4j:*","avalon-framework:*","logkit:logkit","oro:oro","commons-codec:*","commons-beanutils:*","commons-net:*","commons-cli:*","*:commons-jelly","org.jvnet.hudson:commons-jelly-tags-define","slide:slide-webdavlib"]) { |
23 |
| - if (dependency.licenses.isEmpty()) |
24 |
| - rewriteLicense([], apacheLicense) |
25 |
| - } |
| 20 | + // Apache components |
| 21 | + // logkit is a part of Avalon |
| 22 | + match([ |
| 23 | + "org.apache.ant:*", |
| 24 | + "commons-jelly:*", |
| 25 | + "log4j:*", |
| 26 | + "avalon-framework:*", |
| 27 | + "logkit:logkit", |
| 28 | + "oro:oro", |
| 29 | + "commons-codec:*", |
| 30 | + "commons-beanutils:*", |
| 31 | + "commons-net:*", |
| 32 | + "commons-cli:*", |
| 33 | + "*:commons-jelly", |
| 34 | + "org.jvnet.hudson:commons-jelly-tags-define", |
| 35 | + "slide:slide-webdavlib" |
| 36 | + ]) { |
| 37 | + if (dependency.licenses.isEmpty()) |
| 38 | + rewriteLicense([], apacheLicense) |
| 39 | + } |
26 | 40 |
|
27 |
| - // GlassFish components are dual-licensed between CDDL and GPL+Classpath Exception |
28 |
| - // we elect to take them under CDDL. |
29 |
| - // note that central has a different POM from m.g.o-public (http://repo2.maven.org/maven2/javax/mail/mail/1.4/mail-1.4.pom |
30 |
| - // vs http://maven.glassfish.org/content/groups/public/javax/mail/mail/1.4/mail-1.4.pom), so we aren't using rewriteLicense here |
31 |
| - match(["javax.mail:*","org.jvnet.hudson:activation","org.jvnet:tiger-types","javax.servlet:jstl","javax.xml.stream:stax-api"]) { |
32 |
| - if (dependency.licenses.isEmpty()) |
33 |
| - dependency.licenses=[cddl] |
34 |
| - } |
35 |
| - |
36 |
| -/* TODO |
37 |
| - // according to JSR-250 1.0-20050927.133100 POM, it came from JAX-WS, which is under CDDL. |
38 |
| - match("javax.annotation:jsr250-api") { |
39 |
| - rewriteLicense([], cddl) |
40 |
| - } |
41 |
| -*/ |
| 41 | + // GlassFish components are dual-licensed between CDDL and GPL+Classpath Exception |
| 42 | + // we elect to take them under CDDL. |
| 43 | + // note that central has a different POM from m.g.o-public (http://repo2.maven.org/maven2/javax/mail/mail/1.4/mail-1.4.pom |
| 44 | + // vs http://maven.glassfish.org/content/groups/public/javax/mail/mail/1.4/mail-1.4.pom), so we aren't using rewriteLicense here |
| 45 | + match([ |
| 46 | + "javax.mail:*", |
| 47 | + "org.jvnet.hudson:activation", |
| 48 | + "org.jvnet:tiger-types", |
| 49 | + "javax.servlet:jstl", |
| 50 | + "javax.xml.stream:stax-api" |
| 51 | + ]) { |
| 52 | + if (dependency.licenses.isEmpty()) |
| 53 | + dependency.licenses=[cddl] |
| 54 | + } |
42 | 55 |
|
43 |
| - match("org.jenkins-ci.dom4j:dom4j") { |
44 |
| - rewriteLicense([],license("BSD License","http://dom4j.sourceforge.net/dom4j-1.6.1/license.html")) |
45 |
| - } |
| 56 | + /* TODO |
| 57 | + // according to JSR-250 1.0-20050927.133100 POM, it came from JAX-WS, which is under CDDL. |
| 58 | + match("javax.annotation:jsr250-api") { |
| 59 | + rewriteLicense([], cddl) |
| 60 | + } |
| 61 | + */ |
46 | 62 |
|
47 |
| - match(["org.jenkins-ci.groovy:*"]) { |
48 |
| - // see https://groovy-lang.org/faq.html |
49 |
| - // see http://jmdns.sourceforge.net/license.html |
50 |
| - rewriteLicense([],apacheLicense) |
51 |
| - } |
| 63 | + match("org.jenkins-ci.dom4j:dom4j") { |
| 64 | + rewriteLicense([], license("BSD License", "http://dom4j.sourceforge.net/dom4j-1.6.1/license.html")) |
| 65 | + } |
52 | 66 |
|
53 |
| - match("relaxngDatatype:relaxngDatatype") { |
54 |
| - // see http://sourceforge.net/projects/relaxng/ |
55 |
| - rewriteLicense([],bsdLicense) |
56 |
| - } |
| 67 | + match(["org.jenkins-ci.groovy:*"]) { |
| 68 | + // see https://groovy-lang.org/faq.html |
| 69 | + // see http://jmdns.sourceforge.net/license.html |
| 70 | + rewriteLicense([], apacheLicense) |
| 71 | + } |
57 | 72 |
|
58 |
| - match(["org.kohsuke.jinterop:j-interop","org.kohsuke.jinterop:j-interopdeps"]) { |
59 |
| - rewriteLicense([license("MIT license", "http://www.opensource.org/licenses/mit-license.php")],license("LGPL v3","http://www.j-interop.org/license.html")) |
60 |
| - } |
| 73 | + match("relaxngDatatype:relaxngDatatype") { |
| 74 | + // see http://sourceforge.net/projects/relaxng/ |
| 75 | + rewriteLicense([], bsdLicense) |
| 76 | + } |
61 | 77 |
|
62 |
| - // these are our own modules that have license in the trunk but not in these released versions |
63 |
| - // as we upgrade them, we should just pick up the license info from POM |
64 |
| - match(["*:maven2.1-interceptor","*:lib-jenkins-maven-embedder"]) { |
65 |
| - rewriteLicense([],jenkinsLicense) |
66 |
| - } |
| 78 | + match(["org.kohsuke.jinterop:j-interop", "org.kohsuke.jinterop:j-interopdeps"]) { |
| 79 | + rewriteLicense([license("MIT license", "http://www.opensource.org/licenses/mit-license.php")], license("LGPL v3", "http://www.j-interop.org/license.html")) |
| 80 | + } |
67 | 81 |
|
68 |
| - match("org.codehaus.plexus:plexus-interactivity-api") { |
69 |
| - rewriteLicense([],mitLicense) |
70 |
| - } |
| 82 | + // these are our own modules that have license in the trunk but not in these released versions |
| 83 | + // as we upgrade them, we should just pick up the license info from POM |
| 84 | + match(["*:maven2.1-interceptor", "*:lib-jenkins-maven-embedder"]) { |
| 85 | + rewriteLicense([], jenkinsLicense) |
| 86 | + } |
71 | 87 |
|
72 |
| - match("de.zeigermann.xml:xml-im-exporter:1.1") { |
73 |
| - rewriteLicense([],license("BSD License","http://xml-im-exporter.cvs.sourceforge.net/viewvc/xml-im-exporter/xml-im-exporter/Copying.txt?revision=1.3&view=markup")) |
74 |
| - } |
| 88 | + match("org.codehaus.plexus:plexus-interactivity-api") { |
| 89 | + rewriteLicense([], mitLicense) |
| 90 | + } |
75 | 91 |
|
76 |
| - match("*:sezpoz") { |
77 |
| - // GPL-phobia people react to "GPL" strongly, so accept sezpoz under CDDL |
78 |
| - rewriteLicense([license("CDDL or GPL 2 with Classpath Exception",null)],cddl) |
79 |
| - } |
80 |
| - |
81 |
| - match("net.jcip:jcip-annotations") { |
82 |
| - rewriteLicense([],ccby) |
83 |
| - } |
| 92 | + match("de.zeigermann.xml:xml-im-exporter:1.1") { |
| 93 | + rewriteLicense([], license("BSD License", "http://xml-im-exporter.cvs.sourceforge.net/viewvc/xml-im-exporter/xml-im-exporter/Copying.txt?revision=1.3&view=markup")) |
| 94 | + } |
| 95 | + |
| 96 | + match("*:sezpoz") { |
| 97 | + // GPL-phobia people react to "GPL" strongly, so accept sezpoz under CDDL |
| 98 | + rewriteLicense([license("CDDL or GPL 2 with Classpath Exception", null)], cddl) |
| 99 | + } |
| 100 | + |
| 101 | + match("net.jcip:jcip-annotations") { |
| 102 | + rewriteLicense([], ccby) |
| 103 | + } |
84 | 104 | }
|
0 commit comments