[ https://issues.apache.org/jira/browse/LOG4J2-805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14113182#comment-14113182 ]
Matt Sicker commented on LOG4J2-805: ------------------------------------ Fixed in trunk. Please verify and close. > 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 > Assignee: Matt Sicker > Priority: Critical > Labels: easyfix, jms, maven, osgi > > 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-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org