Hello Andi

Well you just found a bug. I fixed already in SVN and deployed a new
snapshot. Try it out and let me know how it works

Regards

Johann Reyes

-----Original Message-----
From: garbandi [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 05, 2007 8:02 AM
To: users@maven.apache.org
Subject: RE: using hibernate3-maven-plugin:hmb2ddl with test-classes


hi johann,

thanks for your help. adding the flag to the properties leads to various
lines of output

[INFO] found EJB3 Entity bean: XXX

where XXX now contains the classes in the test-classes directory

but then i receive a new ClassNotFoundException for those classes:

Caused by: java.lang.ClassNotFoundException: XXX
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.j
ava:195)
        at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:
255)
        at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:
274)
        at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:
274)
        at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:21
4)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at
org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:112)
        at
org.codehaus.mojo.hibernate3.configuration.AnnotationComponentConfiguration.
classForName(AnnotationComponentConfiguration.java:204)
        at
org.codehaus.mojo.hibernate3.configuration.AnnotationComponentConfiguration.
addNamedAnnotatedClasses(AnnotationComponentConfiguration.java:175)
        ... 22 more

when i move the testclasses back to the src-area everything works.

seems that the classloader doesn't contain the test-classes, although you
find them.

any idea?

regards,
andi


Johann Reyes-2 wrote:
> 
> Hello Andi
> 
> Sorry, but I haven't document yet that part of the plugin because it's
> being
> tested. To scan the test-classes directory you need to add the following
> flag to your <componentProperties> element:
> 
> <componentProperties>
>   <scan-classes>true</scan-classes>
> </componentProperties>
> 
> Let me know if you have any question
> 
> Regards
> 
> Johann Reyes
> 
> 

-- 
View this message in context:
http://www.nabble.com/using-hibernate3-maven-plugin%3Ahmb2ddl-with-test-clas
ses-tf2912961s177.html#a8177566
Sent from the Maven - Users mailing list archive at Nabble.com.


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




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

Reply via email to