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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to