You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2020/03/15 17:28:03 UTC

[isis] 10/31: ISIS-2094: supplemental licenses

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2278
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 413797f20d1a8b625cb34ab20465a7f8ea4cd7b3
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Mar 7 10:33:20 2020 +0000

    ISIS-2094: supplemental licenses
---
 .../modules/ROOT/pages/cutting-a-release.adoc      | 15 ++--
 scripts/checkmissinglicenses.groovy                |  8 +-
 .../src/main/resources/supplemental-models.xml     | 99 +++-------------------
 3 files changed, 26 insertions(+), 96 deletions(-)

diff --git a/antora/components/comguide/modules/ROOT/pages/cutting-a-release.adoc b/antora/components/comguide/modules/ROOT/pages/cutting-a-release.adoc
index 7081d03..44b1c21 100644
--- a/antora/components/comguide/modules/ROOT/pages/cutting-a-release.adoc
+++ b/antora/components/comguide/modules/ROOT/pages/cutting-a-release.adoc
@@ -124,13 +124,12 @@ The parent `pom.xml` of each releasable module specifies the RAT Maven plugin, w
 To run the RAT tool, use:
 
 [source,bash,subs="attributes+"]
+.find unapproved/missing licenses
 ----
 mvn org.apache.rat:apache-rat-plugin:check -D rat.numUnapprovedLicenses=100
 
-pushd ..
-for a in `/bin/find . -name rat.txt -print`; do grep '!???' $a; done
-for a in `/bin/find . -name rat.txt -print`; do grep '!AL' $a; done
-popd
+for a in `/bin/find .. -name rat.txt -print`; do grep '!???' $a; done
+for a in `/bin/find .. -name rat.txt -print`; do grep '!AL' $a; done
 ----
 
 where `rat.numUnapprovedLicenses` property is set to a high figure, temporarily overriding the default value of 0.
@@ -147,9 +146,11 @@ Investigate and fix any reported violations, typically by either:
 Once you've fixed all issues, confirm once more that `apache-rat-plugin` no longer reports any license violations, this time leaving the `rat.numUnapprovedLicenses` property to its default, 0:
 
 [source,bash]
+.verify no unapproved/missing licenses
 ----
-mvn org.apache.rat:apache-rat-plugin:check -D rat.numUnapprovedLicenses=0 -o && \
-for a in `find . -name rat.txt -print`; do grep '!???' $a; done
+mvn org.apache.rat:apache-rat-plugin:check -D rat.numUnapprovedLicenses=0
+
+for a in `/bin/find .. -name rat.txt -print`; do grep '!???' $a; done
 ----
 
 === Missing License Check
@@ -171,7 +172,7 @@ Once this is done, capture the missing license information using:
 
 [source,bash,subs="attributes+"]
 ----
-mvn license:download-licenses && \
+mvn license:download-licenses
 groovy ../scripts/checkmissinglicenses.groovy
 ----
 
diff --git a/scripts/checkmissinglicenses.groovy b/scripts/checkmissinglicenses.groovy
index ed6cd64..e5c6684 100644
--- a/scripts/checkmissinglicenses.groovy
+++ b/scripts/checkmissinglicenses.groovy
@@ -33,12 +33,14 @@ import javax.xml.transform.stream.*
 // phase 1: find missing dependencies from each of the license.xml files
 //
 
-def currentDir=new File(".")
+def parentDir=new File("..")
 def missing = []
 
-currentDir.eachFileRecurse { file ->
+parentDir.eachFileRecurse { file ->
+
   if ( file.name == "licenses.xml" ) {
 
+    println file.canonicalPath
 
     def fileXml = new XmlSlurper().parseText(file.text)
 
@@ -64,7 +66,7 @@ missing = missing.unique().sort()
 //
 // phase 2: convert existing supplemental model entries into list form
 //
-def supModelsFile = new File("src/main/appended-resources/supplemental-models.xml")
+def supModelsFile = new File("../supplemental-model/src/main/resources/supplemental-models.xml")
 def supModelsXml = new XmlSlurper().parseText(supModelsFile.text)
 
 def supplements = []
diff --git a/supplemental-model/src/main/resources/supplemental-models.xml b/supplemental-model/src/main/resources/supplemental-models.xml
index cb0fa43..307ff9f 100644
--- a/supplemental-model/src/main/resources/supplemental-models.xml
+++ b/supplemental-model/src/main/resources/supplemental-models.xml
@@ -15,12 +15,13 @@
 
     <supplement>
         <project>
-            <groupId>aopalliance</groupId>
-            <artifactId>aopalliance</artifactId>
-            <version>1.0</version>
+            <groupId>org.codehaus.jettison</groupId>
+            <artifactId>jettison</artifactId>
+            <version>1.2</version>
             <licenses>
                 <license>
-                    <name>Public Domain</name>
+                    <name>Apache License, v2.0</name>
+                    <url>http://www.apache.org/licenses/</url>
                 </license>
             </licenses>
         </project>
@@ -28,92 +29,18 @@
 
     <supplement>
         <project>
-          <groupId>javax.transaction</groupId>
-          <artifactId>transaction-api</artifactId>
-          <version>1.1</version>
-          <name>Java Transaction API (JTA)</name>
-          <organization>
-            <name>Oracle Corp</name>
-            <url>http://www.oracle.com/</url>
-          </organization>
-          <licenses>
-            <license>
-              <name>Common Development and Distribution License (CDDL) v1.0</name>
-              <url>https://glassfish.java.net/public/CDDLv1.0.html</url>
-            </license>
-          </licenses>
-        </project>
-      </supplement>
-
-    <supplement>
-        <project>
-            <groupId>net.jcip</groupId>
-            <artifactId>jcip-annotations</artifactId>
-            <version>1.0</version>
-            <licenses>
-                <license>
-                     <name>Creative Commons Attribution 2.5 License</name>
-                     <url>http://creativecommons.org/licenses/by/2.5/</url>
-                     <distribution>repo</distribution>          
-                </license>
-            </licenses>
-        </project>
-    </supplement>
-     
-    <supplement>
-        <project>
-            <groupId>org.sonatype.spice</groupId>
-            <artifactId>model-builder</artifactId>
-            <version>1.3</version>
-            <name>Maven Shared Model</name>
-            <organization>
-                <name>Sonatype, Inc</name>
-                <url>http://www.sonatype.org/</url>
-            </organization>
-            <licenses>
-                <license>
-                    <name>The Apache Software License, Version 2.0</name>
-                    <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-                </license>
-            </licenses>
-        </project>
-    </supplement>
-
-    <supplement>
-        <project>
-            <groupId>de.agilecoders.maven</groupId>
-            <artifactId>maven-parent-config</artifactId>
-            <version>0.3.5</version>
-            <name>Maven Parent Config</name>
-            <organization>
-                <name>AgileCoders</name>
-                <url>https://github.com/agile-coders</url>
-            </organization>
-            <licenses>
-                <license>
-                    <name>The Apache Software License, Version 2.0</name>
-                    <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-                </license>
-            </licenses>
-        </project>
-    </supplement>
-
-    <supplement>
-        <project>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jsr173_api</artifactId>
-            <version>1.0</version>
-            <name>JSR173 API</name>
+            <groupId>javax.transaction</groupId>
+            <artifactId>transaction-api</artifactId>
+            <version>1.1</version>
+            <name>Java Transaction API (JTA)</name>
             <organization>
-                <name>Sun Microsystems</name>
-                <url>http://www.sun.com/</url>
+                <name>Oracle Corp</name>
+                <url>http://www.oracle.com/</url>
             </organization>
             <licenses>
                 <license>
-                    <name>
-                        COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-                    </name>
-                    <url>http://www.sun.com/cddl/cddl.html</url>
+                    <name>Common Development and Distribution License (CDDL) v1.0</name>
+                    <url>https://glassfish.java.net/public/CDDLv1.0.html</url>
                 </license>
             </licenses>
         </project>