You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2017/07/06 07:33:46 UTC

Classes found in the wrong directory: {META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class=org.apache.logging.log4j.util.StackLocator}

Hi All,

When I run certain mvn commands, I get:

[INFO] --- maven-bundle-plugin:3.3.0:manifest (default) @ log4j-api ---
[ERROR] Manifest org.apache.logging.log4j:log4j-api:jar:2.9-SNAPSHOT :
Classes found in the wrong directory:
{META-INF/versions/9/org/apache/logging/log4j/util/
StackLocator.class=org.apache.logging.log4j.util.StackLocator}
[ERROR] Error(s) found in manifest configuration
[INFO]
------------------------------------------------------------------------

The simplest way to reproduce:

mvn install -DskipTests

Gary

Re: Classes found in the wrong directory: {META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class=org.apache.logging.log4j.util.StackLocator}

Posted by Apache <ra...@dslextreme.com>.
Fwiw, this could be fixed by adding the clean plugin to delete that directory on every build

Sent from my iPad

> On Jul 6, 2017, at 12:33 AM, Gary Gregory <ga...@gmail.com> wrote:
> 
> Hi All,
> 
> When I run certain mvn commands, I get:
> 
> [INFO] --- maven-bundle-plugin:3.3.0:manifest (default) @ log4j-api ---
> [ERROR] Manifest org.apache.logging.log4j:log4j-api:jar:2.9-SNAPSHOT :
> Classes found in the wrong directory:
> {META-INF/versions/9/org/apache/logging/log4j/util/
> StackLocator.class=org.apache.logging.log4j.util.StackLocator}
> [ERROR] Error(s) found in manifest configuration
> [INFO]
> ------------------------------------------------------------------------
> 
> The simplest way to reproduce:
> 
> mvn install -DskipTests
> 
> Gary



Re: Classes found in the wrong directory: {META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class=org.apache.logging.log4j.util.StackLocator}

Posted by Apache <ra...@dslextreme.com>.
If you don't run clean then the OSGi plugin will barf over those classes as it does not ignore classes in the "wrong" place, it doesn't support java 9, and it doesn't support multi-release jars. I have opened an issue on the Felix maven bundle plugin that is being ignored.

Short answer. You have to use clean.

Ralph

> On Jul 6, 2017, at 12:33 AM, Gary Gregory <ga...@gmail.com> wrote:
> 
> Hi All,
> 
> When I run certain mvn commands, I get:
> 
> [INFO] --- maven-bundle-plugin:3.3.0:manifest (default) @ log4j-api ---
> [ERROR] Manifest org.apache.logging.log4j:log4j-api:jar:2.9-SNAPSHOT :
> Classes found in the wrong directory:
> {META-INF/versions/9/org/apache/logging/log4j/util/
> StackLocator.class=org.apache.logging.log4j.util.StackLocator}
> [ERROR] Error(s) found in manifest configuration
> [INFO]
> ------------------------------------------------------------------------
> 
> The simplest way to reproduce:
> 
> mvn install -DskipTests
> 
> Gary