From rat-dev-awerner@example.org Mon Sep 01 10:45:35 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 66706 invoked from network); 1 Sep 2008 10:45:35 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 1 Sep 2008 10:45:35 -0000
Received: (qmail 56136 invoked by uid 500); 1 Sep 2008 10:45:33 -0000
Delivered-To: awerner@example.org
Received: (qmail 56101 invoked by uid 500); 1 Sep 2008 10:45:33 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 56088 invoked by uid 99); 1 Sep 2008 10:45:32 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 03:45:32 -0700
X-ASF-Spam-Status: No, hits=0.7 required=10.0
	tests=SPF_SOFTFAIL
X-Spam-Check-By: apache.org
Received-SPF: softfail (athena.apache.org: transitioning domain of awerner@example.org does not designate 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nskntmtas05p.mx.bigpond.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 10:44:33 +0000
Received: from nskntotgx02p.mx.bigpond.com ([83.161.120.155])
          by nskntmtas05p.mx.bigpond.com with ESMTP
          id <awerner@example.org>
          for <awerner@example.org>;
          Mon, 1 Sep 2008 10:44:53 +0000
Received: from developer ([83.161.120.155]) by nskntotgx02p.mx.bigpond.com
          with ESMTP
          id <20080901104452.XYPB15766.nskntotgx02p.mx.bigpond.com@developer>
          for <awerner@example.org>;
          Mon, 1 Sep 2008 10:44:52 +0000
From: "Gavin" <awerner@example.org>
To: <awerner@example.org>
Subject: Auto adding license headers
Date: Mon, 1 Sep 2008 20:44:50 +1000
Message-ID: <057801c90c1f$c2c54f00$0200a8c0@developer>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
Thread-Index: AckMH8Iln4IoUQxBT22rYHUSLHH5yw==
X-Antivirus: avast! (VPS 080831-0, 31/08/2008), Outbound message
X-Antivirus-Status: Clean
X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150202.48BBC7A5.005F,ss=1,fgs=0
X-Virus-Checked: Checked by ClamAV on apache.org

Hi All,

I see that this has been addressed and committed (RAT-30), however I must be
doing something wrong as it does not work for me.

I only downloaded trunk today so bear with me, this is what I did after the
download of trunk.

ant build (did not work)
mvn install (aha now it does)
cd /project/to/test
java -jar /path/to/rat-core/target/rat-core-0.6-SNAPSHOT.jar -a .

The above does create filename.ext.new files but they are identical to the
old ones.

I have not come across any docs that tell me what else I should be doing, is
the AL license embedded or does it need to refer to an existing one
somewhere or ?

Thanks

Gav...


From rat-dev-awerner@example.org Mon Sep 01 10:52:06 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 70426 invoked from network); 1 Sep 2008 10:52:06 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 1 Sep 2008 10:52:06 -0000
Received: (qmail 62901 invoked by uid 500); 1 Sep 2008 10:52:04 -0000
Delivered-To: awerner@example.org
Received: (qmail 62870 invoked by uid 500); 1 Sep 2008 10:52:04 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 62859 invoked by uid 99); 1 Sep 2008 10:52:04 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 03:52:04 -0700
X-ASF-Spam-Status: No, hits=-2000.0 required=10.0
	tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 10:51:13 +0000
Received: from brutus (localhost [83.161.120.155])
	by brutus.apache.org (Postfix) with ESMTP id 7B72B234C1C4
	for <awerner@example.org>; Mon,  1 Sep 2008 03:51:44 -0700 (PDT)
Message-ID: <1477006139.1220266304504.JavaMail.jira@brutus>
Date: Mon, 1 Sep 2008 03:51:44 -0700 (PDT)
From: "Gavin (JIRA)" <awerner@example.org>
To: awerner@example.org
Subject: [jira] Created: (RAT-33) Mailing list subscribe points to
 unsubscribe
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org

Mailing list subscribe points to unsubscribe
--------------------------------------------

                 Key: RAT-33
                 URL: https://issues.apache.org/jira/browse/RAT-33
             Project: RAT
          Issue Type: Bug
          Components: docs
            Reporter: Gavin
            Priority: Minor


On the http://incubator.apache.org/rat/mail-lists.html page the 'Subscribe' link actually links to awerner@example.org instead.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


From rat-dev-awerner@example.org Mon Sep 01 11:02:05 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 77454 invoked from network); 1 Sep 2008 11:02:04 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 1 Sep 2008 11:02:04 -0000
Received: (qmail 69456 invoked by uid 500); 1 Sep 2008 11:02:03 -0000
Delivered-To: awerner@example.org
Received: (qmail 69425 invoked by uid 500); 1 Sep 2008 11:02:03 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 69411 invoked by uid 99); 1 Sep 2008 11:02:03 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 04:02:03 -0700
X-ASF-Spam-Status: No, hits=-2000.0 required=10.0
	tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 11:01:13 +0000
Received: from brutus (localhost [83.161.120.155])
	by brutus.apache.org (Postfix) with ESMTP id 522A4234C1C8
	for <awerner@example.org>; Mon,  1 Sep 2008 04:01:44 -0700 (PDT)
Message-ID: <1198626296.1220266904335.JavaMail.jira@brutus>
Date: Mon, 1 Sep 2008 04:01:44 -0700 (PDT)
From: "Gavin (JIRA)" <awerner@example.org>
To: awerner@example.org
Subject: [jira] Commented: (RAT-33) Mailing list subscribe points to
 unsubscribe
In-Reply-To: <1477006139.1220266304504.JavaMail.jira@brutus>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org


    [ https://issues.apache.org/jira/browse/RAT-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627435#action_12627435 ] 

Gavin commented on RAT-33:
--------------------------

I'm guessing the source of this is <subscribe>awerner@example.org</subscribe>
from the pom.xml.

> Mailing list subscribe points to unsubscribe
> --------------------------------------------
>
>                 Key: RAT-33
>                 URL: https://issues.apache.org/jira/browse/RAT-33
>             Project: RAT
>          Issue Type: Bug
>          Components: docs
>            Reporter: Gavin
>            Priority: Minor
>
> On the http://incubator.apache.org/rat/mail-lists.html page the 'Subscribe' link actually links to awerner@example.org instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


From rat-dev-awerner@example.org Mon Sep 01 20:55:37 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 506 invoked from network); 1 Sep 2008 20:55:36 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 1 Sep 2008 20:55:36 -0000
Received: (qmail 15209 invoked by uid 500); 1 Sep 2008 20:55:35 -0000
Delivered-To: awerner@example.org
Received: (qmail 15183 invoked by uid 500); 1 Sep 2008 20:55:35 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 15168 invoked by uid 99); 1 Sep 2008 20:55:35 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 13:55:35 -0700
X-ASF-Spam-Status: No, hits=-2000.0 required=10.0
	tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 20:54:45 +0000
Received: from brutus (localhost [83.161.120.155])
	by brutus.apache.org (Postfix) with ESMTP id 23FD0234C1C6
	for <awerner@example.org>; Mon,  1 Sep 2008 13:54:46 -0700 (PDT)
Message-ID: <1680996465.1220302486146.JavaMail.jira@brutus>
Date: Mon, 1 Sep 2008 13:54:46 -0700 (PDT)
From: "Ross Gardler (JIRA)" <awerner@example.org>
To: awerner@example.org
Subject: [jira] Commented: (RAT-30) Optionally add licence headers to those
 currently without one
In-Reply-To: <946504660.1215297751886.JavaMail.jira@brutus>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org


    [ https://issues.apache.org/jira/browse/RAT-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627537#action_12627537 ] 

Ross Gardler commented on RAT-30:
---------------------------------

Prodding this issue.

The second two patches docsUpdate.patch and annotationHeaders.patch

Their minor updates, but I don't want them to get lost.




> Optionally add licence headers to those currently without one
> -------------------------------------------------------------
>
>                 Key: RAT-30
>                 URL: https://issues.apache.org/jira/browse/RAT-30
>             Project: RAT
>          Issue Type: New Feature
>          Components: engine
>    Affects Versions: 0.6
>            Reporter: Ross Gardler
>            Assignee: Robert Burrell Donkin
>         Attachments: annotationHeaders.patch, annotator.patch, docs.patch, docsUpdate.patch
>
>
> It would be useful to licence headers to files that currently do not have one. This will need to respect the excludes list to prevent header files bewing added to innapropriate files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


From rat-dev-awerner@example.org Mon Sep 01 21:04:54 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 5718 invoked from network); 1 Sep 2008 21:04:54 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 1 Sep 2008 21:04:54 -0000
Received: (qmail 26077 invoked by uid 500); 1 Sep 2008 21:04:52 -0000
Delivered-To: awerner@example.org
Received: (qmail 26043 invoked by uid 500); 1 Sep 2008 21:04:52 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 26029 invoked by uid 99); 1 Sep 2008 21:04:52 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 14:04:52 -0700
X-ASF-Spam-Status: No, hits=-2.8 required=10.0
	tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL
X-Spam-Check-By: apache.org
Received-SPF: neutral (athena.apache.org: local policy)
Received: from [83.161.120.155] (HELO relay5.mail.ox.ac.uk) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 21:03:52 +0000
Received: from smtp0.mail.ox.ac.uk ([83.161.120.155])
	by relay5.mail.ox.ac.uk with esmtp (Exim 4.69)
	(envelope-from <awerner@example.org>)
	id 1KaGZQ-0007nO-IB
	for awerner@example.org; Mon, 01 Sep 2008 22:04:20 +0100
Received: from host81-154-98-94.range81-154.btcentralplus.com ([83.161.120.155] helo=[83.161.120.155])
	by smtp0.mail.ox.ac.uk with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.69)
	(envelope-from <awerner@example.org>)
	id 1KaGZQ-0008DM-0x
	for awerner@example.org; Mon, 01 Sep 2008 22:04:20 +0100
Message-ID: <awerner@example.org>
Date: Mon, 01 Sep 2008 22:10:56 +0100
From: Ross Gardler <awerner@example.org>
User-Agent: Thunderbird 83.161.120.155 (Windows/20080708)
MIME-Version: 1.0
To: awerner@example.org
Subject: Re: Auto adding license headers
References: <057801c90c1f$c2c54f00$0200a8c0@developer>
In-Reply-To: <057801c90c1f$c2c54f00$0200a8c0@developer>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Oxford-Username: oucs0040
X-Virus-Checked: Checked by ClamAV on apache.org

Gavin wrote:
> Hi All,
> 
> I see that this has been addressed and committed (RAT-30), however I must be
> doing something wrong as it does not work for me.

Not necessarily - it might be you are the first person to actually do it 
other than me ;-)

I often fall foul of the fact that I run things from within Eclipse 
which manages the classpath for you and sometimes I forget to test in 
the command line. Let me see now... (using command line only)...

> I only downloaded trunk today so bear with me, this is what I did after the
> download of trunk.
> 
> ant build (did not work)

Yep, seems there is no build.xml - docs need updating

> mvn install (aha now it does)

Good, that's a start then, didn't work for me like that. I tried:

cd rat-trunk/rat
mvn installed

This failed due to a missing dependency on rat-core, so I had to:

cd rat-trunk/rat/rat-core
mvn install

> cd /project/to/test
> java -jar /path/to/rat-core/target/rat-core-0.6-SNAPSHOT.jar -a .
> 
> The above does create filename.ext.new files but they are identical to the
> old ones.

Strange, the contribution does have tests with it [2]. The tests are run 
on a "mvn install":

Running org.apache.rat.annotation.TestLicenceAppender
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec

I've also tested this on my own application here and can't reproduce the 
problem.

What is the extension of the files you are hoping to relicence? The 
appender does not work on every file type. Currently supported filetypes 
are:

.java
.xml
.html
.js
.apt
.properties

There is patch against issue Rat-30 that adds .rdf but it has not yet 
been applied to head.

> I have not come across any docs that tell me what else I should be doing, is
> the AL license embedded or does it need to refer to an existing one
> somewhere or ?

The licence header is in [1] so it does not need to be added or managed 
by the user.

I note that the rat website has broken links and old docs for the 
rat-core module. I assume you are reading the docs from source otherwise 
the above was a pretty good guess (or perhaps the help option is 
actually helpful?).

Anyway, docs are pretty sparse aren't they? You're going to add this 
stuff to the docs, right? (note there is a patch attached to issue 
Rat-30 that has some extra docs, but nothing more useful to you)

Ross

[1] 
http://svn.apache.org/repos/asf/incubator/rat/main/trunk/rat/rat-core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java
[2] 
http://svn.apache.org/repos/asf/incubator/rat/main/trunk/rat/rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java

From rat-dev-awerner@example.org Tue Sep 02 01:28:27 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 319 invoked from network); 2 Sep 2008 01:28:27 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 2 Sep 2008 01:28:27 -0000
Received: (qmail 49980 invoked by uid 500); 2 Sep 2008 01:28:25 -0000
Delivered-To: awerner@example.org
Received: (qmail 49948 invoked by uid 500); 2 Sep 2008 01:28:25 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 49934 invoked by uid 99); 2 Sep 2008 01:28:25 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 18:28:25 -0700
X-ASF-Spam-Status: No, hits=0.7 required=10.0
	tests=SPF_SOFTFAIL
X-Spam-Check-By: apache.org
Received-SPF: softfail (athena.apache.org: transitioning domain of awerner@example.org does not designate 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nskntmtas05p.mx.bigpond.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 01:27:26 +0000
Received: from nskntotgx03p.mx.bigpond.com ([83.161.120.155])
          by nskntmtas05p.mx.bigpond.com with ESMTP
          id <awerner@example.org>
          for <awerner@example.org>;
          Tue, 2 Sep 2008 01:27:44 +0000
Received: from developer ([83.161.120.155]) by nskntotgx03p.mx.bigpond.com
          with ESMTP
          id <20080902012744.YRPA29987.nskntotgx03p.mx.bigpond.com@developer>
          for <awerner@example.org>;
          Tue, 2 Sep 2008 01:27:44 +0000
From: "Gavin" <awerner@example.org>
To: <awerner@example.org>
References: <057801c90c1f$c2c54f00$0200a8c0@developer> <awerner@example.org>
Subject: RE: Auto adding license headers
Date: Tue, 2 Sep 2008 11:27:39 +1000
Message-ID: <05d401c90c9b$180a6b50$0200a8c0@developer>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
In-Reply-To: <awerner@example.org>
Thread-Index: AckMeJ3PtX/8o8SGQHOPMfiCxDtw2wAIP2Uw
X-Antivirus: avast! (VPS 080901-0, 01/09/2008), Outbound message
X-Antivirus-Status: Clean
X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150204.48BC9690.00BF,ss=1,fgs=0
X-Virus-Checked: Checked by ClamAV on apache.org



> -----Original Message-----
> From: Ross Gardler [mailto:awerner@example.org]
> Sent: Tuesday, 2 September 2008 7:11 AM
> To: awerner@example.org
> Subject: Re: Auto adding license headers
> 
> Gavin wrote:
> > Hi All,
> >
> > I see that this has been addressed and committed (RAT-30), however I
> must be
> > doing something wrong as it does not work for me.
> 
> Not necessarily - it might be you are the first person to actually do it
> other than me ;-)
> 
> I often fall foul of the fact that I run things from within Eclipse
> which manages the classpath for you and sometimes I forget to test in
> the command line. Let me see now... (using command line only)...
> 
> > I only downloaded trunk today so bear with me, this is what I did after
> the
> > download of trunk.
> >
> > ant build (did not work)
> 
> Yep, seems there is no build.xml - docs need updating
> 
> > mvn install (aha now it does)
> 
> Good, that's a start then, didn't work for me like that. I tried:
> 
> cd rat-trunk/rat
> mvn installed
> 
> This failed due to a missing dependency on rat-core, so I had to:
> 
> cd rat-trunk/rat/rat-core
> mvn install
> 
> > cd /project/to/test
> > java -jar /path/to/rat-core/target/rat-core-0.6-SNAPSHOT.jar -a .

That should all be rat-app , not app-core.

> >
> > The above does create filename.ext.new files but they are identical to
> the
> > old ones.
> 
> Strange, the contribution does have tests with it [2]. The tests are run
> on a "mvn install":
> 
> Running org.apache.rat.annotation.TestLicenceAppender
> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec

Yep I get all tests pass also.

> 
> I've also tested this on my own application here and can't reproduce the
> problem.

Well, in case it was my environment or a Windows thing, I installed rat and
my source files to convert on my Ubuntu box and I get exactly the same
results, that is I get .new files which are just copies of the originals.

> 
> What is the extension of the files you are hoping to relicence? The
> appender does not work on every file type. Currently supported filetypes
> are:
> 
> .java
> .xml
> .html
> .js
> .apt
> .properties

Currently just .java files, there are other files there too, but RAT
correctly ignores those and only copies the .java files.

> 
> There is patch against issue Rat-30 that adds .rdf but it has not yet
> been applied to head.
> 
> > I have not come across any docs that tell me what else I should be
> doing, is
> > the AL license embedded or does it need to refer to an existing one
> > somewhere or ?
> 
> The licence header is in [1] so it does not need to be added or managed
> by the user.

excellent.

> 
> I note that the rat website has broken links and old docs for the
> rat-core module. I assume you are reading the docs from source otherwise
> the above was a pretty good guess (or perhaps the help option is
> actually helpful?).

looking at source and yes the help was most useful, if an option is missed
then help automatically comes up which is good.

I also tried the full path to the directory as well as just '.' with no
difference in output. Copying the jar to the directory also makes no
difference, just saying some of the things I tried.

> 
> Anyway, docs are pretty sparse aren't they? You're going to add this
> stuff to the docs, right? (note there is a patch attached to issue
> Rat-30 that has some extra docs, but nothing more useful to you)

Yes, very sparse, but at this stage and for the audience I guess it is
better for those working on the program to concentrate on getting it
working. Does anything work with this program; I can't even get an audit
report from it?

Add to the docs, sure, when I get something working (ugh maven generated
docs), but I think I should try get something working first when I get time.

If anyone can help debug what's wrong with what I'm doing I'll document it
also in return.

Gav...

> 
> Ross
> 
> [1]
> http://svn.apache.org/repos/asf/incubator/rat/main/trunk/rat/rat-
> core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java
> [2]
> http://svn.apache.org/repos/asf/incubator/rat/main/trunk/rat/rat-
> core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java
> 
> 


From rat-dev-awerner@example.org Tue Sep 02 10:43:57 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 19493 invoked from network); 2 Sep 2008 10:43:57 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 2 Sep 2008 10:43:57 -0000
Received: (qmail 52795 invoked by uid 500); 2 Sep 2008 10:43:55 -0000
Delivered-To: awerner@example.org
Received: (qmail 52757 invoked by uid 500); 2 Sep 2008 10:43:55 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 52746 invoked by uid 99); 2 Sep 2008 10:43:55 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 03:43:55 -0700
X-ASF-Spam-Status: No, hits=0.7 required=10.0
	tests=SPF_SOFTFAIL
X-Spam-Check-By: apache.org
Received-SPF: softfail (athena.apache.org: transitioning domain of awerner@example.org does not designate 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO nskntmtas06p.mx.bigpond.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 10:42:56 +0000
Received: from nskntotgx03p.mx.bigpond.com ([83.161.120.155])
          by nskntmtas06p.mx.bigpond.com with ESMTP
          id <awerner@example.org>
          for <awerner@example.org>;
          Tue, 2 Sep 2008 10:43:14 +0000
Received: from developer ([83.161.120.155]) by nskntotgx03p.mx.bigpond.com
          with ESMTP
          id <20080902104313.PKMU29987.nskntotgx03p.mx.bigpond.com@developer>
          for <awerner@example.org>;
          Tue, 2 Sep 2008 10:43:13 +0000
From: "Gavin" <awerner@example.org>
To: <awerner@example.org>
References: <057801c90c1f$c2c54f00$0200a8c0@developer> <awerner@example.org> <05d401c90c9b$180a6b50$0200a8c0@developer>
Subject: RE: Auto adding license headers
Date: Tue, 2 Sep 2008 20:44:10 +1000
Message-ID: <063501c90ce8$d55938b0$0200a8c0@developer>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
In-Reply-To: <05d401c90c9b$180a6b50$0200a8c0@developer>
Thread-Index: AckMeJ3PtX/8o8SGQHOPMfiCxDtw2wAIP2UwABMTzhA=
X-Antivirus: avast! (VPS 080901-0, 01/09/2008), Outbound message
X-Antivirus-Status: Clean
X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150202.48BD18C2.0037,ss=1,fgs=0
X-Virus-Checked: Checked by ClamAV on apache.org



> -----Original Message-----
> From: Gavin [mailto:awerner@example.org]
> Sent: Tuesday, 2 September 2008 11:28 AM
> To: awerner@example.org
> Subject: RE: Auto adding license headers
> 
> 
> 
> > -----Original Message-----
> > From: Ross Gardler [mailto:awerner@example.org]
> > Sent: Tuesday, 2 September 2008 7:11 AM
> > To: awerner@example.org
> > Subject: Re: Auto adding license headers
> >
> > Gavin wrote:
> > > Hi All,
> > >
> > > I see that this has been addressed and committed (RAT-30), however I
> > must be
> > > doing something wrong as it does not work for me.
> >
> > Not necessarily - it might be you are the first person to actually do it
> > other than me ;-)
> >
> > I often fall foul of the fact that I run things from within Eclipse
> > which manages the classpath for you and sometimes I forget to test in
> > the command line. Let me see now... (using command line only)...
> >
> > > I only downloaded trunk today so bear with me, this is what I did
> after
> > the
> > > download of trunk.
> > >
> > > ant build (did not work)
> >
> > Yep, seems there is no build.xml - docs need updating
> >
> > > mvn install (aha now it does)
> >
> > Good, that's a start then, didn't work for me like that. I tried:
> >
> > cd rat-trunk/rat
> > mvn installed
> >
> > This failed due to a missing dependency on rat-core, so I had to:
> >
> > cd rat-trunk/rat/rat-core
> > mvn install
> >
> > > cd /project/to/test
> > > java -jar /path/to/rat-core/target/rat-core-0.6-SNAPSHOT.jar -a .
> 
> That should all be rat-app , not app-core.
> 
> > >
> > > The above does create filename.ext.new files but they are identical to
> > the
> > > old ones.
> >
> > Strange, the contribution does have tests with it [2]. The tests are run
> > on a "mvn install":
> >
> > Running org.apache.rat.annotation.TestLicenceAppender
> > Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047
> sec
> 
> Yep I get all tests pass also.
> 
> >
> > I've also tested this on my own application here and can't reproduce the
> > problem.
> 
> Well, in case it was my environment or a Windows thing, I installed rat
> and
> my source files to convert on my Ubuntu box and I get exactly the same
> results, that is I get .new files which are just copies of the originals.

Well, I now know what the problem is.

In the AbstractLicenseAppender.java file you have

if (type == TYPE_JAVA && line.startsWith("package "))

So, your looking to insert the License after the package line.
Your also assuming that all java files have a package line :)

None of my java files have package lines, I haven't got that far yet.

So, what's the solution, 2 choices I see :-

1. Do nothing (almost) - Document that a package line must exist and that
the license will be appended after that line. Therefore you are actively
forcing this limitation as an intentional design feature.

If this route is chosen then you should bail out without writing a .new file
if there is no package line, perhaps with a WARNING message appended to the
output. A .new file is currently written anyway because the file has already
been opened and written ("\n") to before that 'package' check above.

2. If no package line exists then put the license in anyway at the very top.

or something else.

Either way, I now need to go make some package name and add them in to my
project, then I can use the License appender as is.

Gav...

> 
> >
> > What is the extension of the files you are hoping to relicence? The
> > appender does not work on every file type. Currently supported filetypes
> > are:
> >
> > .java
> > .xml
> > .html
> > .js
> > .apt
> > .properties
> 
> Currently just .java files, there are other files there too, but RAT
> correctly ignores those and only copies the .java files.
> 
> >
> > There is patch against issue Rat-30 that adds .rdf but it has not yet
> > been applied to head.
> >
> > > I have not come across any docs that tell me what else I should be
> > doing, is
> > > the AL license embedded or does it need to refer to an existing one
> > > somewhere or ?
> >
> > The licence header is in [1] so it does not need to be added or managed
> > by the user.
> 
> excellent.
> 
> >
> > I note that the rat website has broken links and old docs for the
> > rat-core module. I assume you are reading the docs from source otherwise
> > the above was a pretty good guess (or perhaps the help option is
> > actually helpful?).
> 
> looking at source and yes the help was most useful, if an option is missed
> then help automatically comes up which is good.
> 
> I also tried the full path to the directory as well as just '.' with no
> difference in output. Copying the jar to the directory also makes no
> difference, just saying some of the things I tried.
> 
> >
> > Anyway, docs are pretty sparse aren't they? You're going to add this
> > stuff to the docs, right? (note there is a patch attached to issue
> > Rat-30 that has some extra docs, but nothing more useful to you)
> 
> Yes, very sparse, but at this stage and for the audience I guess it is
> better for those working on the program to concentrate on getting it
> working. Does anything work with this program; I can't even get an audit
> report from it?
> 
> Add to the docs, sure, when I get something working (ugh maven generated
> docs), but I think I should try get something working first when I get
> time.
> 
> If anyone can help debug what's wrong with what I'm doing I'll document it
> also in return.
> 
> Gav...
> 
> >
> > Ross
> >
> > [1]
> > http://svn.apache.org/repos/asf/incubator/rat/main/trunk/rat/rat-
> >
> core/src/main/java/org/apache/rat/annotation/ApacheV2LicenceAppender.java
> > [2]
> > http://svn.apache.org/repos/asf/incubator/rat/main/trunk/rat/rat-
> > core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java
> >
> >
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 502-436-9117 - Release Date: 9/1/2008
> 7:19 AM


From rat-dev-awerner@example.org Tue Sep 02 10:53:28 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 25200 invoked from network); 2 Sep 2008 10:53:28 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 2 Sep 2008 10:53:28 -0000
Received: (qmail 65899 invoked by uid 500); 2 Sep 2008 10:53:26 -0000
Delivered-To: awerner@example.org
Received: (qmail 65865 invoked by uid 500); 2 Sep 2008 10:53:26 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 65853 invoked by uid 99); 2 Sep 2008 10:53:26 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 03:53:26 -0700
X-ASF-Spam-Status: No, hits=-2.8 required=10.0
	tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL
X-Spam-Check-By: apache.org
Received-SPF: neutral (athena.apache.org: local policy)
Received: from [83.161.120.155] (HELO relay9.mail.ox.ac.uk) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 10:52:26 +0000
Received: from smtp0.mail.ox.ac.uk ([83.161.120.155])
	by relay9.mail.ox.ac.uk with esmtp (Exim 4.69)
	(envelope-from <awerner@example.org>)
	id 1KaTVH-0001Cz-Uj
	for awerner@example.org; Tue, 02 Sep 2008 11:52:55 +0100
Received: from oucs-rossg.oucs.ox.ac.uk ([83.161.120.155])
	by smtp0.mail.ox.ac.uk with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.69)
	(envelope-from <awerner@example.org>)
	id 1KaTVH-0000sw-0x
	for awerner@example.org; Tue, 02 Sep 2008 11:52:55 +0100
Message-ID: <awerner@example.org>
Date: Tue, 02 Sep 2008 11:52:57 +0100
From: Ross Gardler <awerner@example.org>
User-Agent: Thunderbird 83.161.120.155 (Windows/20080708)
MIME-Version: 1.0
To: awerner@example.org
Subject: Re: Auto adding license headers
References: <057801c90c1f$c2c54f00$0200a8c0@developer> <awerner@example.org> <05d401c90c9b$180a6b50$0200a8c0@developer> <063501c90ce8$d55938b0$0200a8c0@developer>
In-Reply-To: <063501c90ce8$d55938b0$0200a8c0@developer>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Oxford-Username: oucs0040
X-Virus-Checked: Checked by ClamAV on apache.org

Gavin wrote:

...

>>>> cd /project/to/test
>>>> java -jar /path/to/rat-core/target/rat-core-0.6-SNAPSHOT.jar -a .
>> That should all be rat-app , not app-core.
>>
>>>> The above does create filename.ext.new files but they are identical to
>>> the
>>>> old ones.

...

>>> Strange, the contribution does have tests with it [2]. The tests are run
>>> on a "mvn install":
>>>
>>> Running org.apache.rat.annotation.TestLicenceAppender
>>> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047
>> sec
>>
>> Yep I get all tests pass also.

...

> Well, I now know what the problem is.
> 
> In the AbstractLicenseAppender.java file you have
> 
> if (type == TYPE_JAVA && line.startsWith("package "))
> 
> So, your looking to insert the License after the package line.
> Your also assuming that all java files have a package line :)

Well it conforms to *my* coding standards ;-)

However, there are use cases where this would fail for genuine reasons. 
For example some projects add version control keywords in the first line.

> So, what's the solution, 2 choices I see :-
> 
> 1. Do nothing (almost) - Document that a package line must exist and that
> the license will be appended after that line. Therefore you are actively
> forcing this limitation as an intentional design feature.
> 
> If this route is chosen then you should bail out without writing a .new file
> if there is no package line, perhaps with a WARNING message appended to the
> output. A .new file is currently written anyway because the file has already
> been opened and written ("\n") to before that 'package' check above.
> 
> 2. If no package line exists then put the license in anyway at the very top.

Option 2 is certainly easier and would catch cases like CVS keywords. 
However, I'm guessing I put the check for a package name in for good 
reason. I can't think why at this moment, but if it wasn't just some 
random strangeness I probably put a test in place for it.

Please raise an issue complete with your suggestions (even providing a 
patch if you feel the urge - start with option 2 and see what happens to 
the tests).

Ross

From rat-dev-awerner@example.org Wed Sep 03 10:54:35 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 14033 invoked from network); 3 Sep 2008 10:54:35 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 3 Sep 2008 10:54:35 -0000
Received: (qmail 27493 invoked by uid 500); 3 Sep 2008 10:54:33 -0000
Delivered-To: awerner@example.org
Received: (qmail 27459 invoked by uid 500); 3 Sep 2008 10:54:33 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 27447 invoked by uid 99); 3 Sep 2008 10:54:33 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 03:54:33 -0700
X-ASF-Spam-Status: No, hits=-2000.0 required=10.0
	tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 10:53:43 +0000
Received: from brutus (localhost [83.161.120.155])
	by brutus.apache.org (Postfix) with ESMTP id 5C443234C1C6
	for <awerner@example.org>; Wed,  3 Sep 2008 03:53:44 -0700 (PDT)
Message-ID: <266001636.1220439224376.JavaMail.jira@brutus>
Date: Wed, 3 Sep 2008 03:53:44 -0700 (PDT)
From: "Gavin (JIRA)" <awerner@example.org>
To: awerner@example.org
Subject: [jira] Created: (RAT-34) No license header added for java files
 that do not contain project line
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org

No license header added for java files that do not contain project line
-----------------------------------------------------------------------

                 Key: RAT-34
                 URL: https://issues.apache.org/jira/browse/RAT-34
             Project: RAT
          Issue Type: Bug
    Affects Versions: 0.6
            Reporter: Gavin
             Fix For: 0.6


When using the -a cmd line switch to automatically add license headers to java files, no license headers will be added unless the java file contains the 'package' line. This is currently by design. Ideas for change include :-

1. Do nothing (almost) - Document that a package line must exist and that the license will be appended after that line. Therefore you are actively forcing this limitation as an intentional design feature.

If this route is chosen then you should bail out without writing a .new file if there is no package line, perhaps with a WARNING message appended to the output. A .new file is currently written anyway because the file has already been opened and written ("\n") to before that 'package' check above.

2. If no package line exists then put the license in anyway at the very top.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


From rat-dev-awerner@example.org Wed Sep 03 20:17:35 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 47871 invoked from network); 3 Sep 2008 20:17:35 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 3 Sep 2008 20:17:35 -0000
Received: (qmail 3056 invoked by uid 500); 3 Sep 2008 20:17:33 -0000
Delivered-To: awerner@example.org
Received: (qmail 3025 invoked by uid 500); 3 Sep 2008 20:17:33 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 3014 invoked by uid 99); 3 Sep 2008 20:17:33 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 13:17:33 -0700
X-ASF-Spam-Status: No, hits=-4.0 required=10.0
	tests=RCVD_IN_DNSWL_MED,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (athena.apache.org: local policy)
Received: from [83.161.120.155] (HELO sca-es-mail-2.sun.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 20:16:33 +0000
Received: from fe-sfbay-09.sun.com ([83.161.120.155])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m83KGrR1005666
	for <awerner@example.org>; Wed, 3 Sep 2008 13:16:53 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <awerner@example.org>
 (original mail from awerner@example.org) for awerner@example.org;
 Wed, 03 Sep 2008 13:16:53 -0700 (PDT)
Received: from d-mpk11-30-20.SFBay.Sun.COM ([83.161.120.155])
 by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 with ESMTPSA id <awerner@example.org> for
 awerner@example.org; Wed, 03 Sep 2008 13:16:44 -0700 (PDT)
Date: Wed, 03 Sep 2008 13:16:43 -0700
From: Craig L Russell <awerner@example.org>
Subject: Re: Auto adding license headers
In-reply-to: <awerner@example.org>
Sender: awerner@example.org
To: awerner@example.org
Message-id: <awerner@example.org>
MIME-version: 1.0
X-Mailer: Apple Mail (2.926)
Content-type: multipart/signed; protocol="application/pkcs7-signature";
 micalg=sha1; boundary=Apple-Mail-5--499848237
References: <057801c90c1f$c2c54f00$0200a8c0@developer>
 <awerner@example.org> <05d401c90c9b$180a6b50$0200a8c0@developer>
 <063501c90ce8$d55938b0$0200a8c0@developer> <awerner@example.org>
X-Virus-Checked: Checked by ClamAV on apache.org

--Apple-Mail-5--499848237
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

Hi,

All of my .java files have the Apache copyright as *the first lines*  
in the file.

I don't really understand why you would do anything except find out  
that there was no license and then insert the license at the top of  
the file (yes, even in front of the package statement).

Craig

On Sep 2, 2008, at 3:52 AM, Ross Gardler wrote:

> Gavin wrote:
>
> ...
>
>>>>> cd /project/to/test
>>>>> java -jar /path/to/rat-core/target/rat-core-0.6-SNAPSHOT.jar -a .
>>> That should all be rat-app , not app-core.
>>>
>>>>> The above does create filename.ext.new files but they are  
>>>>> identical to
>>>> the
>>>>> old ones.
>
> ...
>
>>>> Strange, the contribution does have tests with it [2]. The tests  
>>>> are run
>>>> on a "mvn install":
>>>>
>>>> Running org.apache.rat.annotation.TestLicenceAppender
>>>> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:  
>>>> 0.047
>>> sec
>>>
>>> Yep I get all tests pass also.
>
> ...
>
>> Well, I now know what the problem is.
>> In the AbstractLicenseAppender.java file you have
>> if (type == TYPE_JAVA && line.startsWith("package "))
>> So, your looking to insert the License after the package line.
>> Your also assuming that all java files have a package line :)
>
> Well it conforms to *my* coding standards ;-)
>
> However, there are use cases where this would fail for genuine  
> reasons. For example some projects add version control keywords in  
> the first line.
>
>> So, what's the solution, 2 choices I see :-
>> 1. Do nothing (almost) - Document that a package line must exist  
>> and that
>> the license will be appended after that line. Therefore you are  
>> actively
>> forcing this limitation as an intentional design feature.
>> If this route is chosen then you should bail out without writing  
>> a .new file
>> if there is no package line, perhaps with a WARNING message  
>> appended to the
>> output. A .new file is currently written anyway because the file  
>> has already
>> been opened and written ("\n") to before that 'package' check above.
>> 2. If no package line exists then put the license in anyway at the  
>> very top.
>
> Option 2 is certainly easier and would catch cases like CVS  
> keywords. However, I'm guessing I put the check for a package name  
> in for good reason. I can't think why at this moment, but if it  
> wasn't just some random strangeness I probably put a test in place  
> for it.
>
> Please raise an issue complete with your suggestions (even providing  
> a patch if you feel the urge - start with option 2 and see what  
> happens to the tests).
>
> Ross

Craig L Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
502-436-9117 mailto:awerner@example.org
P.S. A good JDO? O, Gasp!


--Apple-Mail-5--499848237
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGUDCCAwkw
ggJyoAMCAQICECvOQSuIjHMvOZRC95BRg/wwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx
JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ
ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA3MTIxMDE1MjM1MVoXDTA4MTIwOTE1MjM1
MVowbDEQMA4GA1UEBBMHUnVzc2VsbDEUMBIGA1UEKhMLQ3JhaWcgTGFpcmQxHDAaBgNVBAMTE0Ny
YWlnIExhaXJkIFJ1c3NlbGwxJDAiBgkqhkiG9w0BCQEWFUNyYWlnLlJ1c3NlbGxAU3VuLkNPTTCC
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKzqGlLUastboCRqc0iBoTz2ODcqpMpEyPUo
nYtluchkSIoWzOW63AuoTczRt9sKfhwoK5mope+62B6Li06WJabm2UHqKAaNSuMHLsmyqvOdwbSt
enY7/HxOSCMqVoyVBTRJc2M8feCSVgi7ptGq9cM+Maa64R1/p9zqaQNucceU/1uper90bWplsjAT
rHgicgr9XJIQb6uYjhjlgxxnY/aispnCvLxMX+CiA2FWeeJTI7AiFlLwibTXYF4v12ToByvXtTiJ
knuND8qpwhK3Wp0tL4ae8mZ0nlKjCuNnqh99ZyEyTFHZBfVx8WSWRXkY4qxCG/IDQUo7WUaefOQT
1mECAwEAAaMyMDAwIAYDVR0RBBkwF4EVQ3JhaWcuUnVzc2VsbEBTdW4uQ09NMAwGA1UdEwEB/wQC
MAAwDQYJKoZIhvcNAQEFBQADgYEAEqfFNFoch0QPVKWJ4maAZl3MJD10yMeWt5xb+WNSkhYKHD8I
42E8tpdE3kmc5wp2cZrz9JqJF/KCQ/gI4pmDk1qpTs5pvXzFNiD5Lu5eLza4iyxSlTHUXcCnyNC6
4m0qC8p4m/51NEql5hyacj/+vdlEe5dygpyNGUCiyA/SdAswggM/MIICqKADAgECAgENMA0GCSqG
SIb3DQEBBQUAMIHRMQswCQYDVQQGEwJaQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQH
EwlDYXBlIFRvd24xGjAYBgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZp
Y2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMSQwIgYDVQQDExtUaGF3dGUgUGVyc29uYWwgRnJlZW1h
aWwgQ0ExKzApBgkqhkiG9w0BCQEWHHBlcnNvbmFsLWZyZWVtYWlsQHRoYXd0ZS5jb20wHhcNMDMw
NzE3MDAwMDAwWhcNMTMwNzE2MjM1OTU5WjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3Rl
IENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWls
IElzc3VpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMSmPFVzVftOucqZWh5owHUE
cJ3f6f+jHuy9zfVb8hp2vX8MOmHyv1HOAdTlUAow1wJjWiyJFXCO3cnwK4Vaqj9xVsuvPAsH5/Ef
kTYkKhPPK9Xzgnc9A74r/rsYPge/QIACZNenprufZdHFKlSFD0gEf6e20TxhBEAeZBlyYLf7AgMB
AAGjgZQwgZEwEgYDVR0TAQH/BAgwBgEB/wIBADBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3Js
LnRoYXd0ZS5jb20vVGhhd3RlUGVyc29uYWxGcmVlbWFpbENBLmNybDALBgNVHQ8EBAMCAQYwKQYD
VR0RBCIwIKQeMBwxGjAYBgNVBAMTEVByaXZhdGVMYWJlbDItMTM4MA0GCSqGSIb3DQEBBQUAA4GB
AEiM0VCD6gsuzA2jZqxnD3+vrL7CF6FDlpSdf0whuPg2H6otnzYvwPQcUCCTcDz9reFhYsPZOhl+
hLGZGwDFGguCdJ4lUJRix9sncVcljd2pnDmOjCBPZV+V2vf3h9bGCE6u9uo05RAaWzVNd+NWIXiC
3CEZNd4ksdMdRv9dX2VPMYIDEDCCAwwCAQEwdjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh
d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt
YWlsIElzc3VpbmcgQ0ECECvOQSuIjHMvOZRC95BRg/wwCQYFKw4DAhoFAKCCAW8wGAYJKoZIhvcN
AQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDgwOTAzMjAxNjQ0WjAjBgkqhkiG9w0B
CQQxFgQUVuZait5Bw7VfC0NOFggJM+3oQ/swgYUGCSsGAQQBgjcQBDF4MHYwYjELMAkGA1UEBhMC
WkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0
ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAhArzkEriIxzLzmUQveQUYP8MIGHBgsqhkiG
9w0BCRACCzF4oHYwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQ
dHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAhAr
zkEriIxzLzmUQveQUYP8MA0GCSqGSIb3DQEBAQUABIIBAFkrzh0VqWDm51lxcbALvg8DEedludDN
bl4ZcCnv/b+xrPwAB69iruNyuGcOGrx89JpfKe7GQYu0TOXHE0Zmbr+5wg/FnFZPqLM6zRv86G+h
sZFeU/3dS5zJ1tT56fn9XNbKDnxQPweU0SMzMDa99zWxKmLhk9nTUvu+pOqO8jHS5i7sRNc9Y9uE
Uf1pmLG9qta0e6EfufCSqyvXbo7WEXgnG04NNO+uN3etrz6R+DNy0Hv0f0bMuJv8wmHQnBSKniyB
OexSHWjJrRmD2bRY4tbmi1fs2OJn/Jf492wey5ij6ONUKy8ttRm5C/UTe7hAJ3PwselTmLBQ+kOB
gq5ySq4AAAAAAAA=

--Apple-Mail-5--499848237--

From rat-dev-awerner@example.org Wed Sep 03 21:46:27 2008
Return-Path: <rat-dev-awerner@example.org>
Delivered-To: awerner@example.org
Received: (qmail 17804 invoked from network); 3 Sep 2008 21:46:27 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 3 Sep 2008 21:46:27 -0000
Received: (qmail 42155 invoked by uid 500); 3 Sep 2008 21:46:25 -0000
Delivered-To: awerner@example.org
Received: (qmail 42119 invoked by uid 500); 3 Sep 2008 21:46:25 -0000
Mailing-List: contact awerner@example.org; run by ezmlm
Precedence: bulk
List-Help: <mailto:awerner@example.org>
List-Unsubscribe: <mailto:awerner@example.org>
List-Post: <mailto:awerner@example.org>
List-Id: <rat-dev.incubator.apache.org>
Reply-To: awerner@example.org
Delivered-To: mailing list awerner@example.org
Received: (qmail 42108 invoked by uid 99); 3 Sep 2008 21:46:25 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 14:46:25 -0700
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (athena.apache.org: domain of awerner@example.org designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO smtp-out4.blueyonder.co.uk) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 21:45:26 +0000
Received: from [83.161.120.155] (helo=anti-virus03-08)
	by smtp-out4.blueyonder.co.uk with smtp (Exim 4.52)
	id 1Kb0Am-0002dl-Ji
	for awerner@example.org; Wed, 03 Sep 2008 22:45:56 +0100
Received: from [83.161.120.155] (helo=[83.161.120.155])
	by asmtp-out3.blueyonder.co.uk with esmtpa (Exim 4.52)
	id 1Kb0Am-0002ti-7u
	for awerner@example.org; Wed, 03 Sep 2008 22:45:56 +0100
Subject: Re: Auto adding license headers
From: Robert Burrell Donkin <awerner@example.org>
To: awerner@example.org
In-Reply-To: <awerner@example.org>
References: <057801c90c1f$c2c54f00$0200a8c0@developer>
	 <awerner@example.org>
Content-Type: text/plain
Date: Wed, 03 Sep 2008 22:45:55 +0100
Message-Id: <1220478355.5670.3.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 2.22.2 
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org

On Mon, 2008-09-01 at 22:10 +0100, Ross Gardler wrote:
> Gavin wrote:
> > Hi All,
> > 
> > I see that this has been addressed and committed (RAT-30), however I must be
> > doing something wrong as it does not work for me.
> 
> Not necessarily - it might be you are the first person to actually do it 
> other than me ;-)
> 
> I often fall foul of the fact that I run things from within Eclipse 
> which manages the classpath for you and sometimes I forget to test in 
> the command line. Let me see now... (using command line only)...
> 
> > I only downloaded trunk today so bear with me, this is what I did after the
> > download of trunk.
> > 
> > ant build (did not work)
> 
> Yep, seems there is no build.xml - docs need updating

yep

unless anyone wants to jump in with a patch, i'll try to take a look at
this sometime soon

<snip>

> > I have not come across any docs that tell me what else I should be doing, is
> > the AL license embedded or does it need to refer to an existing one
> > somewhere or ?
> 
> The licence header is in [1] so it does not need to be added or managed 
> by the user.
> 
> I note that the rat website has broken links and old docs for the 
> rat-core module. I assume you are reading the docs from source otherwise 
> the above was a pretty good guess (or perhaps the help option is 
> actually helpful?).

now there's some interest, i'd best take a look at sorting them out...

> Anyway, docs are pretty sparse aren't they? You're going to add this 
> stuff to the docs, right? (note there is a patch attached to issue 
> Rat-30 that has some extra docs, but nothing more useful to you)

i'll take a look at getting that patch applied soon

- robert




{'source': 'Apache Software Foundation Public Mail Archives'}