You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Erick Erickson <er...@gmail.com> on 2012/02/14 04:35:15 UTC

Hmmm, license checking a bit over-zealous?

If I do an "ant example", then start the Solr example code (java -jar
start.jar), then run an "ant test" I get license violations and the
test stops, here's the output:

validate:
     [echo] License check under: /Users/Erick/apache_solr/apache-solr-trunk/solr
 [licenses] MISSING LICENSE for the following file:
 [licenses]   /Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-4.0-SNAPSHOT.jar
 [licenses]   Expected locations below:
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-ASL.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-BSD.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-BSD_LIKE.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-CDDL.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-CPL.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-EPL.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-MIT.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-MPL.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-PD.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-SUN.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-COMPOUND.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-LICENSE-FAKE.txt
 [licenses] MISSING LICENSE for the following file:
 [licenses]   /Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-noggit-r1211150.jar
 [licenses]   Expected locations below:
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-noggit-LICENSE-ASL.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-noggit-LICENSE-BSD.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-noggit-LICENSE-BSD_LIKE.txt
 [licenses]   =>
/Users/Erick/apache_solr/apache-solr-trunk/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-noggit-LICENSE-CDDL.txt
and lots more similar

an "ant clean test" gets past this and it'll probably work if I just
don't run the example work/Jettyblahblah (haven't tried it, it's
late). Is there a way to turn off the validation for the work
directory? I suppose it's not that big a deal to remove the
....work/Jettyblahblahblah, but it's kind of a pain....

Erick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Hmmm, license checking a bit over-zealous?

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
> Thanks Dawid. I didn't really like the exclusion with **/work/** that
> I put in, but it was late. The change to solr/build.xml is a lot cleaner....

I should have explained it when I committed it in, but I honestly
thought I'd gone through all the possible scenarios and had all the
weird files covered. Sorry for trouble.

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Hmmm, license checking a bit over-zealous?

Posted by Erick Erickson <er...@gmail.com>.
Thanks Dawid. I didn't really like the exclusion with **/work/** that
I put in, but it was late. The change to solr/build.xml is a lot cleaner....

Erick

On Tue, Feb 14, 2012 at 3:16 AM, Dawid Weiss
<da...@cs.put.poznan.pl> wrote:
>> Well, I never did have the sense to  quit while I was ahead. That
>> works just fine, checking in momentarily.
>
> Time zone differences, so a bit belated, but this may be of interest
> for others as well. License checking is now global to capture any JARs
> added to the repo. Unfortunately certain JARs are either created or
> copied in the source folders and they need to be excluded manually.
> There are three places where this can be done:
>
> *) /lucene/tools/custom-tasks.xml
>
> This is the main macro for license checking and any exclusions applied
> to the fileset there will be global for solr, lucene and modules.
>
> *) /lucene/build.xml
>
> Validate target, lucene-specific. Currently only contains macro
> invocation (no customizations for Lucene).
>
> *) /solr/build.xml
>
> Validate target, solr-specific. This currently contains that macro
> call, but with custom solr-only exclusions as in:
>
>    <license-check-macro dir="${basedir}">
>      <additional-excludes>
>        <!-- Exclude start.jar only (it'd be weird to have a license
> file there?) -->
>        <exclude name="example/start.jar" />
>        <exclude name="example/exampledocs/post.jar" />
>      </additional-excludes>
>      <additional-filters>
>        <replaceregex pattern="/jetty-util([^/]+)$"
> replace="/jetty-util" flags="gi" />
>        <replaceregex pattern="/jetty-6([^/]+)$" replace="/jetty" flags="gi" />
>        <replaceregex pattern="/jsp-2.1-glassfish([^/]+)$"
> replace="/jsp-2.1-glassfish" flags="gi" />
>        <replaceregex pattern="/jsp-api-2.1-glassfish([^/]+)$"
> replace="/jsp-api-2.1-glassfish" flags="gi" />
>      </additional-filters>
>    </license-check-macro>
>
> "additional-excludes" apply exclude rules to the default set.
> "additional-filters" normalize JAR names with funky versioning numbers
> so that licenses can be found.
>
> *) /modules/build.xml (trunk)
>
> validate target. I don't think there will be any need to fiddle with it.
>
>
> So, Erick could have added **/work/** as a sol-only exclusion if it
> applies to solr only (I've updated the repo). Ideally, we should over
> time get rid of project-specific exclusions since what they mean is
> that something is in the sources area instead of being under some
> build/ compilation directory...
>
> Dawid
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Hmmm, license checking a bit over-zealous?

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
> Well, I never did have the sense to  quit while I was ahead. That
> works just fine, checking in momentarily.

Time zone differences, so a bit belated, but this may be of interest
for others as well. License checking is now global to capture any JARs
added to the repo. Unfortunately certain JARs are either created or
copied in the source folders and they need to be excluded manually.
There are three places where this can be done:

*) /lucene/tools/custom-tasks.xml

This is the main macro for license checking and any exclusions applied
to the fileset there will be global for solr, lucene and modules.

*) /lucene/build.xml

Validate target, lucene-specific. Currently only contains macro
invocation (no customizations for Lucene).

*) /solr/build.xml

Validate target, solr-specific. This currently contains that macro
call, but with custom solr-only exclusions as in:

    <license-check-macro dir="${basedir}">
      <additional-excludes>
        <!-- Exclude start.jar only (it'd be weird to have a license
file there?) -->
        <exclude name="example/start.jar" />
        <exclude name="example/exampledocs/post.jar" />
      </additional-excludes>
      <additional-filters>
        <replaceregex pattern="/jetty-util([^/]+)$"
replace="/jetty-util" flags="gi" />
        <replaceregex pattern="/jetty-6([^/]+)$" replace="/jetty" flags="gi" />
        <replaceregex pattern="/jsp-2.1-glassfish([^/]+)$"
replace="/jsp-2.1-glassfish" flags="gi" />
        <replaceregex pattern="/jsp-api-2.1-glassfish([^/]+)$"
replace="/jsp-api-2.1-glassfish" flags="gi" />
      </additional-filters>
    </license-check-macro>

"additional-excludes" apply exclude rules to the default set.
"additional-filters" normalize JAR names with funky versioning numbers
so that licenses can be found.

*) /modules/build.xml (trunk)

validate target. I don't think there will be any need to fiddle with it.


So, Erick could have added **/work/** as a sol-only exclusion if it
applies to solr only (I've updated the repo). Ideally, we should over
time get rid of project-specific exclusions since what they mean is
that something is in the sources area instead of being under some
build/ compilation directory...

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Hmmm, license checking a bit over-zealous?

Posted by Erick Erickson <er...@gmail.com>.
Well, I never did have the sense to  quit while I was ahead. That
works just fine,
checking in momentarily.

Erick

On Mon, Feb 13, 2012 at 10:53 PM, Erick Erickson
<er...@gmail.com> wrote:
> Robert:
>
> Thanks, it's been a long day so I'll give it a whirl first thing in the morning.
> But it sounds like just the thing.
>
> Erick
>
> On Mon, Feb 13, 2012 at 10:39 PM, Robert Muir <rc...@gmail.com> wrote:
>> On Mon, Feb 13, 2012 at 10:35 PM, Erick Erickson
>> <er...@gmail.com> wrote:
>>>
>>> an "ant clean test" gets past this and it'll probably work if I just
>>> don't run the example work/Jettyblahblah (haven't tried it, it's
>>> late). Is there a way to turn off the validation for the work
>>> directory? I suppose it's not that big a deal to remove the
>>> ....work/Jettyblahblahblah, but it's kind of a pain....
>>>
>>
>> Under lucene/tools/custom-tasks.xml there are some excluded
>> directories totally (such as build/, etc)
>> Can you try adding the example work dir to this and see if you still
>> have the problem? if not, commit it!
>>
>> --
>> lucidimagination.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Hmmm, license checking a bit over-zealous?

Posted by Erick Erickson <er...@gmail.com>.
Robert:

Thanks, it's been a long day so I'll give it a whirl first thing in the morning.
But it sounds like just the thing.

Erick

On Mon, Feb 13, 2012 at 10:39 PM, Robert Muir <rc...@gmail.com> wrote:
> On Mon, Feb 13, 2012 at 10:35 PM, Erick Erickson
> <er...@gmail.com> wrote:
>>
>> an "ant clean test" gets past this and it'll probably work if I just
>> don't run the example work/Jettyblahblah (haven't tried it, it's
>> late). Is there a way to turn off the validation for the work
>> directory? I suppose it's not that big a deal to remove the
>> ....work/Jettyblahblahblah, but it's kind of a pain....
>>
>
> Under lucene/tools/custom-tasks.xml there are some excluded
> directories totally (such as build/, etc)
> Can you try adding the example work dir to this and see if you still
> have the problem? if not, commit it!
>
> --
> lucidimagination.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Hmmm, license checking a bit over-zealous?

Posted by Robert Muir <rc...@gmail.com>.
On Mon, Feb 13, 2012 at 10:35 PM, Erick Erickson
<er...@gmail.com> wrote:
>
> an "ant clean test" gets past this and it'll probably work if I just
> don't run the example work/Jettyblahblah (haven't tried it, it's
> late). Is there a way to turn off the validation for the work
> directory? I suppose it's not that big a deal to remove the
> ....work/Jettyblahblahblah, but it's kind of a pain....
>

Under lucene/tools/custom-tasks.xml there are some excluded
directories totally (such as build/, etc)
Can you try adding the example work dir to this and see if you still
have the problem? if not, commit it!

-- 
lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org