You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Florian Brunner (JIRA)" <ji...@apache.org> on 2014/08/28 01:58:57 UTC
[jira] [Created] (LOG4J2-805) Dependency jboss-jms-api_1.1_spec
should be optional
Florian Brunner created LOG4J2-805:
--------------------------------------
Summary: Dependency jboss-jms-api_1.1_spec should be optional
Key: LOG4J2-805
URL: https://issues.apache.org/jira/browse/LOG4J2-805
Project: Log4j 2
Issue Type: Bug
Components: Core
Affects Versions: 2.0.2
Reporter: Florian Brunner
Priority: Critical
Currently, the JMS dependency looks like this:
{code}
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
{code}
but this generates in the Manifest an OSGi Import-Package entry without "resolution:=optional" for the javax.jms package.
OSGi then throws errors if there's no javax.jms available (which is not needed e.g. in most rich clients), which confuses users: http://forum.drombler.org/general/thread/07ffc657
To fix this, I think the dependency should look like this:
{code}
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
{code}
Work-around:
Explicitly add the dependency to your POM (even if you don't use JMS):
{code}
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
<version>1.0.1.Final</version>
<scope>runtime</scope>
</dependency>
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org