On Aug 17, 2008, at 4:22 PM, Niklas Gustavsson wrote:

On Thu, Aug 14, 2008 at 1:02 AM, Curt Arnold <[EMAIL PROTECTED]> wrote:
Between the JMX, JMS, SMTP and other appenders, log4j does import many
java.* and javax.* packages.  Those packages aren't essential to the
functioning of log4j, just specific appenders.

How about making these imports optional? That way, should the
dependency be available, the appender would work as expected. But, at
the same time it won't put any burden on those who don't want for
example JMS to be availble.

I believe you can get that by (just using JMS as an example):
<Import-Package>!com.ibm.uvm.tools,! com.sun.jdmk.comm,javax.jms;resolution:=optional,*</Import-Package>

I tried to test this in your code but ran into problems with the
somewhat complex Maven build setup. I'm probably spoiled with Maven
builds that just work out of the box :-)

/niklas

I've modified the pom.xml per your suggestion. Rev 686885 should have the changes. I also commented out a dependency on JMX in the pom.xml that was only needed if attempting to build on JDK 1.4. I think that was the source of your problem with the Maven build not working out of the box. It will be time-consuming (a few minutes) due to the unit tests, but hopefully will work out of the box. If you are still having problems building, please report the build issues either here, on log4j-dev or bugzilla bug 44517. Would appreciate any other comments on the bundling or any experience using the generated bundle in place of the repackagings of earlier log4j's.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to