Hi,
I use HibernateTools 3.0beta4 to create my POJOs with Hibernate Annotations 3.0beta8. In our project we also use Cobertura which depends on asm-2.0.jar. If I run my ant hibernatetool task to generate the POJOs I get a NoSuchMethodError because asm-2.0.jar doesn't seem to have this method. I think this method is in asm.jar or asm-attr.jar which came with Hibernate Tools 3.0beta4.
Code:
hibernatetool.base:
[hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernatetool] 1. task: generic exporter
BUILD FAILED
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
Total time: 3 seconds
But with these jars (asm.jar and asm-attr.jar) Cobertura doesn't work any more. I tried to exlude asm-2.0.jar in my classpath definition for the hibernatetool task, but it seems to be in the classpath anyway.
Code:
<hibernatetool
destdir="${hibernatetool.destdir}"
templatepath="${hibernatetool.template.path}/base_pojo">
<classpath>
<pathelement path="${developer.working.directory.classes}" />
<path refid="lib.external.class.path" />
<fileset dir="${java.basedir}/lib/meta">
<patternset>
<include name="**/*.jar" unless="**/asm-2.0.jar" />
<include name="**/*.zip" />
<exclude name="**/Jindent.jar" />
</patternset>
</fileset>
</classpath>
....
Is there something wrong in my unless-attribute or a asm-version available which fixes this issue? I already tried asm-2.2.1.jar and asm-3.0.beta.jar but had no success. :-(
Rgds,
Axel