Skip to content

Add BND configuration to bridges #1827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from
Closed

Conversation

ppkarwasz
Copy link
Contributor

This PR performs the necessary changes to switch the bridges from maven-bundle-plugin to bnd-maven-plugin and generate a matching module descriptor.

The differences will be summarized in separate comments.

@ppkarwasz
Copy link
Contributor Author

log4j-appserver

OSGi

Previous descriptor was a copy/paste from log4j-web. Here is the new one:

Bundle-Description                       Provide Log4j as the logging implementation for application servers
Bundle-License                           "Apache-2.0";link="https://www.apache.org/licenses/LICENSE-2.0.txt"
Bundle-ManifestVersion                   2                                       
Bundle-Name                              Apache Log4j App Server Support         
Bundle-SymbolicName                      org.apache.logging.log4j.appserver      
Bundle-Vendor                            The Apache Software Foundation          
Bundle-Version                           2.21.0.SNAPSHOT                         
Export-Package                           org.apache.logging.log4j.appserver.jetty;uses:="org.eclipse.jetty.util.log";version="2.21.0",org.apache.logging.log4j.appserver.tomcat;uses:="org.apache.juli.logging";version="2.21.0"
Import-Package                           org.apache.juli.logging;version="[8.0,12)";resolution:=optional,org.eclipse.jetty.util.log;version="[7.6,10)";resolution:=optional,org.apache.logging.log4j;version="[2.21,3)",org.apache.logging.log4j.spi;version="[2.21,3)"
Manifest-Version                         1.0                                     
Multi-Release                            false                                   
Provide-Capability                       osgi.service;objectClass:List<String>="org.apache.juli.logging.Log";effective:=active,osgi.serviceloader;osgi.serviceloader="org.apache.juli.logging.Log";register:="org.apache.logging.log4j.appserver.tomcat.TomcatLogger"
Require-Capability                       osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0.0)(!(version>=2.0.0)))";resolution:=optional,osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"

Module descriptor

module org.apache.logging.log4j.appserver@2.21.0.SNAPSHOT {
  requires java.base;
  requires org.apache.logging.log4j;
  requires static org.apache.tomcat.juli;
  requires static org.eclipse.jetty.util;
  exports org.apache.logging.log4j.appserver.jetty;
  exports org.apache.logging.log4j.appserver.tomcat;
  opens org.apache.logging.log4j.appserver.jetty;
  provides  org.apache.juli.logging.Log with
    org.apache.logging.log4j.appserver.tomcat.TomcatLogger;
}

@ppkarwasz
Copy link
Contributor Author

log4j-jcl

The only difference is a new module descriptor:

module org.apache.logging.log4j.jcl@2.21.0.SNAPSHOT {
  requires transitive commons-logging;
  requires java.base;
  requires transitive org.apache.logging.log4j;
  exports org.apache.logging.log4j.jcl;
  provides  org.apache.commons.logging.LogFactory with
    org.apache.logging.log4j.jcl.LogFactoryImpl;
}

@ppkarwasz
Copy link
Contributor Author

log4j-jpl

The only difference is a new module descriptor:

module org.apache.logging.log4j.jpl@2.21.0.SNAPSHOT {
  requires java.base;
  requires transitive org.apache.logging.log4j;
  exports org.apache.logging.log4j.jpl;
  provides  java.lang.System$LoggerFinder with
    org.apache.logging.log4j.jpl.Log4jSystemLoggerFinder;
}

@ppkarwasz
Copy link
Contributor Author

log4j-jul

New module descriptor:

module org.apache.logging.log4j.jul@2.21.0.SNAPSHOT {
  requires java.base;
  requires java.desktop;
  requires java.logging;
  requires transitive org.apache.logging.log4j;
  requires static org.apache.logging.log4j.core;
  exports org.apache.logging.log4j.jul;
}

@ppkarwasz
Copy link
Contributor Author

ppkarwasz commented Sep 29, 2023

log4j-slf4j-impl

  • the bundle symbolic and module name change to org.apache.logging.log4j.slf4j_impl ,
  • descriptor:
module org.apache.logging.log4j.slf4j_impl@2.21.0.SNAPSHOT {
  requires java.base;
  requires transitive org.apache.logging.log4j;
  requires transitive org.slf4j;
  requires static slf4j-ext;
  exports org.apache.logging.slf4j;
  exports org.slf4j.impl;
}

log4j-slf4j2-impl

  • the bundle symbolic and module name change to org.apache.logging.log4j.slf4j2_impl ,
  • descriptor:
module org.apache.logging.log4j.slf4j2_imple@2.21.0.SNAPSHOT {
 requires java.base;
 requires transitive org.apache.logging.log4j;
 requires transitive org.slf4j;
 exports org.apache.logging.slf4j;
 provides  org.slf4j.spi.SLF4JServiceProvider with
   org.apache.logging.slf4j.SLF4JServiceProvider;
}

@ppkarwasz
Copy link
Contributor Author

log4j-to-jul

New module name org.apache.logging.log4j.to_jul. Descriptor:

module org.apache.logging.log4j.to_jul@2.21.0.SNAPSHOT {
  requires java.base;
  requires java.logging;
  requires transitive org.apache.logging.log4j;
  exports org.apache.logging.log4j.tojul;
  provides  org.apache.logging.log4j.spi.Provider with
    org.apache.logging.log4j.tojul.JULProvider;
}

log4j-to-slf4j:

New module name org.apache.logging.log4j.to_slf4j.

Extended import versions:

Import-Package
  org.apache.logging.log4j               {version=[2.21,3)}
  org.apache.logging.log4j.message       {version=[2.21,3)}
  org.apache.logging.log4j.spi           {version=[2.21,3)}
  org.apache.logging.log4j.status        {version=[2.21,3)}
  org.apache.logging.log4j.util          {version=[2.21,3)}
  org.slf4j                              {version=[1.7,3)}
  org.slf4j.spi                          {version=[1.7,3)}
Export-Package
  org.apache.logging.slf4j               {version=2.21.0}

Descriptor:

module org.apache.logging.log4j.to_slf4j@2.21.0.SNAPSHOT {
requires java.base;
requires transitive org.apache.logging.log4j;
requires transitive org.slf4j;
exports org.apache.logging.slf4j;
provides  org.apache.logging.log4j.spi.Provider with
  org.apache.logging.slf4j.SLF4JProvider;
}

@ppkarwasz ppkarwasz mentioned this pull request Sep 29, 2023
29 tasks
@ppkarwasz ppkarwasz closed this Oct 2, 2023
@ppkarwasz ppkarwasz deleted the bnd-bridges branch October 2, 2023 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant