logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: Plugins.dat file not packing with jar for OSGi bundle
Date Fri, 08 Sep 2017 04:48:49 GMT
Sounds like this could be a bug with the maven-bundle-plugin. Have you
tried bnd-maven-plugin? <http://bndtools.org/>

Also, chances are there could be some ClassLoader issues anyways
considering all the log4j-core imports we've added to log4j-api to fix
similar issues. If you have issues with that, a bug report would be great.

On 7 September 2017 at 13:11, Asma Zinneera Jabir <azinneera@gmail.com>
wrote:

> I want to create an osgi bundle with custom appenders in it and tried with
> creating a simple maven project. The Plugins.dat file gets packed in the
> jar with the simple maven pom. When I add the apache felix plugin and
> change packaging to bundle  to make it an OSGI bundle the Plugins.dat does
> not get packed. The pom elements I used to convert it to an OSGI
>  bundle is as below.
>
>  <packaging>bundle</packaging>  and
>
> <plugin>
>     <groupId>org.apache.felix</groupId>
>     <artifactId>maven-bundle-plugin</artifactId>
>     <version>3.0.1</version>
>     <extensions>true</extensions>
>     <configuration>
>         <instructions>
>             <Bundle-SymbolicName>${project.artifactId}</Bundle-
> SymbolicName>
>             <Bundle-Name>${project.artifactId}</Bundle-Name>
>             <Bundle-Version>1.0.0</Bundle-Version>
>             <Fragment-Host>com.example.host.bundle</Fragment-Host>
>             <Export-Package>
>                 com.example.log4j2.plugins.*
>             </Export-Package>
>             <DynamicImport-Package>
>                 *;resolution:=optional
>             </DynamicImport-Package>
>             <Import-Package>
>                 !com.example.log4j2.plugins.*
>             </Import-Package>
>         </instructions>
>     </configuration>
> </plugin>
>



-- 
Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message