xdoclet 2.0 anyone?


Wondering if anybody else has gotten around to trying xdoclet 2.0 with IntelliJ
IDEA 5.0 yet? I'm using hibernate 3.0.5 and the outstanding bugs & support
issues that surround xdoclet 1.2 (& 1.3) and the newer hibernate 3 sytanx
seem to be forcing my hand into trying (pushing?) my luck with xdoclet2.

Whats happening with xdoclet2 (103 plugins build) is that I seem to need
to add all the xdoclet libs (& plugins?) to my ant tab -> properties -> classpath
before the taskdef is even happy.. but then I get a "Class Not Found: Classloader
URLs (classpath)" error message while executing the task. Suspect this has
something to do with xdoclet2 using picocontainer internally which isnt playing
nice with IDEAs intergrated ant support.. but more than happy to be proved
wrong ..Anyone?

BTW The same task seems to run from the command prompt - well it fails because
all the hibernate tags have changed -- but in any case it gets further than
the intergrated one. Would be nice to know how to remove all those xdoclet
libs from the ant classpath.. setting up the classpath for ant isnt quite
as nice as they are for the project as I cant reuse library or project definitions
- just a small pain.

p.s. don't talk to me about annotations - they're right out for a start as
we're stuck supporting jdk 1.4.1.. like forever!

Ta very much,

- Richard

build.xml ]]>
<mkdir dir="$/build/generated"/> <path id="xdoclet.task.classpath"> <fileset dir="${xdoclet2.dir}/plugins"> <include name="*.jar"/> </fileset> <fileset dir="${xdoclet2.dir}/lib"> <include name="*.jar"/> </fileset> </path> <taskdef name="xdoclet" classname="org.xdoclet.ant.XDocletTask" classpathref="xdoclet.task.classpath"/> <xdoclet> <fileset dir="src"> <include name="*/.java"/> </fileset> <component classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin" destdir="$/target/xdoclet/"/>
</xdoclet>
</target>

</code>


2 comments

Wondering if anybody else has gotten around to trying
xdoclet 2.0 with IntelliJ
IDEA 5.0 yet? I'm using hibernate 3.0.5 and the
outstanding bugs & support
issues that surround xdoclet 1.2 (& 1.3) and the
newer hibernate 3 sytanx
seem to be forcing my hand into trying (pushing?) my
luck with xdoclet2.


Yes, I'm using xdoclet2 for hibernate mapping generation (look out: 1.0.3 is broken in this regard, you will have to use 1.0.4 snapshot).

Whats happening with xdoclet2 (103 plugins build) is
that I seem to need
to add all the xdoclet libs (& plugins?) to my ant
tab -> properties -> classpath


correct

before the taskdef is even happy.. but then I get a
"Class Not Found: Classloader
URLs (classpath)" error message while executing the
task. Suspect this has
something to do with xdoclet2 using picocontainer
internally which isnt playing
nice with IDEAs intergrated ant support.. but more
than happy to be proved
wrong ..Anyone?


Me: I do not experience anything similar! I am pretty happy with xdoclet2, instead: it is fast and feels well thought out (it's a pity they released 1.0.3 with a huge bug for hibernate support).

BTW The same task seems to run from the command
prompt - well it fails because
all the hibernate tags have changed -- but in any
case it gets further than
the intergrated one. Would be nice to know how to
remove all those xdoclet
libs from the ant classpath.. setting up the
classpath for ant isnt quite
as nice as they are for the project as I cant reuse
library or project definitions
- just a small pain.


Uh, I don't know what I can say to help you. In my IDEA ant properties (additional classpath) I have set the dir where the xdoclet2 (+plugins) are and the hibernate2 jar and I took care not to put the same jar in the ant dir (I don't know if this is different for you nor if this could determine your problem). My ant config is:

]]>

0

Thanks, yes I've built a 1.0.4-snapshot from the sources now and the hibernate

generation is finally working. Got a few unit test failures while building
the
plugin source, but I guess thats expected with snapshots.

Also got xdoclet2 working via the intergated ant support, I think the problem

was with the binary distribution - when I came to add xdoclet to the ant
classpath I added the xdoclet directories lib and plugins rather than adding
each jar individually.. the former doesnt seem to work.

What I'm doing now is I've got seperate libs and build-libs directorys. The
build-libs
has a copy of all the xdoclet 1.0.4 jars; including the hibernate-plugin
and ant
now has each indidiulal jar to the ant classpath (all in the same directory)
which
appears to work for both the command line and from within IDEA.

I suppose to avoid having to mess with the ant classpath too much I could
always rewrite the xdoclet task to fork off to another jvm, which should
use its
own script-specified classpath rather than something borrowed from IDEA.

- Richard


0

Please sign in to leave a comment.