On Apr 28, 2007, at 10:47 PM, Paul Smith wrote:
My suggestions:
a) If you built log4j 1.2.15 with Maven, remove it from the
repository, build it with Ant and install it using mvn
install:install-file (attempt to build the bridge and it will tell
you the syntax). The Maven build doesn't include the log4j.dtd,
LICENSE, NOTICE and other resources that the Ant build places in
the Jar.
I've been doing this in the 1.2 source treee for the last week or
so, to keep my local maven repo up2date with the 1.2.15
ant clean jar
mvn install:install-file -DgroupId=log4j -DartifactId=log4j -
Dversion=1.2.15 -Dpackaging=jar -Dfile=/workspace/log4j12/dist/lib/
log4j-1.2.15.jar
Good. I could see trying to do a straight mvn install would be
tempting but dangerous.
b) svn update component and mvn install
c) Try to run the tests again on a fresh checkout. If the test
fails under Maven, try the ant build.
If eclipse and ant pass and maven fails, then we should take take
it to [EMAIL PROTECTED] I would suggest before doing that downloading
and installing a Gump built log4j 1.2.15 and trying the process
again. It would make it easier for any Maven guru debugging the
issue to not have to learn how to build log4j.
Weird, works with ant, but in Eclipse (maven plugin) and with maven
I now get a somewhat different error (see results further below).
I now get a NoSuchMethodError:
java.lang.NoSuchMethodError:
org.apache.log4j.spi.LocationInfo.<init>(Ljava/lang/String;Ljava/
lang/String;Ljava/lang/String;Ljava/lang/String;)V
at org.apache.logging.julbridge.JULLog4jEventConverter.convert
(JULLog4jEventConverter.java:124)
at org.apache.logging.julbridge.JULBridgeHandler.publish
(JULBridgeHandler.java:49)
at java.util.logging.Logger.log(Logger.java:428)
at java.util.logging.Logger.doLog(Logger.java:450)
at java.util.logging.Logger.log(Logger.java:473)
at java.util.logging.Logger.info(Logger.java:992)
at
org.apache.log4j.jul.JULReceiverTest.testJULReceiverPluginConfiguratio
n(JULReceiverTest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Looks like the classloader is pulling in the log4j that Maven is
configured to use. The method not found is one of the new constructors.
What's interesting is that if I blow away the log4j section of my
local maven repo, then install the 1.2.15 jar into the repo, when I
run 'mvn test' inside the JULI bridge, I see this:
Paul-Smiths-Computer:/workspace/juli-log4j-bridge paulsmith$ mvn test
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------
------
[INFO] Building Unnamed - org.apache.logging:apache-juli-log4j-
bridge:jar:0.1.0
[INFO] task-segment: [test]
[INFO]
----------------------------------------------------------------------
------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://repo1.maven.org/maven2/log4j/log4j/1.2.15/
log4j-1.2.15.pom
Downloading: http://repo1.maven.org/maven2/log4j/log4j/1.2.14/
log4j-1.2.14.pom
2K downloaded
[INFO] [compiler:compile]
.....
It seems to want to download the 1.2.14 stuff, but I can't see why
exactly.
I tried playing with several configuration tweaks with the surefire
plugin, but didn't find any joy.
How was the build.xml generated? Is the build.xml file generated
from maven?
By hand. Since Gump doesn't support Maven 2, I wrote a pretty simple
Ant build for each of the sandbox projects and have added the
projects to Gump's list of projects. Filters and PatternLayout seem
to be building fine and I think I have the nag messages going to
log4j-dev. Component is failing like it was getting the bridge code
by mistake, but all the project descriptors look right. I had put in
a project for the bridge but took it out when it looked like it was
going to be dormant for a while. No benefit for adding it back until
the weirdness with component is
I'm going to commit my local change for now and try the maven list.
I'll keep an eye on it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]