You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Akbarr <ak...@gmail.com> on 2006/02/26 23:34:53 UTC

[m2] Hibernate doclet

I'm migrating my projects from Ant to Maven, and I've found a problem when trying to run Hibernate Doclet from Maven 2. I've tried to:

   * Run Ant code with antrun plugin

   * Make an Ant plug-in running Hibernate doclet

   * Use hibernatedoclet-maven-plugin from org.codehaus.mojo

After dealing with sever classpath issues, I obtain the same results in every three choices:

"Embedded error: Can't create a hibernate element under hibernatedoclet. Make sure the jar file containing the corresponding subtask class is on the classpath specified in the <taskdef> that defined {2}."

There's another choice, which is to migrate to XDoclet2, but I've seen that although it works fine:

   * The hibernate tags are sligthly different, e.g. "collection-key" is just "key" in XDoclet2

   * I've found at least one error: when declaring a query, the generated XML has an empty "representation" node into the query, which finally raises a validation error.

I'm sure that someone must have been in a similar case before, so any suggestion, please?. Have I done anything wrong?

Andrés


RE: [m2] Hibernate doclet

Posted by Johann Reyes <jr...@hiberforum.org>.
Hello Andres

About xdoclet2

1) Yes, there are changes like that, but mostly they are minimal if you
don't use many collections in your objects.

2) The empty query is because you are breaking your queries in 2 or more
lines, with queries, you just have to create the whole query in one line or
else the query just breaks and your hibernate mapping with it.

Regards

Johann Reyes

-----Original Message-----
From: Akbarr [mailto:akbarr@gmail.com] 
Sent: Sunday, February 26, 2006 5:35 PM
To: users
Subject: [m2] Hibernate doclet


I'm migrating my projects from Ant to Maven, and I've found a problem when
trying to run Hibernate Doclet from Maven 2. I've tried to:

   * Run Ant code with antrun plugin

   * Make an Ant plug-in running Hibernate doclet

   * Use hibernatedoclet-maven-plugin from org.codehaus.mojo

After dealing with sever classpath issues, I obtain the same results in
every three choices:

"Embedded error: Can't create a hibernate element under hibernatedoclet.
Make sure the jar file containing the corresponding subtask class is on the
classpath specified in the <taskdef> that defined {2}."

There's another choice, which is to migrate to XDoclet2, but I've seen that
although it works fine:

   * The hibernate tags are sligthly different, e.g. "collection-key" is
just "key" in XDoclet2

   * I've found at least one error: when declaring a query, the generated
XML has an empty "representation" node into the query, which finally raises
a validation error.

I'm sure that someone must have been in a similar case before, so any
suggestion, please?. Have I done anything wrong?

Andrés





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org