Hi,
Having a look at the plugin code, it doesn't seem to be useful to add
log4j in your classpath.
When tests are executed with cobertura, the following classpath entries
are added :
<!-- global definitions -->
<ant:path id="cobertura.classpath">
<ant:pathelement path="${maven.build.dest}"/>
<ant:pathelement path="${plugin.getDependencyPath
('urbanophile:java-getopt')}"/>
<ant:pathelement path="${plugin.getDependencyPath
('javancss:javancss')}"/>
<ant:pathelement path="${plugin.getDependencyPath('javancss:ccl')}"/>
<ant:pathelement path="${plugin.getDependencyPath('asm')}"/>
<ant:pathelement path="${plugin.getDependencyPath('oro')}"/>
<ant:pathelement path="${plugin.getDependencyPath('log4j')}"/>
<ant:pathelement path="${plugin.getDependencyPath('cobertura')}"/>
</ant:path>
For which class do you have a NoClassDefFoundError ? Can't it be a
conflict between the version of log4J in your project and the one used in
the cobertura plugin ?
Arnaud
On 1/9/07, Srilakshmanan, Lakshman <
[EMAIL PROTECTED]> wrote:
Hi All,
I am using maven-cobertura-plugin-1.2 & cobertura-1.8.
We have extended the org.apache.log4j.AppenderSkeleton class.
When cobertura tries to instrument the class a
java.lang.NoClassDefFoundError is thrown.
I have searched the mail archive and found mails referring to older
versions, and that it was fixed in cobertura-1.8. There are also mails
suggesting to add log4j in the project classpath.
Could someone please tell me if you have tried to extend the a log4j
class and if you experienced the same problem or am I just unlucky and
did something wrong in my implementation.
Is adding log4j to class path done as follows
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
<url>log4j/jars</url>
<properties>
<classloader>root.maven</classloader>
</properties>
</dependency>
The funny part is, there is a message "adding dependency
/repository/log4j/jars/log4j-1.2.8.jar into project classloader". So I
don't quite believe adding log4j to the project classpath would resolve
the problem. I believe I need to add it to the classpath used by
cobertura and I don't believe it is using the project classpath.
Any help/suggestions is greatly appreciated.
Thanks in advance.
Thanks
Lakshman
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]