You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2017/01/04 22:51:30 UTC

[10/10] asterixdb git commit: ASTERIXDB-1720 - Generate License / Notice Files

ASTERIXDB-1720 - Generate License / Notice Files

- Includes Maven plugin to analyze dependencies & assemble LICENSE &
  NOTICE files using Apache FreeMarker templates, formatting to desired
  LICENSE & NOTICE output format.
- LICENSE & NOTICE files for the 'asterix-server', 'asterix-installer',
  and 'asterix-yarn' binary assemblies are generated by the build
- Automated LICENSE & NOTICE file generation for source release is not
  addressed by this patch
- Fixes ASTERIXDB-1311: Add Rome Apache 2.0 License in the LICENSE/NOTICE

Change-Id: I0963a85cb2be47dbf6bfd8c7f6fec767ef32e7e2
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1402
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/1355c269
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/1355c269
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/1355c269

Branch: refs/heads/master
Commit: 1355c269f50e84087ed24cb0ec9f091d2ce19a5a
Parents: cb5bf33
Author: Michael Blow <mb...@apache.org>
Authored: Wed Jan 4 16:23:31 2017 -0500
Committer: Michael Blow <mb...@apache.org>
Committed: Wed Jan 4 14:50:17 2017 -0800

----------------------------------------------------------------------
 asterixdb/asterix-installer/pom.xml             |   92 ++
 .../src/main/assembly/binary-assembly.xml       |    5 +-
 .../asterix-installer/src/main/licenses/LICENSE | 1515 ------------------
 .../asterix-installer/src/main/licenses/NOTICE  |  722 ---------
 .../license-automation-plugin/pom.xml           |   68 +
 .../apache/asterix/license/DependencySet.java   |   45 +
 .../asterix/license/DownloadLicensesMojo.java   |   89 +
 .../asterix/license/ExtraLicenseFile.java       |   42 +
 .../asterix/license/GenerateFileMojo.java       |  335 ++++
 .../apache/asterix/license/GeneratedFile.java   |   36 +
 .../org/apache/asterix/license/LicenseMojo.java |  315 ++++
 .../org/apache/asterix/license/LicenseSpec.java |  115 ++
 .../org/apache/asterix/license/LicenseUtil.java |  123 ++
 .../org/apache/asterix/license/Override.java    |   43 +
 .../license/SupplementalModelHelper.java        |  134 ++
 .../license/freemarker/IndentDirective.java     |  115 ++
 .../license/freemarker/LoadFileDirective.java   |  115 ++
 .../license/project/LicensedProjects.java       |   57 +
 .../apache/asterix/license/project/Project.java |  159 ++
 asterixdb/asterix-maven-plugins/pom.xml         |    1 +
 asterixdb/asterix-server/pom.xml                |  190 +++
 .../src/main/assembly/binary-assembly.xml       |    2 +-
 .../asterix-server/src/main/licenses/LICENSE    | 1507 -----------------
 .../asterix-server/src/main/licenses/NOTICE     |  734 ---------
 asterixdb/asterix-yarn/pom.xml                  |  106 ++
 .../src/main/assembly/binary-assembly.xml       |    2 +-
 .../asterix-yarn/src/main/licenses/LICENSE      | 1513 -----------------
 asterixdb/asterix-yarn/src/main/licenses/NOTICE |  724 ---------
 .../appended-resources/supplemental-models.xml  |   42 +-
 .../content/asm.objectweb.org_license.html.txt  |   29 +
 ...sh.dev.java.net_public_CDDL_GPL_1_1.html.txt |  204 +++
 .../licenses/content/hamcrest_1.3_LICENSE.txt   |   27 +
 .../content/jdom--jdom--1.0_licenses_jdom.txt   |   51 +
 .../jline.sourceforge.net_license.html.txt      |   32 +
 .../originals/asm.objectweb.org_license.html    |  166 ++
 ...ssfish.dev.java.net_public_CDDL_GPL_1_1.html |  174 ++
 .../jline.sourceforge.net_license.html          |  260 +++
 .../originals/www.antlr.org_license.html        |  148 ++
 .../www.eclipse.org_legal_epl-v10.html          |  261 +++
 .../content/originals/www.json.org_license.html |   40 +
 .../originals/www.slf4j.org_license.html        |   72 +
 .../originals/www.sun.com_cddl_cddl.html        |   48 +
 .../licenses/content/protobuf_2.5.0_LICENSE.txt |   32 +
 ...om_codehaus_paranamer-git_master_LICENSE.txt |   28 +
 ...eedc3f20ab5a998533711d042ba004a8_LICENSE.txt |   19 +
 ...com_mojohaus_appassembler_master_LICENSE.txt |   22 +
 .../licenses/content/stax-utils_LICENSE.txt     |   33 +
 .../content/www.antlr.org_license.html.txt      |   23 +
 .../www.apache.org_licenses_LICENSE-2.0.txt     |  202 +++
 .../www.eclipse.org_legal_epl-v10.html.txt      |  145 ++
 .../content/www.jcraft.com_jsch_LICENSE.txt     |   30 +
 .../content/www.json.org_license.html.txt       |   16 +
 .../content/www.slf4j.org_license.html.txt      |   21 +
 .../content/www.sun.com_cddl_cddl.html.txt      |  240 +++
 .../licenses/content/xmlenc_0.52_LICENSE.txt    |   27 +
 .../main/licenses/templates/asterix-license.ftl |   70 +
 .../main/licenses/templates/asterix-notice.ftl  |   40 +
 .../main/licenses/templates/source_licenses.ftl |  106 ++
 .../main/licenses/templates/source_licenses.ftl |  197 +++
 59 files changed, 4987 insertions(+), 6722 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1355c269/asterixdb/asterix-installer/pom.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/pom.xml b/asterixdb/asterix-installer/pom.xml
index b3bd196..d63a730 100644
--- a/asterixdb/asterix-installer/pom.xml
+++ b/asterixdb/asterix-installer/pom.xml
@@ -41,6 +41,98 @@
   <build>
     <plugins>
       <plugin>
+        <groupId>org.apache.asterix</groupId>
+        <artifactId>license-automation-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <!--<goal>licensedownload</goal>-->
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <generatedFiles>
+            <generatedFile>
+              <template>asterixdb/src/main/licenses/templates/asterix-license.ftl</template>
+              <outputFile>LICENSE</outputFile>
+            </generatedFile>
+            <generatedFile>
+              <template>asterixdb/src/main/licenses/templates/asterix-notice.ftl</template>
+              <outputFile>NOTICE</outputFile>
+            </generatedFile>
+          </generatedFiles>
+          <location>repo/</location>
+          <timeoutSecs>10</timeoutSecs>
+          <extraLicenseMaps>
+            <extraLicenseMap>
+              <file>${basedir}/../asterix-server/target/generated-resources/license_map.json</file>
+              <location>asterix/asterix-server-${project.version}-binary-assembly.zip::repo/</location>
+            </extraLicenseMap>
+          </extraLicenseMaps>
+          <models>
+            <model>${basedir}/../src/main/appended-resources/supplemental-models.xml</model>
+          </models>
+          <downloadDir>${project.build.directory}/generated-resources/license</downloadDir>
+          <excludedScopes>
+            <excludedScope>test</excludedScope>
+          </excludedScopes>
+          <excludes>
+            <exclude>org.apache.asterix:*</exclude>
+            <exclude>org.apache.algebricks:*</exclude>
+            <exclude>org.apache.hyracks:*</exclude>
+          </excludes>
+          <licenseDirectory>${basedir}/../src/main/licenses/content</licenseDirectory>
+          <templateRootDir>${basedir}/../../</templateRootDir>
+          <dependencySets>
+            <dependencySet>
+              <includes>
+                <!-- NOTE! Any changes here must be mirrored in src/main/assembly/binary-assembly.xml -->
+                <include>log4j:log4j</include>
+                <include>org.apache.asterix:asterix-events</include>
+                <include>org.apache.asterix:asterix-common</include>
+                <include>org.apache.zookeeper:zookeeper</include>
+                <include>args4j:args4j</include>
+                <include>log4j:log4j</include>
+                <include>commons-io:commons-io</include>
+                <include>org.slf4j:slf4j-api</include>
+                <include>org.slf4j:slf4j-log4j12</include>
+              </includes>
+              <location>lib</location>
+            </dependencySet>
+            <dependencySet>
+              <includes>
+                <!-- NOTE! Any changes here must be mirrored in src/main/assembly/binary-assembly.xml -->
+                <include>org.apache.hadoop:hadoop-core</include>
+                <include>commons-cli:commons-cli</include>
+                <include>commons-logging:commons-logging</include>
+              </includes>
+              <location>.installer/hadoop-0.20.2/lib</location>
+            </dependencySet>
+            <dependencySet>
+              <includes>
+                <!-- NOTE! Any changes here must be mirrored in src/main/assembly/binary-assembly.xml -->
+                <include>org.apache.zookeeper:zookeeper</include>
+                <include>log4j:log4j</include>
+                <include>org.slf4j:slf4j-api</include>
+              </includes>
+              <location>.installer/zookeeper/lib</location>
+            </dependencySet>
+          </dependencySets>
+          <overrides>
+            <override>
+              <gav>org.apache.zookeeper:zookeeper:3.4.5</gav>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            </override>
+          </overrides>
+          <templateProperties>
+            <assembly>asterix/asterix-server-${project.version}-binary-assembly.zip</assembly>
+            <packageName>Managix Install</packageName>
+          </templateProperties>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.jvnet.jaxb2.maven2</groupId>
         <artifactId>maven-jaxb2-plugin</artifactId>
         <version>0.9.0</version>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1355c269/asterixdb/asterix-installer/src/main/assembly/binary-assembly.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-installer/src/main/assembly/binary-assembly.xml b/asterixdb/asterix-installer/src/main/assembly/binary-assembly.xml
index 4a9bf4a..93ebbd7 100644
--- a/asterixdb/asterix-installer/src/main/assembly/binary-assembly.xml
+++ b/asterixdb/asterix-installer/src/main/assembly/binary-assembly.xml
@@ -70,7 +70,7 @@
       </includes>
     </fileSet>
     <fileSet>
-      <directory>src/main/licenses/</directory>
+      <directory>target/generated-sources</directory>
       <outputDirectory>.</outputDirectory>
       <includes>
         <include>LICENSE*</include>
@@ -86,6 +86,7 @@
   <dependencySets>
     <dependencySet>
       <includes>
+        <!-- NOTE! Any changes here must be mirrored in asterix-installer pom.xml for licensegen -->
         <include>log4j:log4j</include>
         <include>org.apache.asterix:asterix-events</include>
         <include>org.apache.asterix:asterix-common</include>
@@ -101,6 +102,7 @@
     </dependencySet>
     <dependencySet>
       <includes>
+        <!-- NOTE! Any changes here must be mirrored in asterix-installer pom.xml for licensegen -->
         <include>org.apache.hadoop:hadoop-core</include>
         <include>commons-cli:commons-cli</include>
         <include>commons-logging:commons-logging</include>
@@ -110,6 +112,7 @@
     </dependencySet>
     <dependencySet>
       <includes>
+        <!-- NOTE! Any changes here must be mirrored in asterix-installer pom.xml for licensegen -->
         <include>org.apache.zookeeper:zookeeper</include>
         <include>log4j:log4j</include>
         <include>org.slf4j:slf4j-api</include>