Great! Here's some example of what I was doing yesterday:
stain@biggiebuntu:~/src/taverna/incubator-taverna-workbench$ mvn apache-rat:check --fail-at-end (the fail-at-end means we don't just see the first failed RAT report) [INFO] BUILD FAILURE [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (default-cli) on project taverna-graph-model: Too many files with unapproved license: 1 See RAT report in: /home/stain/src/taverna/incubator-taverna-workbench/taverna-graph-model/target/rat.txt -> [Help 1] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (default-cli) on project taverna-contextual-views-impl: Too many files with unapproved license: 1 See RAT report in: /home/stain/src/taverna/incubator-taverna-workbench/taverna-contextual-views-impl/target/rat.txt -> [Help 1] Now look in each of these rat.txt files. For instance, in taverna-contextual-views-impl/target/rat.txt > Unapproved licenses: > > > /home/stain/src/taverna/incubator-taverna-workbench/taverna-contextual-views-impl/src/main/resources/annotatedcontextualview.properties First check in the top-level NOTICE file if the file is already described there, e.g. as is the case for ./taverna-graph-model/src/main/jjtree/dotparser.jjt These would eventually need to be resolved - and if they are fine without a header they should be added as an <exclude> to the rat-plugin section in pom.xml (e.g. for text files which can't have comments) Then have a look at the offending file in an editor, and we see it does not have any license header. As a *.properties file we can add it with # comments, as shown at the bottom of https://cwiki.apache.org/confluence/display/TAVERNADEV/2016-09+License+review but different formats have different comment styles. If you find a (c) University of Manchester LGPL header, it can be removed and replaced with the normal ASF header. If you find a file which has an unclear history, e.g. mentions a different license, or unknown people, then for now let's list it with a TODO in the NOTICE file. Any "dummy" *.t2flow test files like "" are made by Taverna team and can get an XML ASF header - you might have to add first: <?xml version="1.0" encoding="UTF-8"?> If you find one that looks like a real scientific workflow (e.g. "sequence_analysis_using_ncbi_blast.t2flow") then we need to flag it in NOTICE to check its origin - it might have been downloaded from myExperiment and would be under a Creative Commons license instead. On 8 September 2016 at 12:23, Thilina Manamgoda <[email protected]> wrote: > HI, > > I can help with that. If you can guide me through the process :) > > thanks, > Thilina. > > On Thu, Sep 8, 2016 at 5:27 AM, 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
