Lucene - Core
  1. Lucene - Core
  2. LUCENE-4217

Load clover.jar from ivy-cachepath and store license key in SVN

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-BETA, 6.0
    • Component/s: general/build
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      When clover granted use the license for their clover-2.6.3.jar file they allowed us to ship this license file to every developer. Currently clover setup is very hard for users, so this issue will make it simple.

      If you want to run tests with clover, just pass -Drun.clover=true to ant clean test. ANT will then download clover via IVY and point it to the license file in our tools folder. The license is supplemented by the original mail from Atlassian, that everybody is allowed to use it with code in the org.apache. java package.

      1. LUCENE-4217.patch
        18 kB
        Uwe Schindler
      2. LUCENE-4217.patch
        15 kB
        Uwe Schindler
      3. LUCENE-4217.patch
        16 kB
        Uwe Schindler

        Activity

        Hide
        Uwe Schindler added a comment -

        Hi,

        attached is a patch with a complete overhaul of the Clover reporting on Lucene + Solr:

        • Clover is loaded by IVY from Maven Central
        • The License file was committed to lucene/tools/clover and is automatically used. This is possible according to the mail from Nicolas Muldon:
        On Fri, Dec 18, 2009 at 1:33 AM, Nicholas Muldoon <nmuldoon@atlassian.com> wrote:
        ---------------------------------------------------------------------------------
        
        Hi,
        Atlassian are excited to be presenting Apache with a site license for Clover
        2.6.
        
        This Clover license can be used for any code that is under an org.apache
        package. Further, this license can be used by any developer on their machine
        in conjunction with our Eclipse or IntelliJ plugins for development on an
        org.apache project.
        

        Also Mike & me talked to Nicholas and Nick Pellow, and we got the following response:

        On Sat, Dec 19, 2009 at 10:38 PM, Nick Pellow <npellow@atlassian.com> wrote:
        > Hi Mike,
        >
        > That would be great if you could forward this to committers@apache.org.
        > The license is available to anyone working on the org.apache.* be it 
        > in IDEA/Eclipse/Ant/Maven locally, or on a central build server.
        >
        > Since the license will only instrument and report coverage on 
        > org.apache packages, please mention that it is fine to commit this 
        > license to each project if it makes running builds easier. ie just 
        > check out the project and run with Clover, without the need for the 
        > extra step of locating and installing the clover license.
        >
        >
        > Cheers,
        > Nick
        >
        >
        >
        > On 19/12/2009, at 1:11 AM, Michael McCandless wrote:
        >
        >> Woops, I meant "The only restriction is that it will only test 
        >> coverage of packages under org.apache", below.
        >>
        >> Mike
        >>
        >> On Fri, Dec 18, 2009 at 9:05 AM, Michael McCandless 
        >> <lucene@mikemccandless.com> wrote:
        >>>
        >>> Since this generous offer extends beyond Lucene...
        >>>
        >>> I'd like to forward this to committers@apache.org, pointing to where 
        >>> the license is available
        >>>
        >>> (https://svn.apache.org/repos/private/committers/donated-licenses/cl
        >>> over/2.6.x), explaining that Lucene upgraded (providing the link to 
        >>> our coverage report), etc.
        >>>
        >>> But I wanted to confirm with you all first: is this OK?  This 
        >>> license may be used by anyone?  The only restriction is that it will 
        >>> only test coverage of packages under org.apache.lucene?
        >>>
        >>> I can draft something up and run it by you all first, if this makes 
        >>> sense...
        
        • The ANT tasks were cleaned up and now work per module without crazy filesets. Only test-framework is not clovered, as it was explicitely disabled by the managers of the new buildsystem. Unfortunately if your make compile-core in test-framework depend on clover, it will correctly clover it, but as its in src/ and not /test it will be counted as source code and not test code and appears in the report as such. I left it disabled for now until we find a solution.
        • Solr now reports everything also coverage on all referred Lucene modules (cool!)

        If you want to run a test build with clover, do:

        # must be cleaned first on top-level, so all half baked code is gone
        ant clean
        # go to lucene or solr
        ant -Drun.clover=true test generate-clover-reports
        

        This downloads clover from Maven central and runs all tests with clover and publishes the report. The target folder changed a bit (clenaup), we must change Jenkins config/scripts (I can do).

        For Lucene and Solr the Cloverage Database is always placed in Lucene's build folder (as before), this is why you must clean on top-level.

        Show
        Uwe Schindler added a comment - Hi, attached is a patch with a complete overhaul of the Clover reporting on Lucene + Solr: Clover is loaded by IVY from Maven Central The License file was committed to lucene/tools/clover and is automatically used. This is possible according to the mail from Nicolas Muldon: On Fri, Dec 18, 2009 at 1:33 AM, Nicholas Muldoon <nmuldoon@atlassian.com> wrote: --------------------------------------------------------------------------------- Hi, Atlassian are excited to be presenting Apache with a site license for Clover 2.6. This Clover license can be used for any code that is under an org.apache package. Further, this license can be used by any developer on their machine in conjunction with our Eclipse or IntelliJ plugins for development on an org.apache project. Also Mike & me talked to Nicholas and Nick Pellow, and we got the following response: On Sat, Dec 19, 2009 at 10:38 PM, Nick Pellow <npellow@atlassian.com> wrote: > Hi Mike, > > That would be great if you could forward this to committers@apache.org. > The license is available to anyone working on the org.apache.* be it > in IDEA/Eclipse/Ant/Maven locally, or on a central build server. > > Since the license will only instrument and report coverage on > org.apache packages, please mention that it is fine to commit this > license to each project if it makes running builds easier. ie just > check out the project and run with Clover, without the need for the > extra step of locating and installing the clover license. > > > Cheers, > Nick > > > > On 19/12/2009, at 1:11 AM, Michael McCandless wrote: > >> Woops, I meant "The only restriction is that it will only test >> coverage of packages under org.apache", below. >> >> Mike >> >> On Fri, Dec 18, 2009 at 9:05 AM, Michael McCandless >> <lucene@mikemccandless.com> wrote: >>> >>> Since this generous offer extends beyond Lucene... >>> >>> I'd like to forward this to committers@apache.org, pointing to where >>> the license is available >>> >>> (https://svn.apache.org/repos/private/committers/donated-licenses/cl >>> over/2.6.x), explaining that Lucene upgraded (providing the link to >>> our coverage report), etc. >>> >>> But I wanted to confirm with you all first: is this OK? This >>> license may be used by anyone? The only restriction is that it will >>> only test coverage of packages under org.apache.lucene? >>> >>> I can draft something up and run it by you all first, if this makes >>> sense... The ANT tasks were cleaned up and now work per module without crazy filesets. Only test-framework is not clovered, as it was explicitely disabled by the managers of the new buildsystem. Unfortunately if your make compile-core in test-framework depend on clover, it will correctly clover it, but as its in src/ and not /test it will be counted as source code and not test code and appears in the report as such. I left it disabled for now until we find a solution. Solr now reports everything also coverage on all referred Lucene modules (cool!) If you want to run a test build with clover, do: # must be cleaned first on top-level, so all half baked code is gone ant clean # go to lucene or solr ant -Drun.clover=true test generate-clover-reports This downloads clover from Maven central and runs all tests with clover and publishes the report. The target folder changed a bit (clenaup), we must change Jenkins config/scripts (I can do). For Lucene and Solr the Cloverage Database is always placed in Lucene's build folder (as before), this is why you must clean on top-level.
        Hide
        Uwe Schindler added a comment -

        I wanted to mention: The code in the attached patch is ASF of course, but the License File is of course not Apache License. But there is only one checkbox in JIRA!

        Show
        Uwe Schindler added a comment - I wanted to mention: The code in the attached patch is ASF of course, but the License File is of course not Apache License. But there is only one checkbox in JIRA!
        Hide
        Uwe Schindler added a comment -

        We should maybe exclude the License file from the Source ZIP/TGZ file, but keep it in SVN? it's just an <excludes.../>

        Show
        Uwe Schindler added a comment - We should maybe exclude the License file from the Source ZIP/TGZ file, but keep it in SVN? it's just an <excludes.../>
        Hide
        Uwe Schindler added a comment -

        Small patch improvements and correct mail extract in README.

        Show
        Uwe Schindler added a comment - Small patch improvements and correct mail extract in README.
        Hide
        Uwe Schindler added a comment -

        Final patch. I added exclusion of the license from src.tgz files (like the javadoc6 package list) and by the way fixed Solr's file attributes (SOLR-3328).

        I will commit this tomorrow and reconfigure Jenkins if nobody objects!

        (the License file in this patch is not ASF licensed)

        Show
        Uwe Schindler added a comment - Final patch. I added exclusion of the license from src.tgz files (like the javadoc6 package list) and by the way fixed Solr's file attributes ( SOLR-3328 ). I will commit this tomorrow and reconfigure Jenkins if nobody objects! (the License file in this patch is not ASF licensed)
        Hide
        Uwe Schindler added a comment -

        Committed trunk r1361480, 4.x r1361481.
        Also committed nightly changes in 1361482.

        Show
        Uwe Schindler added a comment - Committed trunk r1361480, 4.x r1361481. Also committed nightly changes in 1361482.
        Hide
        Uwe Schindler added a comment -

        Clover reports of Lucene and Solr look cool, no problems on Jenkins.

        The Solr report now also contains coverage on referenced Lucene classes (packages not used by Solr at all are excluded as not compiled): https://builds.apache.org/job/Solr-trunk/1912/clover-report/

        Of course the overall coverage percentage got lower by this, but we can clearly see in this report which cool features of Lucene are completely unused by Solr.

        Show
        Uwe Schindler added a comment - Clover reports of Lucene and Solr look cool, no problems on Jenkins. The Solr report now also contains coverage on referenced Lucene classes (packages not used by Solr at all are excluded as not compiled): https://builds.apache.org/job/Solr-trunk/1912/clover-report/ Of course the overall coverage percentage got lower by this, but we can clearly see in this report which cool features of Lucene are completely unused by Solr.

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Uwe Schindler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development