I guess just to run mvn apache-rat:check and similar, and note the
results for each in the wiki would also be a start.

On 8 September 2016 at 00:57, Gale Naylor <[email protected]> wrote:
>>>Any volunteers? We can add sections at the >>end of the wiki with the
>>>rat output for each.
>
> Volunteers to manually add headers to non-java files, or ?
>
> On Wed, Sep 7, 2016, 8:09 AM Ian Dunlop <[email protected]> wrote:
>
>> Hello,
>>
>> Added page
>>
>> https://cwiki.apache.org/confluence/display/TAVERNADEV/Taverna+Mobile+Licence+Review
>> and linked to the licence review page.
>>
>> Cheers,
>>
>> Ian
>>
>> On 7 September 2016 at 16:02, Ian Dunlop <[email protected]> wrote:
>>
>> > Hello,
>> >
>> > Found a rat plugin for gradle. We need this for the mobile app, no maven
>> > here! I am currently testing it out (and raising minor issues!)
>> >
>> > https://plugins.gradle.org/plugin/org.nosphere.apache.rat
>> >
>> > Cheers,
>> >
>> > Ian
>> >
>> > On 7 September 2016 at 14:50, Stian Soiland-Reyes <[email protected]>
>> > wrote:
>> >
>> >> I've updated the table on
>> >>
>> >> https://cwiki.apache.org/confluence/display/TAVERNADEV/2016-
>> >> 09+License+review
>> >>
>> >> so that now there's now just a (?)-mark  on the repositories where I
>> >> added ASF headers to *.java, but which apache-rat might not have
>> >> checked - e.g. there would be the odd XML file left - perhaps some
>> >> PNGs etc.
>> >>
>> >>
>> >> Any volunteers? We can add sections at the end of the wiki with the
>> >> rat output for each.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> I've added comments to NOTICE where something was unclear and left
>> >> their header in place.. e.g.
>> >>
>> >> https://github.com/apache/incubator-taverna-workbench/blob/
>> >> master/NOTICE#L12
>> >>
>> >> .. which indicate a file I find didn't have any open source license at
>> >> all (copied from a blog).
>> >>
>> >> Each of these should become JIRA issues - at least we would notice in
>> >> the NOTICE file!
>> >>
>> >>
>> >> On 7 September 2016 at 14:47, Stian Soiland-Reyes <[email protected]>
>> >> wrote:
>> >> > Thanks - I did something similar - although now it turns out the
>> >> > "wrong order" with 'package' on top (that was easier with sed)
>> >> >
>> >> > cd incubator-taverna-plugin-bioinformatics/
>> >> > git status
>> >> > git checkout master
>> >> > git pull
>> >> >
>> >> > # files that probably are OK
>> >> > grep -r "Licensed to the Apache Software" . | cut -d : -f 1 > OK
>> >> >
>> >> > # Find Java files - naive
>> >> > grep -r ^package . | grep src | cut -d ":" -f 1 | grep java$  > CHECK
>> >> >
>> >> > # Find the differences
>> >> > grep -v -f OK CHECK  > MISSING
>> >> >
>> >> > # Check there are not any nonsense here
>> >> > head MISSING  | less
>> >> >
>> >> > # Check the current file headers
>> >> > xargs -a MISSING head | less
>> >> >
>> >> > # Remove /***** sillyness
>> >> > cat MISSING | xargs sed -i '\,^.\*\*\*\*\*\*.*, d'
>> >> >
>> >> >  git diff
>> >> >  git commit -m "Removed /*** comments" tav*
>> >> >  git status
>> >> >
>> >> > Now let's add the header.  I put the /* .. */  text in a file
>> >> LICENSE-header.txt
>> >> >
>> >> > vi LICENSE-header.txt
>> >> > /*
>> >> >  * 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.
>> >> >  */
>> >> >
>> >> > cat MISSING | xargs sed -i '/^package/ r LICENSE-header.txt'
>> >> >
>> >> > git diff
>> >> > git commit -m "Added ASF license header" taverna-*
>> >> > git push
>> >> >
>> >> > # Tidy
>> >> > rm CHECK LICENSE-header.txt MISSING OK
>> >> > git status
>> >> >
>> >> > But sadly this means the comment was added below the 'package' line..
>> >> > Sorry about that.
>> >> >
>> >> > On 7 September 2016 at 14:15, Andy Seaborne <[email protected]> wrote:
>> >> >> PS
>> >> >>
>> >> >> /**
>> >> >>  License
>> >> >> */
>> >> >>
>> >> >> then
>> >> >>
>> >> >> package org.apache.taverna ... ;
>> >> >>
>> >> >> is the usual way - not package then license comment.
>> >> >>
>> >> >>         Andy
>> >> >>
>> >> >>
>> >> >> On 07/09/16 14:08, Andy Seaborne wrote:
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> On 07/09/16 12:04, Stian Soiland-Reyes wrote:
>> >> >>>>
>> >> >>>> It should - if the script or maven plugin is able to cleanly remove
>> >> >>>> the old header.
>> >> >>>
>> >> >>>
>> >> >>> I use perl:
>> >> >>>
>> >> >>> undef $/ ;
>> >> >>> s!/.*?\npackage!\npackage!s ;
>> >> >>>
>> >> >>> i.e. remove everything up until the "package" on the start of a
>> line.
>> >> >>>
>> >> >>> This avoids having to match different layouts.
>> >> >>>
>> >> >>>     Andy
>> >> >>>
>> >> >>> #!/usr/bin/perl
>> >> >>> # find . -name \*.java | xargs -n 1 perl -i.bak SCRIPT
>> >> >>>
>> >> >>> undef $/ ;
>> >> >>>
>> >> >>> $_ = <> ;
>> >> >>>
>> >> >>> # Remove initial comments.
>> >> >>>
>> >> >>> s!/.*?\npackage!\npackage!s ;
>> >> >>>
>> >> >>> # print LICENSE
>> >> >>>
>> >> >>> $HEADER=<<'EOF';
>> >> >>> /*
>> >> >>>     Your license goes here.
>> >> >>>  */
>> >> >>> EOF
>> >> >>>
>> >> >>> print $HEADER ;
>> >> >>> print $_ ;
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Stian Soiland-Reyes
>> >> > http://orcid.org/0000-0001-9842-9718
>> >>
>> >>
>> >>
>> >> --
>> >> Stian Soiland-Reyes
>> >> http://orcid.org/0000-0001-9842-9718
>> >>
>> >
>> >
>>



-- 
Stian Soiland-Reyes
http://orcid.org/0000-0001-9842-9718

Reply via email to