[ 
https://issues.apache.org/jira/browse/LOG4J2-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15720323#comment-15720323
 ] 

Gary Gregory edited comment on LOG4J2-1723 at 12/4/16 5:55 PM:
---------------------------------------------------------------

Does this patch allow the tests in the OSGi module to pass for you? 

Your comment:

{quote}
"The change from maven-bundle-plugin:2.5.3 to 3.2.0, as part of the study of 
LOG4J2-1637, caused the dependency on package javax.jms to become non optional 
which made the OSGi tests to fails." 
{quote}

seems to hint at it.





was (Author: garydgregory):
Does this patch allow the tests in the OSGi module to pass for you? 

Your comment:

{quote}
"The change from maven-bundle-plugin:2.5.3 to 3.2.0, as part of the study of 
LOG4J2-1637, caused the dependency on package javax.jms to become non optional 
which made the OSGi tests to fails." 
{quote}

seems to hint at it.

For me, the OSGi tests still fail with this patch:

mvn clean test

{noformat}
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.logging.log4j.osgi.tests.equinox.EquinoxLoadApiBundleTest
Running org.apache.logging.log4j.osgi.tests.felix.FelixLoadApiBundleTest
Tests run: 3, Failures: 0, Errors: 1, Skipped: 2, Time elapsed: 1.178 sec <<< 
FAILURE! - in org.apache.logging.log4j.osgi.tests.felix.FelixLoadApiBundleTest
testClassNotFoundErrorLogger(org.apache.logging.log4j.osgi.tests.felix.FelixLoadApiBundleTest)
  Time elapsed: 1.013 sec  <<< ERROR!
org.osgi.framework.BundleException: Unable to cache bundle: 
file:///E:/vcs/git/apache/logging/logging-log4j2/log4j-api/target/log4j-api-2.7.1-SNAPSHOT.jar
Caused by: java.io.FileNotFoundException: 
E:\vcs\git\apache\logging\logging-log4j2\log4j-api\target\log4j-api-2.7.1-SNAPSHOT.jar
 (The system cannot find the file specified)

Tests run: 3, Failures: 0, Errors: 1, Skipped: 2, Time elapsed: 1.583 sec <<< 
FAILURE! - in 
org.apache.logging.log4j.osgi.tests.equinox.EquinoxLoadApiBundleTest
testClassNotFoundErrorLogger(org.apache.logging.log4j.osgi.tests.equinox.EquinoxLoadApiBundleTest)
  Time elapsed: 1.278 sec  <<< ERROR!
org.osgi.framework.BundleException: An error occurred trying to read the bundle
Caused by: java.io.FileNotFoundException: 
E:\vcs\git\apache\logging\logging-log4j2\log4j-api\target\log4j-api-2.7.1-SNAPSHOT.jar
 (The system cannot find the file specified)


Results :

Tests in error:
  
EquinoxLoadApiBundleTest>AbstractLoadBundleTest.testClassNotFoundErrorLogger:143->AbstractLoadBundleTest.getApiBundle:71
 » Bundle
  
FelixLoadApiBundleTest>AbstractLoadBundleTest.testClassNotFoundErrorLogger:143->AbstractLoadBundleTest.getApiBundle:71
 » Bundle

Tests run: 6, Failures: 0, Errors: 2, Skipped: 4

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Log4j 2 ..................................... SUCCESS [  0.611 s]
[INFO] Apache Log4j API ................................... SUCCESS [ 21.280 s]
[INFO] Apache Log4j Core .................................. SUCCESS [12:56 min]
[INFO] Apache Log4j 1.x Compatibility API ................. SUCCESS [ 14.721 s]
[INFO] Apache Log4j SLF4J Binding ......................... SUCCESS [  9.722 s]
[INFO] Apache Log4j to SLF4J Adapter ...................... SUCCESS [  5.926 s]
[INFO] Apache Log4j Commons Logging Bridge ................ SUCCESS [  5.539 s]
[INFO] Apache Log4j Flume Bridge .......................... SUCCESS [ 27.651 s]
[INFO] Apache Log4j Web ................................... SUCCESS [  9.794 s]
[INFO] Apache Log4j Tag Library ........................... SUCCESS [ 22.021 s]
[INFO] Apache Log4j JMX GUI ............................... SUCCESS [  3.196 s]
[INFO] Apache Log4j Samples ............................... SUCCESS [  0.185 s]
[INFO] Apache Log4j Samples: Flume - Common ............... SUCCESS [  3.035 s]
[INFO] Apache Log4j Samples: Flume - Remote ............... SUCCESS [  0.543 s]
[INFO] Apache Log4j Samples: Flume - Embedded ............. SUCCESS [  1.590 s]
[INFO] Apache Log4j Samples: Configuration ................ SUCCESS [  4.404 s]
[INFO] Apache Log4j Samples: LoggerProperties ............. SUCCESS [  4.342 s]
[INFO] Apache Log4j Scala 2.11 wrapper for Log4j API ...... SUCCESS [ 32.606 s]
[INFO] Apache Log4j Samples: Scala API .................... SUCCESS [  4.918 s]
[INFO] Apache Log4j OSGi .................................. FAILURE [  4.406 s]
[INFO] Apache Log4j BOM ................................... SKIPPED
[INFO] Apache Log4j NoSQL ................................. SKIPPED
[INFO] Apache Log4J Performance Tests ..................... SKIPPED
[INFO] Apache Log4j Streaming Interface ................... SKIPPED
[INFO] Apache Log4j JUL Adapter ........................... SKIPPED
[INFO] Apache Log4j Liquibase Binding ..................... SKIPPED
[INFO] Apache Log4j Scala 2.10 wrapper for Log4j API ...... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15:55 min
[INFO] Finished at: 2016-12-04T09:39:37-08:00
[INFO] Final Memory: 43M/557M
[INFO] ------------------------------------------------------------------------
{noformat}



> Unwanted transitive dependency on geronimo-jms_1.1_spec
> -------------------------------------------------------
>
>                 Key: LOG4J2-1723
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1723
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.7
>            Reporter: Ludovic HOCHET
>            Priority: Minor
>         Attachments: patch-log4j2-1723.diff
>
>
> The change from maven-bundle-plugin:2.5.3 to 3.2.0, as part of the study of 
> LOG4J2-1637, caused the dependency on package javax.jms to become non 
> optional which made the OSGi tests to fails. Post LOG4J2-1637, LOG4J2-1664 
> was created to improve the OSGi tests and this problem was "offloaded" to it. 
> Since this problem does not originate in the OSGi tests, I'm creating a new 
> issue for it.
> Since this appeared with a change of maven-bundle-plugin, I had a look into 
> how it processed optional dependencies since it was apparently not handling 
> the optional declaration of jboss-jms-api_1.1_spec. As it happened it did add 
> the javax.jms package from that dependency to the list of optional packages, 
> but at the same time it was adding the same package to the list of required 
> packages. Further checks showed that it was picking up the required package 
> from geronimo-jms_1.1_spec which is a transitive dependency of 
> activemq-broker (shown with dependency:tree). Since the JMS specifications 
> are already included with jboss-jms-api_1.1_spec, the  geronimo-jms_1.1_spec 
> should be excluded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to