You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Glen Mazza (Updated) (JIRA)" <ji...@apache.org> on 2011/10/30 03:43:32 UTC

[jira] [Updated] (KARAF-882) Cave: unnecessary logging messages about non-OSGi bundles in Maven repository

     [ https://issues.apache.org/jira/browse/KARAF-882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Glen Mazza updated KARAF-882:
-----------------------------

    Attachment: cavePatch2.patch

Attached patch filters out common Maven files (.xml, .properties, .sha1, etc.) from consideration as a bundle.  If one of these files, Cave will not even check to see if it's a regular bundle -- speeding up processing of Maven repo-to-cave repo conversions (i.e. cave:create-repository -l /home/gmazza/.m2/repository m2).  By filtering these eight terms no error messages appeared in the log files.

Alternatively, this code can be moved down to just the error logging in the Exception block, in that case *every* file will be checked to see if it's a bundle but those with the common Maven endings listed above will not have an error report filling up the log files.
                
> Cave: unnecessary logging messages about non-OSGi bundles in Maven repository
> -----------------------------------------------------------------------------
>
>                 Key: KARAF-882
>                 URL: https://issues.apache.org/jira/browse/KARAF-882
>             Project: Karaf
>          Issue Type: Improvement
>          Components: cave-repository
>    Affects Versions: cave-3.0.0
>            Reporter: Glen Mazza
>            Assignee: Jean-Baptiste Onofré
>             Fix For: cave-3.0.0
>
>         Attachments: cavePatch2.patch
>
>
> 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.

--
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