You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Frédéric Dreier <fr...@wistar.ch> on 2004/12/22 08:52:09 UTC
xdoclet & hibernate
Hi,
I'm looking to port my ant-based project to maven, but just got in
troubles with xdoclet.
my problems are :
- an exception :
java.lang.NoSuchMethodError:
xjavadoc.XClass.getTransformedName()Ljava/lang/String;
at
xdoclet.modules.hibernate.HibernateSubTask.getGeneratedFileName(HibernateSubTask.java:76)
...
- hbm.xml files are generated for dtd 1.1 instead of 2.0.
and hibernate try constantly to download the dtd since it is not in 2.0
jar file
- hibernatecfg task complains that a datasource or a jdbc connection
have to be defined.
I am a maven-newbie (and even not already understood the all maven
concepts and tricks), could someone help me?
Thanks,
Frédéric
PS:
What I actually use :
<hibernatedoclet
destdir="target/xdoclet/hibernatedoclet/"
excludedtags="@version,@author,@todo"
force="true"
mergedir="src/merge"
verbose="true">
<fileset dir="src/java">
<include name="**/hibernate/**/*.java"/>
</fileset>
<hibernate version="2.0"/>
<hibernatecfg
destDir="target/xdoclet/hibernatedoclet/"jdbcUrl="jdbc:mysql://localhost/dreier-isp"
driver="org.gjt.mm.mysql.Driver"
userName="dreier-isp" password="******"
dialect="net.sf.hibernate.dialect.MySQLDialect"/>
</hibernatedoclet>
What I have done with maven :
I downloaded the last xdoclet plugin :
maven -DartifactId=maven-xdoclet-plugin -DgroupId=xdoclet
-Dversion=1.2.2-SNAPSHOT plugin:download
I added the following properties :
maven.xdoclet.hibernatedoclet.destDir=${maven.build.dir}/xdoclet/hibernatedoclet
maven.xdoclet.hibernatedoclet.version=2.0
maven.xdoclet.hibernatedoclet.verbose=true
maven.xdoclet.hibernatedoclet.fileset.0=true
maven.xdoclet.hibernatedoclet.fileset.0.dir=${maven.src.dir}/java
maven.xdoclet.hibernatedoclet.fileset.0.include=**/*.java
maven.xdoclet.hibernatedoclet.hibernatecfg.0=true
maven.xdoclet.hibernatedoclet.hibernatecfg.0.jdbcUrl=jdbc:mysql://localhost/dreier-isp
maven.xdoclet.hibernatedoclet.hibernatecfg.0.dialect=net.sf.hibernate.dialect.MySQLDialect
maven.xdoclet.hibernatedoclet.hibernatecfg.0.driver=org.gjt.mm.mysql.Driver
maven.xdoclet.hibernatedoclet.hibernatecfg.0.userName=dreier-isp
maven.xdoclet.hibernatedoclet.hibernatecfg.0.password=*******
and dependencies :
<dependency><artifactId>xdoclet</artifactId><groupId>xdoclet</groupId><version>1.2.2-SNAPSHOT</version><type>jar</type></dependency>
<dependency><artifactId>xdoclet-ejb-module</artifactId><groupId>xdoclet</groupId><version>1.2.2-SNAPSHOT</version><type>jar</type></dependency>
<dependency><artifactId>xdoclet-apache-module</artifactId><groupId>xdoclet</groupId><version>1.2.2-SNAPSHOT</version><type>jar</type></dependency>
<dependency><artifactId>xdoclet-web-module</artifactId><groupId>xdoclet</groupId><version>1.2.2-SNAPSHOT</version><type>jar</type></dependency>
<dependency><artifactId>xdoclet-xdoclet-module</artifactId><groupId>xdoclet</groupId><version>1.2.2-SNAPSHOT</version><type>jar</type></dependency>
<dependency><id>xdoclet-hibernate-module</id><groupId>xdoclet</groupId><version>1.2.2-SNAPSHOT</version><type>jar</type></dependency>
<dependency><id>hibernate</id><version>2.0.1</version><properties><war.bundle>true</war.bundle></properties></dependency>
<dependency><id>odmg</id><version>3.0</version><properties><war.bundle>true</war.bundle></properties></dependency>
<dependency><id>bcel</id><version>5.0</version><properties><war.bundle>true</war.bundle></properties></dependency>
<dependency><id>dom4j</id><version>1.4</version><properties><war.bundle>true</war.bundle></properties></dependency>
<dependency><id>cglib</id><version>1.0</version><properties><war.bundle>true</war.bundle></properties></dependency>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: xdoclet & hibernate
Posted by Konstantin Priblouda <kp...@yahoo.com>.
--- Fr�d�ric Dreier <fr...@wistar.ch> wrote:
> Hi,
>
> I'm looking to port my ant-based project to maven,
> but just got in
> troubles with xdoclet.
>
> my problems are :
> - an exception :
> java.lang.NoSuchMethodError:
>
xjavadoc.XClass.getTransformedName()Ljava/lang/String;
> at
>
xdoclet.modules.hibernate.HibernateSubTask.getGeneratedFileName(HibernateSubTask.java:76)
That means that you got wrong version of xjavadoc...
> ...
> - hbm.xml files are generated for dtd 1.1 instead of
> 2.0.
> and hibernate try constantly to download the dtd
> since it is not in 2.0
> jar file
>
> - hibernatecfg task complains that a datasource or a
> jdbc connection
> have to be defined.
>
> I am a maven-newbie (and even not already understood
> the all maven
> concepts and tricks), could someone help me?
Well, if hibernate is just that what you need, you
could easily switch to xdoclet-2 ( its hibernate
plugin is in good shape )
Homepage of xdoclet-2 is: http://xdoclet.codehaus.org
There you will find necessary information.
I would recommend to steal the basic dependencies from
http://www.sourceforge.net/xdoclet-plugins/ project
( xdoclet 2 plugins are build using xdoclet 2 itself )
And do not forget to specify remote repository of
codehaus - not everything lives on ibiblio
( steal it from project.properties of xdocelt-plugins
)
regards,
=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
... Sucht gerade nach neuen Projekt oder Festanstelung....
Plugins for xdoclet-2 are released. check it out at:
http://www.sourceforge.net/projects/xdoclet-plugins/
----[ http://www.pribluda.de ]------------------------
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org