You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Roland <wg...@ids.de> on 2013/09/04 17:37:48 UTC

make maven dependencies to "optional"

Hello log4j2-experts,
Is it possible to make the dependencies optional, so I do not need to
install libraries, which I do not need. E.g. I do not need SQL- and
http-stuff! All the (transitiv) log4j2-dependencies together are much bigger
than my own application. This is a realy big drawback!

Thanks & Regards
Roland



--
View this message in context: http://apache-logging.6191.n7.nabble.com/make-maven-dependencies-to-optional-tp40459.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: make maven dependencies "optional"

Posted by Roland <wg...@ids.de>.
https://issues.apache.org/jira/browse/LOG4J2-389



--
View this message in context: http://apache-logging.6191.n7.nabble.com/make-maven-dependencies-optional-tp40459p40464.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: make maven dependencies "optional"

Posted by Roland <wg...@ids.de>.
After I made log4j-core-osgi-reduced lightweight, I get following exception:

Exception in thread "Log4j2-Test" java.lang.NullPointerException
	at
org.apache.logging.log4j.core.pattern.PatternParser.<init>(PatternParser.java:120)
	at
org.apache.logging.log4j.core.pattern.PatternParser.<init>(PatternParser.java:102)
	at
org.apache.logging.log4j.core.layout.PatternLayout.createPatternParser(PatternLayout.java:183)
	at
org.apache.logging.log4j.core.layout.PatternLayout.<init>(PatternLayout.java:115)
	at
org.apache.logging.log4j.core.layout.PatternLayout.createLayout(PatternLayout.java:219)
	at
org.apache.logging.log4j.core.config.DefaultConfiguration.<init>(DefaultConfiguration.java:51)
	at
org.apache.logging.log4j.core.LoggerContext.<init>(LoggerContext.java:63)
	at
org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:217)
	at
org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:126)
	at
org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:81)
	at
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:83)
	at
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:34)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:200)
	at
org.apache.log4j.LogManager$PrivateManager.getContext(LogManager.java:215)
	at org.apache.log4j.LogManager.getLogger(LogManager.java:77)
	at log4j2test.Log4j2testActivator.run(Log4j2testActivator.java:84)
	at java.lang.Thread.run(Thread.java:662)



manager.collectPlugins(); fails after calling it a second time.

What I have missed?

Thanks & Regards
Roland



--
View this message in context: http://apache-logging.6191.n7.nabble.com/make-maven-dependencies-optional-tp40459p40651.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org