lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3774) check-legal isn't doing its job
Date Sun, 12 Feb 2012 11:22:59 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-3774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206396#comment-13206396
] 

Dawid Weiss commented on LUCENE-3774:
-------------------------------------

I wrote a task as a quick experiment, it looks like this:
{code}
<license-check>
  <fileset dir="../..">
    <include name="**/*.jar" />
    <!-- Speed up scanning a bit. -->
    <exclude name="**/src/**" />
    <exclude name="**/build/**" />
  </fileset>

  <licenseMapper>
    <filtermapper>
      <replacestring from="\" to="/" />
      <replaceregex pattern="\.jar$" replace="" flags="gi" />

      <!-- Handle non-typical version patterns. -->
      <replaceregex pattern="/cpptasks([^/]+)$"            replace="/cpptasks" flags="gi"
/>
      <replaceregex pattern="/commons-csv-([^/]+)$"        replace="/commons-csv" flags="gi"
/>
      <replaceregex pattern="/apache-solr-noggit-([^/]+)$" replace="/apache-solr-noggit"
flags="gi" />

      <!-- Typical version trailers. -->
      <replaceregex pattern="\-(r)?([0-9\-\.])+(beta([0-9\-\.])*)?$" replace="" flags="gi"
/>
    </filtermapper>
  </licenseMapper>
</license-check>
{code}

The mapper tells where a LICENSE and NOTICE file should be expected for each JAR. This is
different from the current design where LICENSE and NOTICE files are matched against each
other, but it opens up a few interesting possibilities:
- exact reporting where a LICENSE/NOTICE file is expected for a given JAR (with full expected
filename),
- placing all LICENSE/NOTICE files in a single location in the project (not alongside JARs),
- allowing a single LICENSE/NOTICE to cover multiple JARs (for example slf4j.LICENSE would
cover all slf4j JAR files).

Let me know what you think.
                
> check-legal isn't doing its job
> -------------------------------
>
>                 Key: LUCENE-3774
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3774
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: general/build
>    Affects Versions: 3.6, 4.0
>            Reporter: Steven Rowe
>            Assignee: Steven Rowe
>         Attachments: LUCENE-3774.patch, LUCENE-3774.patch
>
>
> In trunk, the {{check-legal-lucene}} ant target is not checking any {{lucene/contrib/\*\*/lib/}}
directories; the {{modules/**/lib/}} directories are not being checked; and {{check-legal-solr}}
can't be checking {{solr/example/lib/\*\*/\*.jar}}, because there are currently {{.jar}} files
in there that don't have a license.
> These targets are set up to take in a full list of {{lib/}} directories in which to check,
but modules move around, and these lists are not being kept up-to-date.
> Instead, {{check-legal-\*}} should run for each module, if the module has a {{lib/}}
directory, and it should be specialized for modules that have more than one ({{solr/core/}})
or that have a {{lib/}} directory in a non-standard place ({{lucene/core/}}).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message