Return-Path: X-Original-To: apmail-apex-dev-archive@minotaur.apache.org Delivered-To: apmail-apex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4EF6A18338 for ; Wed, 23 Sep 2015 23:06:23 +0000 (UTC) Received: (qmail 49228 invoked by uid 500); 23 Sep 2015 23:06:23 -0000 Delivered-To: apmail-apex-dev-archive@apex.apache.org Received: (qmail 49166 invoked by uid 500); 23 Sep 2015 23:06:23 -0000 Mailing-List: contact dev-help@apex.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apex.incubator.apache.org Delivered-To: mailing list dev@apex.incubator.apache.org Received: (qmail 49155 invoked by uid 99); 23 Sep 2015 23:06:22 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2015 23:06:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6C7F61A7CF7 for ; Wed, 23 Sep 2015 23:06:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.001 X-Spam-Level: *** X-Spam-Status: No, score=3.001 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id p0F1CNtHMFAL for ; Wed, 23 Sep 2015 23:06:10 +0000 (UTC) Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com [209.85.160.174]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 5148F20512 for ; Wed, 23 Sep 2015 23:06:09 +0000 (UTC) Received: by ykdg206 with SMTP id g206so57302672ykd.1 for ; Wed, 23 Sep 2015 16:06:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=cO8yNWzJXkVQPZFX+7AId8yPhg93mHNW2QUp01gzI4Q=; b=GjIlH+V0aakYpXD1Hh+6KHuzx9PLW7Tf0eYfUxxBVICeLI40g/DfSYxdmen4jVKg4o HMay4YjrhU1HKyMcQLhv4HBspbmE3ulYuCxmHGxe/12NXE1h/oetnyiB/CMFnugHVVYb hEQAxKw3YjFL3dejC+ham3TEwTi4NqPr8D+uBRJ8bN9OEyfA2F333V+4+U5/holFF0ww PSTSTMrViuf6ELY6Bfl6t0YGJU4gynQ/6KUtySVKbVJ/awmR2T3iHqwIEhuXqqPZIGdU om5Iz3VlvfdjH69L9NPT64AFNjUd1y14CsxjlPc4fGLM2y1+PVngUPhuU8lH0UZxj9km V59w== X-Gm-Message-State: ALoCoQkY3ddO2/xPvVg/I9DVAcBLXu5zikZj7syuaKL2p4Jvmvvk13jje36TV0tQ4Qkogs7GpmXp MIME-Version: 1.0 X-Received: by 10.129.102.10 with SMTP id a10mr26432142ywc.19.1443049568156; Wed, 23 Sep 2015 16:06:08 -0700 (PDT) Received: by 10.129.46.141 with HTTP; Wed, 23 Sep 2015 16:06:08 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Sep 2015 16:06:08 -0700 Message-ID: Subject: Re: License header From: Chetan Narsude To: dev@apex.incubator.apache.org Content-Type: multipart/alternative; boundary=001a11490b70e77357052072283c --001a11490b70e77357052072283c Content-Type: text/plain; charset=UTF-8 Ram, It does have a licensed header which violates the generally followed licensing rules. The first line is blank (there is a issue open to be lenient in that case as I remember I saw sometime ago). There are a few more files with the same viloation. Regardless, I am not saying that it's perfect. But why reinvent the wheel? You can work with the plugin writer like 100 others have done and make it better if you feel that it's not good enough. A better way to find all the files which violate the formatting is to format the files which do not follow the rule, I get the following. It has a few more files than you mentioned: chetan@chubi:~/work/apex$ mvn license:format -Dlicense.skip=false [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Realtime Stream Processing Framework [INFO] DataTorrent API [INFO] Base Library [INFO] Buffer Server [INFO] Streaming Application Manager [INFO] Apex Application Maven archetype [INFO] Apex App Configuration Maven archetype [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Realtime Stream Processing Framework 3.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- license-maven-plugin:2.11:format (default-cli) @ dt-framework --- [INFO] Updating license headers... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building DataTorrent API 3.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- license-maven-plugin:2.11:format (default-cli) @ dt-api --- [INFO] Updating license headers... [INFO] Updating license header in: /home/chetan/work/apex/api/src/main/java/com/datatorrent/api/annotation/Name.java [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Base Library 3.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- license-maven-plugin:2.11:format (default-cli) @ dt-common --- [INFO] Updating license headers... [INFO] Updating license header in: /home/chetan/work/apex/common/src/main/java/com/datatorrent/common/metric/SingleMetricAggregator.java [INFO] Updating license header in: /home/chetan/work/apex/common/src/main/java/com/datatorrent/common/metric/sum/LongSumAggregator.java [INFO] Updating license header in: /home/chetan/work/apex/common/src/main/java/com/datatorrent/common/metric/sum/DoubleSumAggregator.java [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Buffer Server 3.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- license-maven-plugin:2.11:format (default-cli) @ dt-bufferserver --- [INFO] Updating license headers... [INFO] Updating license header in: /home/chetan/work/apex/bufferserver/src/main/java/com/datatorrent/bufferserver/util/VarInt.java [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Streaming Application Manager 3.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- license-maven-plugin:2.11:format (default-cli) @ dt-engine --- [INFO] Updating license headers... [WARNING] Unknown file extension: /home/chetan/work/apex/engine/src/main/scripts/dtcli [INFO] Updating license header in: /home/chetan/work/apex/engine/src/main/java/com/datatorrent/stram/plan/logical/StreamCodecWrapperForPersistance.java [INFO] Updating license header in: /home/chetan/work/apex/engine/src/main/java/com/datatorrent/stram/engine/Slider.java [INFO] Updating license header in: /home/chetan/work/apex/engine/src/main/java/com/datatorrent/stram/stream/PartitionAwareSinkForPersistence.java [INFO] Updating license header in: /home/chetan/work/apex/engine/src/main/java/com/datatorrent/stram/webapp/asm/FieldSignatureVisitor.java [INFO] Updating license header in: /home/chetan/work/apex/engine/src/main/java/com/datatorrent/stram/webapp/asm/CompactAnnotationNode.java [INFO] Updating license header in: /home/chetan/work/apex/engine/src/main/java/com/datatorrent/stram/webapp/asm/CompactFieldNode.java [INFO] Updating license header in: /home/chetan/work/apex/engine/src/main/java/com/datatorrent/stram/api/AppDataSource.java [INFO] Updating license header in: /home/chetan/work/apex/engine/src/main/java/com/datatorrent/stram/util/PubSubWebSocketServlet.java [INFO] Updating license header in: /home/chetan/work/apex/engine/src/test/java/com/datatorrent/stram/plan/StreamPersistanceTests.java [WARNING] Unable to find a comment style definition for some files. You may want to add a custom mapping for the relevant file extensions. [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Apex Application Maven archetype 3.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- license-maven-plugin:2.11:format (default-cli) @ apex-app-archetype --- [INFO] Updating license headers... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Apex App Configuration Maven archetype 3.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- license-maven-plugin:2.11:format (default-cli) @ apex-conf-archetype --- [INFO] Updating license headers... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Realtime Stream Processing Framework ............... SUCCESS [ 0.889 s] [INFO] DataTorrent API .................................... SUCCESS [ 0.162 s] [INFO] Base Library ....................................... SUCCESS [ 0.093 s] [INFO] Buffer Server ...................................... SUCCESS [ 0.072 s] [INFO] Streaming Application Manager ...................... SUCCESS [ 0.408 s] [INFO] Apex Application Maven archetype ................... SUCCESS [ 0.233 s] [INFO] Apex App Configuration Maven archetype ............. SUCCESS [ 0.013 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.521 s [INFO] Finished at: 2015-09-23T16:00:02-07:00 [INFO] Final Memory: 13M/471M [INFO] ------------------------------------------------------------------------ On Wed, Sep 23, 2015 at 4:00 PM, Munagala Ramanath wrote: > When I run that command, I get the same error about Name.java but that file > _does_ have a > license header. > > The files identified by my script as having issues are not shown: > > ============================================================ > 3 Java files with no comments > 0: > > /home/ram/src/apex/apex/engine/src/main/java/com/datatorrent/stram/plan/logical/StreamCodecWrapperForPersistance.java > 1: > > /home/ram/src/apex/apex/engine/src/main/java/com/datatorrent/stram/stream/PartitionAwareSinkForPersistence.java > 2: > > /home/ram/src/apex/apex/engine/src/test/java/com/datatorrent/stram/plan/StreamPersistanceTests.java > ============================================================ > 4 Java files with no matching copyright comment > 0: > > /home/ram/src/apex/apex/engine/src/test/resources/testAppPackage/mydtapp/src/main/java/com/example/mydtapp/RandomNumberGenerator.java > 1: > > /home/ram/src/apex/apex/engine/src/test/resources/testAppPackage/mydtapp/src/main/java/com/example/mydtapp/StdoutOperator.java > 2: > > /home/ram/src/apex/apex/engine/target/test-classes/testAppPackage/mydtapp/src/main/java/com/example/mydtapp/RandomNumberGenerator.java > 3: > > /home/ram/src/apex/apex/engine/target/test-classes/testAppPackage/mydtapp/src/main/java/com/example/mydtapp/StdoutOperator.java > > > Ram > > On Wed, Sep 23, 2015 at 3:46 PM, Thomas Weise > wrote: > > > Ram, > > > > You need to run > > > > mvn license:check -Dlicense.skip=false > > > > I get the following: > > > > [INFO] --- license-maven-plugin:2.11:check (default-cli) @ dt-api --- > > [INFO] Checking licenses... > > [WARNING] Missing header in: > > > > > /home/hdev/devel/dt/Apex/api/src/main/java/com/datatorrent/api/annotation/Name.java > > > > Thomas > > > > > > > > > > On Wed, Sep 23, 2015 at 3:34 PM, Munagala Ramanath > > wrote: > > > > > It's in the output.txt file uploaded with my earlier message but here > is > > an > > > extract from the end of it: > > > > > > ============================================================ > > > 3 Java files with no comments > > > 0: > > > > > > > > > /home/ram/src/apex/apex/engine/src/main/java/com/datatorrent/stram/plan/logical/StreamCodecWrapperForPersistance.java > > > 1: > > > > > > > > > /home/ram/src/apex/apex/engine/src/main/java/com/datatorrent/stram/stream/PartitionAwareSinkForPersistence.java > > > 2: > > > > > > > > > /home/ram/src/apex/apex/engine/src/test/java/com/datatorrent/stram/plan/StreamPersistanceTests.java > > > ============================================================ > > > 4 Java files with no matching copyright comment > > > 0: > > > > > > > > > /home/ram/src/apex/apex/engine/src/test/resources/testAppPackage/mydtapp/src/main/java/com/example/mydtapp/RandomNumberGenerator.java > > > 1: > > > > > > > > > /home/ram/src/apex/apex/engine/src/test/resources/testAppPackage/mydtapp/src/main/java/com/example/mydtapp/StdoutOperator.java > > > 2: > > > > > > > > > /home/ram/src/apex/apex/engine/target/test-classes/testAppPackage/mydtapp/src/main/java/com/example/mydtapp/RandomNumberGenerator.java > > > 3: > > > > > > > > > /home/ram/src/apex/apex/engine/target/test-classes/testAppPackage/mydtapp/src/main/java/com/example/mydtapp/StdoutOperator.java > > > > > > > > > On Wed, Sep 23, 2015 at 2:44 PM, Chetan Narsude < > chetan@datatorrent.com> > > > wrote: > > > > > > > which files are those? > > > > > > > > -- > > > > chetan > > > > > > > > > > > > On Wed, Sep 23, 2015 at 12:51 PM, Munagala Ramanath < > > ram@datatorrent.com > > > > > > > > wrote: > > > > > > > > > Not sure what it's checking but "*mvn license:check*" shows me no > > list > > > of > > > > > files in core. > > > > > Yet, my script finds at least 3 java files with no comments at all. > > > > > > > > > > Ram > > > > > > > > > > On Wed, Sep 23, 2015 at 11:54 AM, Chetan Narsude < > > > chetan@datatorrent.com > > > > > > > > > > wrote: > > > > > > > > > > > mvn license:check > > > > > > mvn license:format > > > > > > > > > > > > At the top level pom does magic for you. > > > > > > > > > > > > On Wednesday, September 23, 2015, Munagala Ramanath < > > > > ram@datatorrent.com > > > > > > > > > > > > wrote: > > > > > > > > > > > > > Thomas and Chris: > > > > > > > > > > > > > > I wrote a Ruby script to automate this process. Currently, it > > makes > > > > no > > > > > > > changes and just > > > > > > > reports what it finds. The script is attached. > > > > > > > > > > > > > > I ran it like this: ruby -w fix-license.rb -f ~/src/apex/apex > > > > > > > output.txt > > > > > > > The output is also attached. > > > > > > > > > > > > > > Let me know if you'd like me to enhance this to actually add > the > > > new > > > > > > > copyright notice to the top of > > > > > > > the files where it does detect some form of copyright notice > > (there > > > > > will > > > > > > > still be a few files where > > > > > > > no such notice was found and those will need manual > > augmentation). > > > > > > > > > > > > > > Ram > > > > > > > > > > > > > > On Tue, Sep 22, 2015 at 9:30 AM, Chris Nauroth < > > > > > cnauroth@hortonworks.com > > > > > > > > > > wrote: > > > > > > > > > > > > > >> Hi Thomas, > > > > > > >> > > > > > > >> I think you are correct. Here is the official Apache > statement > > on > > > > > what > > > > > > to > > > > > > >> do with the source headers: > > > > > > >> > > > > > > >> http://www.apache.org/legal/src-headers.html > > > > > > >> > > > > > > >> > > > > > > >> I think your result (the second example below) matches up with > > > that. > > > > > > >> > > > > > > >> As a reminder, I have a work-in-progress patch for the > non-Java > > > > files > > > > > in > > > > > > >> Apex here: > > > > > > >> > > > > > > >> https://issues.apache.org/jira/browse/APEXCORE-1 > > > > > > >> > > > > > > >> > > > > > > >> It would be nice if we could come up with a script to chop out > > the > > > > > > >> DataTorrent header and replace it with the ASF header. Then, > we > > > > could > > > > > > >> simply run that across *.java in both Apex and Malhar. > > > > > > >> > > > > > > >> --Chris Nauroth > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> On 9/22/15, 9:24 AM, "Thomas Weise" > > > > > >> > > > wrote: > > > > > > >> > > > > > > >> >Hit the wrong button... > > > > > > >> > > > > > > > >> >This question is about the license header for the source > files. > > > > > > Currently > > > > > > >> >we have: > > > > > > >> > > > > > > > >> >/** > > > > > > >> > * Copyright (C) 2015 DataTorrent, Inc. > > > > > > >> > * > > > > > > >> > * Licensed 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. > > > > > > >> > */ > > > > > > >> > > > > > > > >> >The first line needs to go. And a reference to NOTICE needs > to > > be > > > > > added > > > > > > >> as > > > > > > >> >shown below? > > > > > > >> > > > > > > > >> >/* > > > > > > >> > * 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. > > > > > > >> > */ > > > > > > >> > > > > > > > >> >On Tue, Sep 22, 2015 at 9:19 AM, Thomas Weise < > > > > > thomas@datatorrent.com > > > > > > >> > > > > > > > >> >wrote: > > > > > > >> > > > > > > > >> >> There > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > > > > > >> > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > --001a11490b70e77357052072283c--