Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-882

Cave: unnecessary logging messages about non-OSGi bundles in Maven repository

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • cave-2.3.0
    • cave-2.3.0
    • cave
    • None

    Description

      Creating a Cave repository out of a Maven repository (cave:create-repository -l /home/gmazza/.m2/repository m2) is overwhelming the Karaf logs with the following type messages:

      11:08:21,159 | WARN | l Console Thread | rg.slf4j.impl.JDK14LoggerAdapter 588 | - - | The specified url is not a valid jar (can't read manifest): file:/home/gmazza/.m2/repository/org/apache/directory/server/apacheds-core-mock/1.5.7/apacheds-core-mock-1.5.7.pom.sha1
      11:08:21,159 | WARN | l Console Thread | rg.slf4j.impl.JDK14LoggerAdapter 588 | - - | The specified url is not a valid jar (can't read manifest): file:/home/gmazza/.m2/repository/org/apache/directory/server/apacheds-core-mock/1.5.7/apacheds-core-mock-1.5.7.jar.sha1
      11:08:21,160 | WARN | l Console Thread | rg.slf4j.impl.JDK14LoggerAdapter 588 | - - | The specified url is not a valid jar (can't read manifest): file:/home/gmazza/.m2/repository/org/apache/directory/server/apacheds-core-mock/1.5.7/apacheds-core-mock-1.5.7-sources.jar.sha1
      11:08:21,160 | WARN | l Console Thread | rg.slf4j.impl.JDK14LoggerAdapter 588 | - - | The specified url is not a valid jar (can't read manifest): file:/home/gmazza/.m2/repository/org/apache/directory/server/apacheds-test-framework/1.5.7/apacheds-test-framework-1.5.7-sources.jar.sha1
      11:08:21,160 | WARN | l Console Thread | rg.slf4j.impl.JDK14LoggerAdapter 588 | - - | The specified url is not a valid jar (can't read manifest): file:/home/gmazza/.m2/repository/org/apache/directory/server/apacheds-test-framework/1.5.7/apacheds-test-framework-1.5.7.pom

      I see two issues here:
      1.) This is not a WARN-level message, I think it should be FINER or FINEST (if output at all) – it's a given that a Maven repository has a ton of .pom and .sha1 files and that these can't possibly be valid JARs, there's no reason to overwhelm the log files with these messages.

      2.) The algorithm that checks for OSGi bundles should automatically skip the .pom and .sha1 files – not even look at them, and hence nothing to output. The only messages, possibly, would be for JARs that are not OSGi bundles. That could be a usable message (along the FINE, FINER, or FINEST level) for people wondering why their JAR isn't being picked up while not burdening the 97% who know that there's non-OSGi jars in the Maven repo that are going to get ignored.

      Attachments

        1. cavePatch2.patch
          2 kB
          Glen Mazza

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            gmazza Glen Mazza
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: