Hi there,

  I sent this yesterday to the XDoclet2 list but nobody answered...
I'm posting it here in the hope that somebody comments it, as I also
think that this is applicable to XDoclet1...

  First of all, this doesn't intend to be an attack to XDoclet, I've
been using it for a long time and I've been quite pleased with it.
Having said this, let's begin the criticism ;o)

  I have recently come across a problem that it doesn't seem to have
an easy or elegant solution: I was using maven to create a domain
model containing classes persisted with Hibernate, and I splitted the
model so I could have some reusable abstractions tagged with
@hibernate tags. The problem is that when I used the Hibernate doclet
to generate the mapping files I wasn't successful... why? Evidently
because dependencies are commonly resolved using precompiled jars (at
least in maven) and XDoclet didn't have access to the source files of
the dependency containing the reusable abstractions.

  As I told you before, I don't see an easy or elegant way of solving
this other than including the source files of the dependency so
XDoclet has access to them... why do I talk about Java annotations in
the subject? Well, because, from my limited understanding of Java
annotations gathered after a quick reading of the release notes, it
seems that this could be easily solved if instead using XDoclet tags
you used Java annotations. Java annotations seems to be an special
kind of "interface" (take this with a bit of salt) so the annotation
information seems to travel with the bytecode of the Java class and is
accessible using the reflection API. So it seems you could have access
to the annotations even if you don't have access to the source code of
the dependency... am I wrong? If this is correct, my problem would be
gone easily...

  Best regards
  Jose


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to