asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject [2/5] asterixdb git commit: AsterixDB & Hyracks Source Assemblies, Licensing
Date Sun, 15 Jan 2017 01:33:34 GMT
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks-fullstack-license/src/main/licenses/templates/source_only_licenses.ftl
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks-fullstack-license/src/main/licenses/templates/source_only_licenses.ftl b/hyracks-fullstack/hyracks-fullstack-license/src/main/licenses/templates/source_only_licenses.ftl
new file mode 100644
index 0000000..c4bc541
--- /dev/null
+++ b/hyracks-fullstack/hyracks-fullstack-license/src/main/licenses/templates/source_only_licenses.ftl
@@ -0,0 +1,392 @@
+<#--
+ ! 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.
+-->
+<#macro license files component="AsterixDB WebUI"
+                licenseName="the following license">
+   Portions of the ${component}
+       located at:
+<#if files?is_sequence>
+<#list files as file>
+<#if file?counter < files?size>
+         ${file},
+<#else>
+       and
+         ${file}
+</#if>
+</#list>
+<#else>
+         ${files}
+</#if>
+
+   are available under ${licenseName}:
+---
+<@indent spaces=3 unpad=true wrap=true>
+<#nested>
+</@indent>
+---
+</#macro>
+<#--
+ ! 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.
+-->
+<#macro license files component="AsterixDB WebUI"
+                licenseName="the following license">
+   Portions of the ${component}
+       located at:
+<#assign isare="is"/>
+<#if files?is_sequence>
+<#list files as file>
+<#if file?counter < files?size>
+         ${file},
+<#else>
+       and
+         ${file}
+</#if>
+<#sep>
+<#assign isare="are"/>
+</#sep>
+</#list>
+<#else>
+         ${files}
+</#if>
+
+   ${isare} available under ${licenseName}:
+---
+<@indent spaces=3 unpad=true wrap=true>
+<#nested>
+</@indent>
+---
+</#macro>
+<@license files=["hyracks/hyracks-examples/text-example/textserver/data/file1.txt", "hyracks/hyracks-examples/text-example/textserver/data/file2.txt"]
+          component="test data for the Hyracks textserver examples">
+
+THE FULL PROJECT GUTENBERG LICENSE
+
+PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK
+
+To protect the Project Gutenberg-tm mission of promoting the free distribution
+of electronic works, by using or distributing this work (or any other work
+associated in any way with the phrase "Project Gutenberg"), you agree to comply
+with all the terms of the Full Project Gutenberg-tm License available with this
+file or online at www.gutenberg.org/license.
+
+Section 1.
+General Terms of Use and Redistributing Project Gutenberg-tm electronic works
+
+1.A. By reading or using any part of this Project Gutenberg-tm
+electronic work, you indicate that you have read, understand, agree to and
+accept all the terms of this license and intellectual property
+(trademark/copyright) agreement. If you do not agree to abide by all the terms
+of this agreement, you must cease using and return or destroy all copies of
+Project Gutenberg-tm electronic works in your possession. If you paid a fee for
+obtaining a copy of or access to a Project Gutenberg-tm electronic work and you
+do not agree to be bound by the terms of this agreement, you may obtain a
+refund from the person or entity to whom you paid the fee as set forth in
+paragraph 1.E.8.
+
+1.B. "Project Gutenberg" is a registered trademark. It may only be used on or
+associated in any way with an electronic work by people who agree to be bound
+by the terms of this agreement. There are a few things that you can do with
+most Project Gutenberg-tm electronic works even without complying with the full
+terms of this agreement. See paragraph 1.C below. There are a lot of things you
+can do with Project Gutenberg-tm electronic works if you follow the terms of
+this agreement and help preserve free future access to Project Gutenberg-tm
+electronic works. See paragraph 1.E below.
+
+1.C. The Project Gutenberg Literary Archive Foundation ("the Foundation" or
+PGLAF), owns a compilation copyright in the collection of Project Gutenberg-tm
+electronic works. Nearly all the individual works in the collection are in the
+public domain in the United States. If an individual work is unprotected by
+copyright law in the United States and you are located in the United States, we
+do not claim a right to prevent you from copying, distributing, performing,
+displaying or creating derivative works based on the work as long as all
+references to Project Gutenberg are removed. Of course, we hope that you will
+support the Project Gutenberg-tm mission of promoting free access to electronic
+works by freely sharing Project Gutenberg-tm works in compliance with the terms
+of this agreement for keeping the Project Gutenberg-tm name associated with the
+work. You can easily comply with the terms of this agreement by keeping this
+work in the same format with its attached full Project Gutenberg-tm License
+when you share it without charge with others.
+
+[*] This particular work is one of the few individual works protected by
+copyright law in the United States and most of the remainder of the world,
+included in the Project Gutenberg collection with the permission of the
+copyright holder. Information on the copyright owner for this particular work
+and the terms of use imposed by the copyright holder on this work are set forth
+at the beginning of this work.
+
+1.D. The copyright laws of the place where you are located also govern what you
+can do with this work. Copyright laws in most countries are in a constant state
+of change. If you are outside the United States, check the laws of your country
+in addition to the terms of this agreement before downloading, copying,
+displaying, performing, distributing or creating derivative works based on this
+work or any other Project Gutenberg-tm work. The Foundation makes no
+representations concerning the copyright status of any work in any country
+outside the United States.
+
+1.E. Unless you have removed all references to Project Gutenberg:
+
+1.E.1. The following sentence, with active links to, or other immediate access
+to, the full Project Gutenberg-tm License must appear prominently whenever any
+copy of a Project Gutenberg-tm work (any work on which the phrase "Project
+Gutenberg" appears, or with which the phrase "Project Gutenberg" is associated)
+is accessed, displayed, performed, viewed, copied or distributed:
+
+This eBook is for the use of anyone anywhere in the United States and most
+other parts of the world at no cost and with almost no restrictions whatsoever.
+You may copy it, give it away or re-use it under the terms of the Project
+Gutenberg License included with this eBook or online at www.gutenberg.org. If
+you are not located in the United States, you'll have to check the laws of the
+country where you are located before using this ebook.
+
+1.E.2. If an individual Project Gutenberg-tm electronic work is derived from
+texts not protected by U.S. copyright law (does not contain a notice indicating
+that it is posted with permission of the copyright holder), the work can be
+copied and distributed to anyone in the United States without paying any fees
+or charges. If you are redistributing or providing access to a work with the
+phrase "Project Gutenberg" associated with or appearing on the work, you must
+comply either with the requirements of paragraphs 1.E.1 through 1.E.7 or obtain
+permission for the use of the work and the Project Gutenberg-tm trademark as
+set forth in paragraphs 1.E.8 or 1.E.9.
+
+1.E.3. If an individual Project Gutenberg-tm electronic work is posted with the
+permission of the copyright holder, your use and distribution must comply with
+both paragraphs 1.E.1 through 1.E.7 and any additional terms imposed by the
+copyright holder. Additional terms will be linked to the Project Gutenberg-tm
+License for all works posted with the permission of the copyright holder found
+at the beginning of this work.
+
+1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm License
+terms from this work, or any files containing a part of this work or any other
+work associated with Project Gutenberg-tm.
+
+1.E.5. Do not copy, display, perform, distribute or redistribute this
+electronic work, or any part of this electronic work, without prominently
+displaying the sentence set forth in paragraph 1.E.1 with active links or
+immediate access to the full terms of the Project Gutenberg-tm License.
+
+1.E.6. You may convert to and distribute this work in any binary, compressed,
+marked up, nonproprietary or proprietary form, including any word processing or
+hypertext form. However, if you provide access to or distribute copies of a
+Project Gutenberg-tm work in a format other than "Plain Vanilla ASCII" or other
+format used in the official version posted on the official Project Gutenberg-tm
+web site (www.gutenberg.org), you must, at no additional cost, fee or expense
+to the user, provide a copy, a means of exporting a copy, or a means of
+obtaining a copy upon request, of the work in its original "Plain Vanilla
+ASCII" or other form. Any alternate format must include the full Project
+Gutenberg-tm License as specified in paragraph 1.E.1.
+
+1.E.7. Do not charge a fee for access to, viewing, displaying, performing,
+copying or distributing any Project Gutenberg-tm works unless you comply with
+paragraph 1.E.8 or 1.E.9.
+
+1.E.8. You may charge a reasonable fee for copies of or providing access to or
+distributing Project Gutenberg-tm electronic works provided that
+
+You pay a royalty fee of 20% of the gross profits you derive from the use of
+Project Gutenberg-tm works calculated using the method you already use to
+calculate your applicable taxes. The fee is owed to the owner of the Project
+Gutenberg-tm trademark, but he has agreed to donate royalties under this
+paragraph to the Project Gutenberg Literary Archive Foundation. Royalty
+payments must be paid within 60 days following each date on which you prepare
+(or are legally required to prepare) your periodic tax returns. Royalty
+payments should be clearly marked as such and sent to the Project Gutenberg
+Literary Archive Foundation at the address specified in Section 4, "Information
+about donations to the Project Gutenberg Literary Archive Foundation." You
+provide a full refund of any money paid by a user who notifies you in writing
+(or by e-mail) within 30 days of receipt that s/he does not agree to the terms
+of the full Project Gutenberg-tm License. You must require such a user to
+return or destroy all copies of the works possessed in a physical medium and
+discontinue all use of and all access to other copies of Project Gutenberg-tm
+works.  You provide, in accordance with paragraph 1.F.3, a full refund of any
+money paid for a work or a replacement copy, if a defect in the electronic work
+is discovered and reported to you within 90 days of receipt of the work.  You
+comply with all other terms of this agreement for free distribution of Project
+Gutenberg-tm works.  1.E.9. If you wish to charge a fee or distribute a Project
+Gutenberg-tm electronic work or group of works on different terms than are set
+forth in this agreement, you must obtain permission in writing from both the
+Project Gutenberg Literary Archive Foundation and The Project Gutenberg
+Trademark LLC, the owner of the Project Gutenberg-tm trademark. Contact the
+Foundation as set forth in Section 3 below.
+
+1.F.
+
+1.F.1. Project Gutenberg volunteers and employees expend considerable effort to
+identify, do copyright research on, transcribe and proofread works not
+protected by U.S. copyright law in creating the Project Gutenberg-tm
+collection. Despite these efforts, Project Gutenberg-tm electronic works, and
+the medium on which they may be stored, may contain "Defects," such as, but not
+limited to, incomplete, inaccurate or corrupt data, transcription errors, a
+copyright or other intellectual property infringement, a defective or damaged
+disk or other medium, a computer virus, or computer codes that damage or cannot
+be read by your equipment.
+
+1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the "Right of
+Replacement or Refund" described in paragraph 1.F.3, the Project Gutenberg
+Literary Archive Foundation, the owner of the Project Gutenberg-tm trademark,
+and any other party distributing a Project Gutenberg-tm electronic work under
+this agreement, disclaim all liability to you for damages, costs and expenses,
+including legal fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE,
+STRICT LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
+PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK
+OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE TO YOU FOR
+ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF
+YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.
+
+1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a defect in
+this electronic work within 90 days of receiving it, you can receive a refund
+of the money (if any) you paid for it by sending a written explanation to the
+person you received the work from. If you received the work on a physical
+medium, you must return the medium with your written explanation. The person or
+entity that provided you with the defective work may elect to provide a
+replacement copy in lieu of a refund. If you received the work electronically,
+the person or entity providing it to you may choose to give you a second
+opportunity to receive the work electronically in lieu of a refund. If the
+second copy is also defective, you may demand a refund in writing without
+further opportunities to fix the problem.
+
+1.F.4. Except for the limited right of replacement or refund set forth in
+paragraph 1.F.3, this work is provided to you 'AS-IS', WITH NO OTHER WARRANTIES
+OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
+
+1.F.5. Some states do not allow disclaimers of certain implied warranties or
+the exclusion or limitation of certain types of damages. If any disclaimer or
+limitation set forth in this agreement violates the law of the state applicable
+to this agreement, the agreement shall be interpreted to make the maximum
+disclaimer or limitation permitted by the applicable state law. The invalidity
+or unenforceability of any provision of this agreement shall not void the
+remaining provisions.
+
+1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the
+trademark owner, any agent or employee of the Foundation, anyone providing
+copies of Project Gutenberg-tm electronic works in accordance with this
+agreement, and any volunteers associated with the production, promotion and
+distribution of Project Gutenberg-tm electronic works, harmless from all
+liability, costs and expenses, including legal fees, that arise directly or
+indirectly from any of the following which you do or cause to occur: (a)
+distribution of this or any Project Gutenberg-tm work, (b) alteration,
+modification, or additions or deletions to any Project Gutenberg-tm work, and
+(c) any Defect you cause.
+
+Section 2.
+Information about the Mission of Project Gutenberg-tm Project
+
+Gutenberg-tm is synonymous with the free distribution of electronic works in
+formats readable by the widest variety of computers including obsolete, old,
+middle-aged and new computers. It exists because of the efforts of hundreds of
+volunteers and donations from people in all walks of life.
+
+Volunteers and financial support to provide volunteers with the assistance they
+need are critical to reaching Project Gutenberg-tm's goals and ensuring that
+the Project Gutenberg-tm collection will remain freely available for
+generations to come. In 2001, the Project Gutenberg Literary Archive Foundation
+was created to provide a secure and permanent future for Project Gutenberg-tm
+and future generations. To learn more about the Project Gutenberg Literary
+Archive Foundation and how your efforts and donations can help, see Sections 3
+and 4 and the Foundation information page at www.gutenberg.org
+
+Section 3.
+Information about the Project Gutenberg Literary Archive Foundation
+
+The Project Gutenberg Literary Archive Foundation is a non profit 501(c)(3)
+educational corporation organized under the laws of the state of Mississippi
+and granted tax exempt status by the Internal Revenue Service. The Foundation's
+EIN or federal tax identification number is 64-6221541. Contributions to the
+Project Gutenberg Literary Archive Foundation are tax deductible to the full
+extent permitted by U.S. federal laws and your state's laws.
+
+The Foundation's principal office is located at 4557 Melan Dr. S. Fairbanks,
+AK, 99712., but its volunteers and employees are scattered throughout numerous
+locations. Its business office is located at 809 North 1500 West, Salt Lake
+City, UT 84116, (801) 596-1887. Email contact links and up to date contact
+information can be found at the Foundation's web site and official page at
+www.gutenberg.org/contact
+
+For additional contact information:
+    Dr. Gregory B. Newby Chief Executive and Director
+    gbnewby@pglaf.org
+
+Section 4.
+Information about Donations to the Project Gutenberg Literary Archive
+
+Foundation Project Gutenberg-tm depends upon and cannot survive without
+wide spread public support and donations to carry out its mission of
+increasing the number of public domain and licensed works that can be
+freely distributed in machine readable form accessible by the widest array
+of equipment including outdated equipment. Many small donations ($1 to
+$5,000) are particularly important to maintaining tax exempt status with
+the IRS.
+
+The Foundation is committed to complying with the laws regulating charities and
+charitable donations in all 50 states of the United States. Compliance
+requirements are not uniform and it takes a considerable effort, much paperwork
+and many fees to meet and keep up with these requirements. We do not solicit
+donations in locations where we have not received written confirmation of
+compliance. To SEND DONATIONS or determine the status of compliance for any
+particular state visit www.gutenberg.org/donate
+
+While we cannot and do not solicit contributions from states where we have not
+met the solicitation requirements, we know of no prohibition against accepting
+unsolicited donations from donors in such states who approach us with offers to
+donate.
+
+International donations are gratefully accepted, but we cannot make any
+statements concerning tax treatment of donations received from outside the
+United States. U.S. laws alone swamp our small staff.
+
+Please check the Project Gutenberg Web pages for current donation methods and
+addresses. Donations are accepted in a number of other ways including checks,
+online payments and credit card donations. To donate, please visit:
+www.gutenberg.org/donate
+
+Section 5.
+General Information About Project Gutenberg-tm electronic works.
+
+Professor Michael S. Hart was the originator of the Project Gutenberg-tm
+concept of a library of electronic works that could be freely shared with
+anyone. For forty years, he produced and distributed Project Gutenberg-tm
+eBooks with only a loose network of volunteer support.
+
+Project Gutenberg-tm eBooks are often created from several printed editions,
+all of which are confirmed as not protected by copyright in the U.S. unless a
+copyright notice is included. Thus, we do not necessarily keep eBooks in
+compliance with any particular paper edition.
+
+Most people start at our Web site which has the main PG search facility:
+www.gutenberg.org
+
+This Web site includes information about Project Gutenberg-tm, including how to
+make donations to the Project Gutenberg Literary Archive Foundation, how to
+help produce our new eBooks, and how to subscribe to our email newsletter to
+hear about new eBooks.
+</@license>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-api/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-api/pom.xml b/hyracks-fullstack/hyracks/hyracks-api/pom.xml
index 2c00862..f61a4b0 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-api/pom.xml
@@ -72,7 +72,6 @@
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
-      <version>3.5</version>
     </dependency>
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
index 63c6047..eafc8d2 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
@@ -98,7 +98,6 @@
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
-      <version>3.5</version>
     </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/pom.xml b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/pom.xml
index 73ed8b2..72fbc53 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/pom.xml
@@ -70,7 +70,6 @@
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
-      <version>3.5</version>
     </dependency>
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/pom.xml b/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/pom.xml
index 2f966a3..0e2fd27 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/pom.xml
@@ -58,12 +58,11 @@
     <dependency>
       <groupId>org.apache.hyracks</groupId>
       <artifactId>hyracks-control-common</artifactId>
-      <version>0.2.18-SNAPSHOT</version>
+      <version>${project.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
-      <version>3.5</version>
     </dependency>
     <dependency>
       <groupId>com.e-movimento.tinytools</groupId>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/pom.xml b/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/pom.xml
index 8e62184..6d4ed61 100644
--- a/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/pom.xml
@@ -34,7 +34,6 @@
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
-      <version>3.5</version>
     </dependency>
     <dependency>
       <groupId>org.apache.hyracks</groupId>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml b/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
index 0158068..a4ac6db 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
@@ -55,21 +55,16 @@
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
-      <version>3.5</version>
     </dependency>
     <dependency>
       <groupId>org.apache.hyracks</groupId>
       <artifactId>hyracks-api</artifactId>
       <version>${project.version}</version>
-      <type>jar</type>
-      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hyracks</groupId>
       <artifactId>hyracks-dataflow-common</artifactId>
       <version>${project.version}</version>
-      <type>jar</type>
-      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>commons-io</groupId>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/pom.xml b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/pom.xml
new file mode 100644
index 0000000..5190bbb
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/pom.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! 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.
+ !-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.apache.hyracks</groupId>
+    <artifactId>hyracks-maven-plugins</artifactId>
+    <version>0.2.18-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <packaging>maven-plugin</packaging>
+
+  <artifactId>license-automation-plugin</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.5</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>3.3.9</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-remote-resources-plugin</artifactId>
+      <version>1.5</version>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.freemarker</groupId>
+      <artifactId>freemarker</artifactId>
+      <version>2.3.23</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-annotations</artifactId>
+      <version>2.8.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.2.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-model</artifactId>
+      <version>3.3.9</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>3.0.22</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+      <version>3.0</version>
+    </dependency>
+  </dependencies>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/DependencySet.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/DependencySet.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/DependencySet.java
new file mode 100644
index 0000000..8e91be4
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/DependencySet.java
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.maven.license;
+
+import java.util.List;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+public class DependencySet {
+
+    @SuppressWarnings("unused") // set by Maven configuration
+    private String location;
+
+    @SuppressWarnings({"unused", "MismatchedQueryAndUpdateOfCollection"}) // set by Maven configuration
+    private List<String> includes;
+
+    private List<Pattern> patterns;
+
+    public String getLocation() {
+        return location;
+    }
+
+    public List<Pattern> getPatterns() {
+        if (patterns == null) {
+            patterns = includes.stream().map(LicenseMojo::compileGAWildcardPattern).collect(Collectors.toList());
+        }
+        return patterns;
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/DownloadLicensesMojo.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/DownloadLicensesMojo.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/DownloadLicensesMojo.java
new file mode 100644
index 0000000..8219dfc
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/DownloadLicensesMojo.java
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.maven.license;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.project.ProjectBuildingException;
+
+@Mojo(name = "licensedownload",
+        requiresProject = true,
+        requiresDependencyResolution = ResolutionScope.TEST,
+        defaultPhase = LifecyclePhase.GENERATE_RESOURCES)
+public class DownloadLicensesMojo extends LicenseMojo {
+
+    @Parameter(required = true)
+    private File downloadDir;
+
+    @Parameter(defaultValue = "30")
+    private int timeoutSecs;
+
+    @java.lang.Override
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        try {
+            init();
+            addDependenciesToLicenseMap();
+            final int timeoutMillis = (int) TimeUnit.SECONDS.toMillis(timeoutSecs);
+            //noinspection ResultOfMethodCallIgnored
+            downloadDir.mkdirs();
+            AtomicInteger counter = new AtomicInteger();
+            getLicenseMap().values().parallelStream().forEach(entry -> {
+                final int i = counter.incrementAndGet();
+                final String url = entry.getLicense().getUrl();
+                String fileName = entry.getLicense().getContentFile(false);
+                doDownload(timeoutMillis, i, url, fileName);
+            });
+        } catch (IOException | ProjectBuildingException e) {
+            throw new MojoExecutionException("Unexpected exception: " + e, e);
+        }
+    }
+
+    private void doDownload(int timeoutMillis, int id, String url, String fileName) {
+        try {
+            HttpURLConnection conn = (HttpURLConnection)new URL(url).openConnection();
+            conn.setConnectTimeout(timeoutMillis);
+            conn.setReadTimeout(timeoutMillis);
+            conn.setRequestMethod("GET");
+            final File outFile = new File(downloadDir, fileName);
+            getLog().info("[" + id + "] " + url + " -> " + outFile);
+            final InputStream is = conn.getInputStream();
+            FileWriter writer = new FileWriter(outFile);
+            IOUtils.copy(is, writer, conn.getContentEncoding());
+            writer.close();
+            getLog().info("[" + id + "] ...done!");
+        } catch (IOException e) {
+            getLog().warn("[" + id + "] ...error downloading " + url + ": " + e);
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/ExtraLicenseFile.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/ExtraLicenseFile.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/ExtraLicenseFile.java
new file mode 100644
index 0000000..025260b
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/ExtraLicenseFile.java
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.maven.license;
+
+import java.io.File;
+
+public class ExtraLicenseFile {
+    private File file;
+    private String location;
+    private boolean additive = true;
+
+    public String getLocation() {
+        return location;
+    }
+
+    public void setLocation(String location) {
+        this.location = location;
+    }
+
+    public File getFile() {
+        return file;
+    }
+
+    public void setFile(File file) {
+        this.file = file;
+    }
+
+    public boolean isAdditive() {
+        return additive;
+    }
+
+    public void setAdditive(boolean additive) {
+        this.additive = additive;
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GenerateFileMojo.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GenerateFileMojo.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GenerateFileMojo.java
new file mode 100644
index 0000000..3dfbb1a
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GenerateFileMojo.java
@@ -0,0 +1,344 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.maven.license;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.function.BiConsumer;
+import java.util.function.Predicate;
+import java.util.function.UnaryOperator;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.regex.Pattern;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SequenceWriter;
+import freemarker.cache.FileTemplateLoader;
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+import org.apache.hyracks.maven.license.freemarker.IndentDirective;
+import org.apache.hyracks.maven.license.freemarker.LoadFileDirective;
+import org.apache.hyracks.maven.license.project.LicensedProjects;
+import org.apache.hyracks.maven.license.project.Project;
+import org.apache.commons.io.IOUtils;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.project.ProjectBuildingException;
+
+@Mojo(name = "generate",
+        requiresProject = true,
+        requiresDependencyResolution = ResolutionScope.TEST)
+public class GenerateFileMojo extends LicenseMojo {
+
+    public static final Pattern FOUNDATION_PATTERN = Pattern.compile("^\\s*This product includes software developed " +
+                    "(at|by) The Apache Software Foundation \\(http://www.apache.org/\\).\\s*$".replace(" ", "\\s+"),
+            Pattern.DOTALL | Pattern.MULTILINE);
+
+    public static final Comparator<String> WHITESPACE_NORMALIZED_COMPARATOR =
+            (o1, o2) -> o1.replaceAll("\\s+", " ").compareTo(o2.replaceAll("\\s+", " "));
+
+    @Parameter(required = true)
+    private File templateRootDir;
+
+    @Parameter(defaultValue = "${project.build.directory}/generated-sources")
+    private File outputDir;
+
+    @Parameter
+    private List<GeneratedFile> generatedFiles = new ArrayList<>();
+
+    @Parameter(defaultValue = "${project.build.sourceEncoding}")
+    private String encoding;
+
+    @Parameter
+    private File licenseMapOutputFile;
+
+    @Parameter
+    private List<ExtraLicenseFile> extraLicenseMaps = new ArrayList<>();
+
+    @Parameter
+    protected Map<String, String> templateProperties = new HashMap<>();
+
+    @Parameter
+    private boolean stripFoundationAssertionFromNotices = true;
+
+    private SortedMap<String, SortedSet<Project>> noticeMap;
+
+    @java.lang.Override
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        try {
+            init();
+            readExtraMaps();
+            addDependenciesToLicenseMap();
+            resolveLicenseContent();
+            resolveNoticeFiles();
+            resolveLicenseFiles();
+            rebuildLicenseContentProjectMap();
+            buildNoticeProjectMap();
+            persistLicenseMap();
+            combineCommonGavs();
+            generateFiles();
+        } catch (IOException | TemplateException | ProjectBuildingException e) {
+            throw new MojoExecutionException("Unexpected exception: " + e, e);
+        }
+    }
+
+    private void resolveLicenseContent() throws IOException {
+        Set<LicenseSpec> licenseSpecs = new HashSet<>();
+        for (LicensedProjects licensedProjects : licenseMap.values()) {
+            licenseSpecs.add(licensedProjects.getLicense());
+        }
+        licenseSpecs.addAll(urlToLicenseMap.values());
+        for (LicenseSpec license : licenseSpecs) {
+            if (license.getContent() == null) {
+                getLog().debug("Resolving content for " + license.getUrl() + " (" + license.getContentFile() + ")");
+                File cFile = new File(license.getContentFile());
+                if (!cFile.isAbsolute()) {
+                    cFile = new File(licenseDirectory, license.getContentFile());
+                }
+                if (!cFile.exists()) {
+                    getLog().warn("MISSING: license content file (" + cFile + ") for url: " + license.getUrl());
+                    license.setContent("MISSING: " + license.getContentFile() + " (" + license.getUrl() + ")");
+                } else {
+                    StringWriter sw = new StringWriter();
+                    LicenseUtil.readAndTrim(sw, cFile);
+                    license.setContent(sw.toString());
+                }
+            }
+        }
+    }
+
+    private void combineCommonGavs() {
+        for (LicensedProjects licensedProjects : licenseMap.values()) {
+            Map<String, Project> projectMap = new HashMap<>();
+            for (Iterator<Project> iter = licensedProjects.getProjects().iterator(); iter.hasNext(); ) {
+                Project project = iter.next();
+                if (projectMap.containsKey(project.gav())) {
+                    Project first = projectMap.get(project.gav());
+                    first.setLocation(first.getLocation() + "," + project.getLocation());
+                    iter.remove();
+                } else {
+                    projectMap.put(project.gav(), project);
+                }
+            }
+        }
+    }
+
+    private void generateFiles() throws TemplateException, IOException {
+        Map<String, Object> props = getProperties();
+
+        Configuration config = new Configuration();
+        config.setTemplateLoader(new FileTemplateLoader(templateRootDir));
+        for (GeneratedFile generation : generatedFiles) {
+            Template template = config.getTemplate(generation.getTemplate());
+
+            if (template == null) {
+                throw new IOException("Could not load template " + generation.getTemplate());
+            }
+
+            outputDir.mkdirs();
+            final File file = new File(outputDir, generation.getOutputFile());
+            getLog().info("Writing " + file + "...");
+            try (final FileWriter writer = new FileWriter(file)) {
+                template.process(props, writer);
+            }
+        }
+    }
+
+    protected Map<String, Object> getProperties() {
+        Map<String, Object> props = new HashMap<>();
+        props.put("indent", new IndentDirective());
+        props.put("loadfile", new LoadFileDirective());
+        props.put("project", project);
+        props.put("noticeMap", noticeMap.entrySet());
+        props.put("licenseMap", licenseMap.entrySet());
+        props.put("licenses", urlToLicenseMap.values());
+        props.putAll(templateProperties);
+        return props;
+    }
+
+    private void readExtraMaps() throws IOException {
+        final ObjectMapper objectMapper = new ObjectMapper();
+        for (ExtraLicenseFile extraLicenseFile : extraLicenseMaps) {
+            for (LicensedProjects projects :
+                    objectMapper.readValue(extraLicenseFile.getFile(), LicensedProjects[].class)) {
+                LicenseSpec spec = urlToLicenseMap.get(projects.getLicense().getUrl());
+                if (spec != null) {
+                    // TODO(mblow): probably we should always favor the extra map...
+                    // propagate any license content we may have with what already has been loaded
+                    if (projects.getLicense().getContent() != null &&
+                            spec.getContent() == null) {
+                        spec.setContent(projects.getLicense().getContent());
+                    }
+                    // propagate any license displayName we may have with what already has been loaded
+                    if (projects.getLicense().getDisplayName() != null &&
+                            spec.getDisplayName() == null) {
+                        spec.setDisplayName(projects.getLicense().getDisplayName());
+                    }
+                }
+                for (Project project : projects.getProjects()) {
+                    project.setLocation(extraLicenseFile.getLocation());
+                    addProject(project, projects.getLicense(), extraLicenseFile.isAdditive());
+                }
+            }
+        }
+    }
+
+    private void persistLicenseMap() throws IOException {
+        if (licenseMapOutputFile != null) {
+            licenseMapOutputFile.getParentFile().mkdirs();
+            SequenceWriter sw = new ObjectMapper().writerWithDefaultPrettyPrinter()
+                    .writeValues(licenseMapOutputFile).init(true);
+            for (LicensedProjects entry : licenseMap.values()) {
+                sw.write(entry);
+            }
+            sw.close();
+        }
+    }
+
+    private void rebuildLicenseContentProjectMap() {
+        int counter = 0;
+        Map<String, LicensedProjects> licenseMap2 = new TreeMap<>(WHITESPACE_NORMALIZED_COMPARATOR);
+        for (LicensedProjects lps : licenseMap.values()) {
+            for (Project project : lps.getProjects()) {
+                String licenseText = project.getLicenseText();
+                if (licenseText == null) {
+                    getLog().warn("Using license other than from within artifact: " + project.gav());
+                    licenseText = lps.getLicense().getContent();
+                }
+                if (!licenseMap2.containsKey(licenseText)) {
+                    LicenseSpec spec = lps.getLicense();
+                    if (!licenseText.equals(lps.getLicense().getContent())) {
+                        spec = new LicenseSpec(new ArrayList<>(), licenseText, null, spec.getDisplayName(),
+                                spec.getMetric(), spec.getUrl() + (counter++));
+                    }
+                    licenseMap2.put(licenseText, new LicensedProjects(spec));
+                }
+                licenseMap2.get(licenseText).addProject(project);
+            }
+        }
+        licenseMap = licenseMap2;
+    }
+
+    private Set<Project> getProjects() {
+        Set<Project> projects = new HashSet<>();
+        licenseMap.values().forEach(p -> projects.addAll(p.getProjects()));
+        return projects;
+    }
+
+    private void buildNoticeProjectMap() {
+        noticeMap = new TreeMap<>(WHITESPACE_NORMALIZED_COMPARATOR);
+        for (Project project : getProjects()) {
+            final String noticeText = project.getNoticeText();
+            if (noticeText == null) {
+                continue;
+            }
+            if (!noticeMap.containsKey(noticeText)) {
+                noticeMap.put(noticeText, new TreeSet<>(Project.PROJECT_COMPARATOR));
+            }
+            noticeMap.get(noticeText).add(project);
+        }
+    }
+
+    private void resolveNoticeFiles() throws MojoExecutionException, IOException {
+        resolveArtifactFiles("NOTICE", entry -> entry.getName().matches("(.*/|^)" + "NOTICE" + "(.txt)?"),
+                Project::setNoticeText,
+                text -> stripFoundationAssertionFromNotices ? FOUNDATION_PATTERN.matcher(text).replaceAll("") : text);
+    }
+
+    private void resolveLicenseFiles() throws MojoExecutionException, IOException {
+        resolveArtifactFiles("LICENSE", entry -> entry.getName().matches("(.*/|^)" + "LICENSE" + "(.txt)?"),
+                Project::setLicenseText, UnaryOperator.identity());
+    }
+
+    private void resolveArtifactFiles(final String name, Predicate<JarEntry> filter,
+                                      BiConsumer<Project, String> consumer, UnaryOperator<String> contentTransformer)
+            throws MojoExecutionException, IOException {
+        for (Project project : getProjects()) {
+            File artifactFile = new File(project.getArtifactPath());
+            if (!artifactFile.exists()) {
+                throw new MojoExecutionException("Artifact file " + artifactFile + " does not exist!");
+            } else if (!artifactFile.getName().endsWith(".jar")) {
+                getLog().info("Skipping unknown artifact file type: " + artifactFile);
+                continue;
+            }
+            try (JarFile jarFile = new JarFile(artifactFile)) {
+                SortedMap<String, JarEntry> matches = gatherMatchingEntries(jarFile,
+                        filter);
+                if (matches.isEmpty()) {
+                    getLog().warn("No " + name + " file found for " + project.gav());
+                } else {
+                    if (matches.size() > 1) {
+                        getLog().warn("Multiple " + name + " files found for " + project.gav() + ": " + matches.keySet()
+                                + "; taking first");
+                    } else {
+                        getLog().info(project.gav() + " has " + name + " file: " + matches.keySet());
+                    }
+                    resolveContent(project, jarFile, matches.values().iterator().next(),
+                            contentTransformer, consumer, name);
+                }
+            }
+        }
+    }
+
+    private void resolveContent(Project project, JarFile jarFile, JarEntry entry, UnaryOperator<String> transformer,
+                                BiConsumer<Project, String> contentConsumer, final String name) throws IOException {
+        String text = IOUtils.toString(jarFile.getInputStream(entry), StandardCharsets.UTF_8);
+        text = transformer.apply(text);
+        text = LicenseUtil.trim(text);
+        if (text.length() == 0) {
+            getLog().warn("Ignoring empty " + name + " file ( " + entry + ") for " + project.gav());
+        } else {
+            contentConsumer.accept(project, text);
+            getLog().debug("Resolved " + name + " text for " + project.gav() + ": \n" + text);
+        }
+    }
+
+    private SortedMap<String, JarEntry> gatherMatchingEntries(JarFile jarFile, Predicate<JarEntry> filter) {
+        SortedMap<String, JarEntry> matches = new TreeMap<>();
+        Enumeration<JarEntry> entries = jarFile.entries();
+        while (entries.hasMoreElements()) {
+            JarEntry entry = entries.nextElement();
+            if (filter.test(entry)) {
+                matches.put(entry.getName(), entry);
+            }
+        }
+        return matches;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GeneratedFile.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GeneratedFile.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GeneratedFile.java
new file mode 100644
index 0000000..1b36109
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GeneratedFile.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.maven.license;
+
+public class GeneratedFile {
+
+    @SuppressWarnings("unused") // set by Maven plugin configuration
+    private String template;
+
+    @SuppressWarnings("unused") // set by Maven plugin configuration
+    private String outputFile;
+
+    public String getOutputFile() {
+        return outputFile;
+    }
+
+    public String getTemplate() {
+        return template;
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseMojo.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseMojo.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseMojo.java
new file mode 100644
index 0000000..ea5c878
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseMojo.java
@@ -0,0 +1,322 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.maven.license;
+
+import java.io.File;
+import java.lang.*;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+import org.apache.hyracks.maven.license.project.LicensedProjects;
+import org.apache.hyracks.maven.license.project.Project;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.model.License;
+import org.apache.maven.model.Model;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectBuilder;
+import org.apache.maven.project.ProjectBuildingException;
+import org.apache.maven.project.inheritance.ModelInheritanceAssembler;
+
+public abstract class LicenseMojo extends AbstractMojo {
+
+    @Parameter
+    protected List<Override> overrides = new ArrayList<>();
+
+    @Parameter
+    protected String [] models = new String [0];
+
+    @Parameter
+    protected List<LicenseSpec> licenses = new ArrayList<>();
+
+    @Parameter
+    protected Set<String> excludedScopes = new HashSet<>();
+
+    @Parameter
+    protected List<String> excludes = new ArrayList<>();
+
+    @Parameter
+    protected List<DependencySet> dependencySets = new ArrayList<>();
+
+    @Parameter( defaultValue = "${project}", readonly = true )
+    protected MavenProject project;
+
+    @Parameter( property = "localRepository", required = true, readonly = true )
+    private ArtifactRepository localRepository;
+
+    @Parameter( property = "project.remoteArtifactRepositories", required = true, readonly = true )
+    private List<ArtifactRepository> remoteRepositories;
+
+    @Component( role = MavenProjectBuilder.class )
+    protected MavenProjectBuilder projectBuilder;
+
+    @Component
+    private ModelInheritanceAssembler assembler;
+
+    @Parameter ( required = true )
+    private String location;
+
+    @Parameter ( required = true )
+    protected File licenseDirectory;
+
+    private Map<String, MavenProject> projectCache = new HashMap<>();
+
+    private Map<String, Model> supplementModels;
+
+    private List<Pattern> excludePatterns;
+
+    Map<String, LicenseSpec> urlToLicenseMap = new HashMap<>();
+    Map<String, LicensedProjects> licenseMap = new TreeMap<>();
+
+    protected Map<String, LicensedProjects> getLicenseMap() {
+        return licenseMap;
+    }
+
+    protected void init() throws MojoExecutionException, MalformedURLException,
+            ProjectBuildingException {
+        excludedScopes.add("system");
+        excludePatterns = compileExcludePatterns();
+        supplementModels = SupplementalModelHelper.loadSupplements(getLog(), models);
+        buildUrlLicenseMap();
+    }
+
+    protected void addDependenciesToLicenseMap() throws ProjectBuildingException {
+        Map<MavenProject, List<Pair<String, String>>> dependencyLicenseMap = gatherDependencies();
+        for (Map.Entry<MavenProject, List<Pair<String, String>>> dep : dependencyLicenseMap.entrySet()) {
+            final MavenProject depProject = dep.getKey();
+            String depLocation = dependencySets.isEmpty() ? location : getIncludedLocation(depProject.getArtifact());
+            if (isExcluded(depProject.getArtifact())) {
+                getLog().debug("skipping " + depProject + " [excluded]");
+            } else if (depLocation == null) {
+                getLog().debug("skipping " + depProject + " [not included in dependency sets]");
+            } else {
+                addDependencyToLicenseMap(depProject, dep.getValue(), depLocation);
+            }
+        }
+    }
+
+    private void addDependencyToLicenseMap(MavenProject depProject, List<Pair<String, String>> depLicenses,
+                                           String depLocation) {
+        final String depGav = toGav(depProject);
+        getLog().debug("adding " + depGav + ", location: " + depLocation);
+        if (depLicenses.size() > 1) {
+            Collections.sort(depLicenses, (o1, o2) -> {
+                final LicenseSpec l1 = urlToLicenseMap.get(o1.getLeft());
+                final LicenseSpec l2 = urlToLicenseMap.get(o2.getLeft());
+                return Integer.compare(l1 != null ? l1.getMetric() : LicenseSpec.UNDEFINED_LICENSE_METRIC,
+                        l2 != null ? l2.getMetric() : LicenseSpec.UNDEFINED_LICENSE_METRIC);
+            });
+            getLog().warn("Multiple licenses for " + depGav + ": " + depLicenses
+                    + "; taking first or lowest metric.");
+        } else if (depLicenses.isEmpty()) {
+            getLog().error("No license defined for " + depGav);
+            depLicenses.add(new ImmutablePair<>("MISSING_LICENSE", "MISSING LICENSE"));
+        }
+        Pair<String, String> key = depLicenses.get(0);
+        String licenseUrl = key.getLeft();
+        final String displayName = key.getRight();
+        if (!urlToLicenseMap.containsKey(licenseUrl)) {
+            // assuming we've not already mapped it, annotate the URL with artifact info, if not an actual URL
+            try {
+                getLog().debug("- URL: " + new URL(licenseUrl));
+                // life is good
+            } catch (MalformedURLException e) {
+                // we encounter this a lot.  Log a warning, and use an annotated key
+                final String fakeLicenseUrl = depGav.replaceAll(":", "--") + "_" + licenseUrl;
+                getLog().warn("- URL for " + depGav + " is malformed: " + licenseUrl + "; using: "
+                        + fakeLicenseUrl);
+                licenseUrl = fakeLicenseUrl;
+            }
+        }
+        addProject(new Project(depProject, depLocation, depProject.getArtifact().getFile()),
+                new LicenseSpec(licenseUrl, displayName), true);
+    }
+
+    protected void addProject(Project project, LicenseSpec spec, boolean additive) {
+        String licenseUrl = spec.getUrl();
+        LicenseSpec license = urlToLicenseMap.get(licenseUrl);
+        if (license == null) {
+            license = spec;
+            urlToLicenseMap.put(licenseUrl, license);
+            for (String alias : license.getAliasUrls()) {
+                if (!urlToLicenseMap.containsKey(alias)) {
+                    urlToLicenseMap.put(alias ,license);
+                }
+            }
+        }
+        licenseUrl = license.getUrl();
+        LicensedProjects entry = licenseMap.get(licenseUrl);
+        if (entry == null) {
+            entry = new LicensedProjects(license);
+            licenseMap.put(licenseUrl, entry);
+        }
+        if (additive || entry.getProjects().contains(project)) {
+            entry.addProject(project);
+        }
+    }
+
+    private void buildUrlLicenseMap() throws MojoExecutionException {
+        for (LicenseSpec license : licenses) {
+            if (urlToLicenseMap.put(license.getUrl() ,license) != null) {
+                throw new MojoExecutionException("Duplicate URL mapping: " + license.getUrl());
+            }
+            for (String alias : license.getAliasUrls()) {
+                if (urlToLicenseMap.put(alias ,license) != null) {
+                    throw new MojoExecutionException("Duplicate URL mapping: " + alias);
+                }
+            }
+        }
+    }
+
+    protected Map<MavenProject, List<Pair<String, String>>> gatherDependencies() throws ProjectBuildingException {
+        Map<MavenProject, List<Pair<String, String>>> dependencyLicenseMap = new HashMap<>();
+        Map<String, MavenProject> dependencyGavMap = new HashMap<>();
+
+        gatherProjectDependencies(project, dependencyLicenseMap, dependencyGavMap);
+        for (Override override : overrides) {
+            String gav = override.getGav();
+            MavenProject dep = dependencyGavMap.get(gav);
+            if (dep == null) {
+                getLog().warn("Unused override dependency " + gav + "; ignoring...");
+            } else {
+                final List<Pair<String, String>> newUrl = Collections.singletonList(
+                        new ImmutablePair<>(override.getUrl(), override.getName()));
+                List<Pair<String, String>> prev = dependencyLicenseMap.put(dep, newUrl);
+                if (!prev.isEmpty()) {
+                    getLog().warn("NOTICE: replacing license(s) " + prev + " for dependency " + gav + " with "
+                            + newUrl);
+                }
+            }
+        }
+        return dependencyLicenseMap;
+    }
+
+    private void gatherProjectDependencies(MavenProject project, Map<MavenProject,
+            List<Pair<String, String>>> dependencyLicenseMap, Map<String, MavenProject> dependencyGavMap)
+            throws ProjectBuildingException {
+        final Set dependencyArtifacts = project.getArtifacts();
+        if (dependencyArtifacts != null) {
+            for (Object depArtifactObj : dependencyArtifacts) {
+                final Artifact depArtifact = (Artifact) depArtifactObj;
+                if (!excludedScopes.contains(depArtifact.getScope())) {
+                    MavenProject dep = resolveDependency(depArtifact);
+                    dep.setArtifact(depArtifact);
+                    dependencyGavMap.put(toGav(dep), dep);
+                    List<Pair<String, String>> licenseUrls = new ArrayList<>();
+                    for (Object license : dep.getLicenses()) {
+                        final License license1 = (License) license;
+                        String url = license1.getUrl() != null ? license1.getUrl()
+                                : (license1.getName() != null ? license1.getName()
+                                : "LICENSE_EMPTY_NAME_URL");
+                        licenseUrls.add(new ImmutablePair<>(url, license1.getName()));
+                    }
+                    dependencyLicenseMap.put(dep, licenseUrls);
+                }
+            }
+        }
+    }
+
+    protected MavenProject resolveDependency(Artifact depObj) throws ProjectBuildingException {
+        String key = depObj.getGroupId() + ":" + depObj.getArtifactId() + ":" + depObj.getVersion();
+
+        MavenProject depProj = projectCache.get(key);
+
+        if (depProj == null) {
+            try {
+                depProj = projectBuilder.buildFromRepository(depObj, remoteRepositories, localRepository, false);
+            } catch (ProjectBuildingException e) {
+                throw new ProjectBuildingException(key, "Error creating dependent artifacts", e);
+            }
+
+            Model supplement = supplementModels.get(
+                    SupplementalModelHelper.generateSupplementMapKey(depObj.getGroupId(), depObj.getArtifactId()));
+            if (supplement != null) {
+                Model merged = SupplementalModelHelper.mergeModels(assembler, depProj.getModel(), supplement);
+                Set<String> origLicenses = depProj.getModel().getLicenses().stream().map(License::getUrl)
+                        .collect(Collectors.toSet());
+                Set<String> newLicenses = merged.getLicenses().stream().map(License::getUrl)
+                        .collect(Collectors.toSet());
+                if (!origLicenses.equals(newLicenses)) {
+                    getLog().warn("license list for " + toGav(depProj)
+                            + " changed with supplemental model; was: " + origLicenses
+                            + ", now: " + newLicenses);
+                }
+                depProj = new MavenProject(merged);
+                depProj.setArtifact( depObj );
+                depProj.setVersion( depObj.getVersion() );
+            }
+            depProj.getArtifact().setScope(depObj.getScope());
+            projectCache.put(key, depProj);
+        }
+        return depProj;
+    }
+
+    private String toGav(MavenProject dep) {
+        return dep.getGroupId() + ":" + dep.getArtifactId() + ":" + dep.getVersion();
+    }
+
+    protected List<Pattern> compileExcludePatterns() {
+        List<Pattern> patterns = new ArrayList<>();
+        for (String exclude : excludes) {
+            patterns.add(compileGAWildcardPattern(exclude));
+        }
+        return patterns;
+    }
+
+    public static Pattern compileGAWildcardPattern(String spec) {
+        return Pattern.compile(spec.replace(".", "\\.").replace("*", "[^:]*"));
+    }
+
+    protected boolean isExcluded(Artifact artifact) {
+        for (Pattern exclude : excludePatterns) {
+            if (exclude.matcher(artifact.getGroupId() + ":" + artifact.getArtifactId()).matches()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    protected String getIncludedLocation(Artifact artifact) {
+        for (DependencySet set : dependencySets) {
+            for (Pattern include : set.getPatterns()) {
+                if (include.matcher(artifact.getGroupId() + ":" + artifact.getArtifactId()).matches()) {
+                    return set.getLocation();
+                }
+            }
+        }
+        return null;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseSpec.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseSpec.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseSpec.java
new file mode 100644
index 0000000..f2ff5dd
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseSpec.java
@@ -0,0 +1,115 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.maven.license;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class LicenseSpec {
+
+    public static final int DEFAULT_METRIC = 100;
+    public static final int UNDEFINED_LICENSE_METRIC = 999;
+
+    public static final String BAD_CHARS = "[ \"#$%&'()*+,/:;<=>\\[\\]^`\\{\\|\\}~]";
+    private String url;
+    private String contentFile;
+    private List<String> aliasUrls = new ArrayList<>();
+    private String displayName;
+    private int metric = DEFAULT_METRIC;
+    private String content;
+
+    @SuppressWarnings("unused")
+    public LicenseSpec() {
+        // called by Maven configuration
+    }
+
+    @JsonCreator
+    public LicenseSpec(@JsonProperty("aliasUrls") List<String> aliasUrls, @JsonProperty("content") String content,
+                       @JsonProperty("contentFile") String contentFile, @JsonProperty("displayName") String displayName,
+                       @JsonProperty("metric") int metric, @JsonProperty("url") String url) {
+        this.aliasUrls = aliasUrls;
+        this.content = content;
+        this.contentFile = contentFile;
+        this.displayName = displayName;
+        this.metric = metric;
+        this.url = url;
+    }
+
+    public LicenseSpec(String url, String displayName) {
+        this.url = url;
+        if (displayName != null) {
+            this.displayName = displayName;
+        }
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public String getContentFile() {
+        return getContentFile(true);
+    }
+
+    @SuppressWarnings("squid:S1166")
+    public String getContentFile(boolean fixupExtension) {
+        if (contentFile == null) {
+            String file;
+            try {
+                URI uri = new URI(url);
+                file = ((uri.getHost() != null ? uri.getHost() : "")
+                        + uri.getPath()).replaceAll(BAD_CHARS, "_");
+            } catch (URISyntaxException e) {
+                file = url.replaceAll(BAD_CHARS, "_");
+            }
+            return (!fixupExtension || file.endsWith(".txt")) ? file : file + ".txt";
+        } else {
+            return contentFile;
+        }
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public List<String> getAliasUrls() {
+        return aliasUrls;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public int getMetric() {
+        return metric;
+    }
+
+    public void setDisplayName(String displayName) {
+        this.displayName = displayName;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseUtil.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseUtil.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseUtil.java
new file mode 100644
index 0000000..8983160
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseUtil.java
@@ -0,0 +1,141 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.maven.license;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+
+public class LicenseUtil {
+
+    private static int wrapLength = 80;
+    private static int wrapThreshold = 100;
+
+    private LicenseUtil() {
+    }
+
+    public static void setWrapLength(int wrapLength) {
+        LicenseUtil.wrapLength = wrapLength;
+    }
+
+    public static void setWrapThreshold(int wrapThreshold) {
+        LicenseUtil.wrapThreshold = wrapThreshold;
+    }
+
+    public static String trim(String input) throws IOException {
+        try (BufferedReader reader = new BufferedReader(new StringReader(input))) {
+            reader.mark(input.length() + 1);
+            StringWriter sw = new StringWriter();
+            trim(sw, reader);
+            return sw.toString();
+        }
+    }
+
+    public static String process(String input, boolean unpad, boolean wrap) throws IOException {
+        try (BufferedReader reader = new BufferedReader(new StringReader(input))) {
+            reader.mark(input.length() + 1);
+            StringWriter sw = new StringWriter();
+            trim(sw, reader, unpad, wrap);
+            sw.append('\n');
+            return sw.toString();
+        }
+    }
+
+    public static void readAndTrim(Writer out, File file) throws IOException {
+        try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
+            reader.mark((int) file.length() * 2);
+            trim(out, reader);
+        }
+    }
+
+    private static void trim(Writer out, BufferedReader reader) throws IOException {
+        trim(out, reader, true, true);
+    }
+
+    private static void trim(Writer out, BufferedReader reader, boolean unpad, boolean wrap) throws IOException {
+        Pair<Integer, Integer> result = null;
+        if (unpad || wrap) {
+            result = analyze(reader);
+            reader.reset();
+        }
+        doTrim(out, reader, unpad ? result.getLeft() : 0,
+                wrap && (result.getRight() > wrapThreshold) ? wrapLength : Integer.MAX_VALUE);
+    }
+
+    private static void doTrim(Writer out, BufferedReader reader, int extraPadding, int wrapLength) throws IOException {
+        boolean head = true;
+        int empty = 0;
+        for (String line = reader.readLine(); line != null; line = reader.readLine() ) {
+            if ("".equals(line.trim())) {
+                if (!head) {
+                    empty++;
+                }
+            } else {
+                head = false;
+                for (; empty > 0; empty--) {
+                    out.append('\n');
+                }
+                String trimmed = line.substring(extraPadding);
+                int leadingWS = trimmed.length() - trimmed.trim().length();
+                while (trimmed.length() > wrapLength) {
+                    int cut = trimmed.lastIndexOf(' ', wrapLength);
+                    cut = Math.max(cut, trimmed.lastIndexOf('\t', wrapLength));
+                    if (cut != -1) {
+                        out.append(trimmed.substring(0, cut));
+                        out.append('\n');
+                        trimmed = trimmed.substring(cut + 1);
+                    } else {
+                        out.append(trimmed.substring(0, wrapLength));
+                        out.append('\n');
+                        trimmed = trimmed.substring(wrapLength);
+                    }
+                    for (int i = 0; i < leadingWS; i++) {
+                        trimmed = ' ' + trimmed;
+                    }
+                }
+                out.append(trimmed);
+                empty++;
+            }
+        }
+    }
+
+    private static Pair<Integer, Integer> analyze(BufferedReader reader) throws IOException {
+        int freeSpaces = Integer.MAX_VALUE;
+        int maxLineLength = 0;
+        for (String line = reader.readLine(); line != null; line = reader.readLine()) {
+            // trim trailing WS
+            String rightTrimmed = line.replaceFirst("\\s*$", "");
+            if ("".equals(rightTrimmed)) {
+                // ignore empty lines
+                continue;
+            }
+            String fullyTrimmed = line.trim();
+            freeSpaces = Math.min(freeSpaces,  rightTrimmed.length() - fullyTrimmed.length());
+            maxLineLength = Math.max(maxLineLength, fullyTrimmed.length());
+        }
+        return new ImmutablePair<>(freeSpaces, maxLineLength);
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/43b40b68/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/Override.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/Override.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/Override.java
new file mode 100644
index 0000000..c99a047
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/Override.java
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+package org.apache.hyracks.maven.license;
+
+public class Override  {
+
+    @SuppressWarnings("unused") // set by Maven plugin configuration
+    private String url;
+
+    @SuppressWarnings("unused") // set by Maven plugin configuration
+    private String gav;
+
+    @SuppressWarnings("unused") // set by Maven plugin configuration
+    private String name;
+
+    public String getGav() {
+        return gav;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public String getName() {
+        return name;
+    }
+}


Mime
View raw message