Hibernate 3 + ant

Olá,
tenho um build.xml q eu uso p/ gerar o mapeamento do Hibernate, porém, eu usava na versao 2 do Hibernate, e no ant colocava uma tag <hibernate version=“2.0”/>
mas se eu mudo p/ <hibernate version=“3.0”/>, como já vi pela net, dá um erro:

C&#58;\java\workspace\arrWeb\arrWeb\WEB-INF\build.xml&#58;32&#58; 3.0 is not a legal value for this attribute

Meu build.xml:

[code]<project name="arrWeb" default="deploy" basedir=".">

&lt;property file=&quot;build.properties&quot; /&gt;
&lt;property name=&quot;tomcat.home&quot; value=&quot;C&#58;/java/jakarta-tomcat-5.0.28&quot; /&gt;
&lt;property name=&quot;build&quot; value=&quot;../bin&quot; /&gt;
&lt;property name=&quot;src&quot; value=&quot;../../src&quot; /&gt;
&lt;property name=&quot;web&quot; value=&quot;../&quot; /&gt;
&lt;property name=&quot;deploy.dir&quot; value=&quot;$&#123;tomcat.home&#125;/webapps&quot; /&gt;

&lt;target name=&quot;init&quot;&gt;
	&lt;echo message=&quot;Inicializando a contrucao do projeto...&quot; /&gt;
	&lt;mkdir dir=&quot;$&#123;build&#125;&quot; /&gt;
&lt;/target&gt;


&lt;target name=&quot;generate&quot; depends=&quot;init&quot;&gt;
	&lt;echo message=&quot;Gerando mapeamento O/R para Hibernate...&quot; /&gt;
	&lt;taskdef name=&quot;hibernatedoclet&quot;
	    classname=&quot;xdoclet.modules.hibernate.HibernateDocletTask&quot;&gt;
	    &lt;classpath&gt;
	        &lt;fileset dir=&quot;C&#58;/java/eclipse/plugins/org.jboss.ide.eclipse.xdoclet.core_1.4.1.e31-jre15&quot;&gt;
	            &lt;include name=&quot;*.jar&quot;/&gt;
	        &lt;/fileset&gt;
	    &lt;/classpath&gt;
	&lt;/taskdef&gt;
	
	&lt;hibernatedoclet
	    destdir=&quot;$&#123;src&#125;&quot;
	    excludedtags=&quot;@version,@author,@todo&quot;
	    force=&quot;$&#123;src&#125;&quot;
	    mergedir=&quot;$&#123;src&#125;&quot;
	    verbose=&quot;false&quot;&gt;

	    &lt;fileset dir=&quot;$&#123;src&#125;&quot;&gt;
	        &lt;include name=&quot;**/*.java&quot;/&gt;
	    &lt;/fileset&gt;

	    &lt;hibernate version=&quot;2.0&quot;/&gt;
		
		&lt;hibernatecfg
			driver=&quot;com.mysql.jdbc.Driver&quot;
			jdbcUrl=&quot;jdbc&#58;mysql&#58;//web-des/arrweb&quot;
			username=&quot;xxxxxxxxx&quot;
			password=&quot;xxxxxxx&quot;
			dialect=&quot;org.hibernate.dialect.MySQLMyISAMDialect&quot;
			showSql=&quot;true&quot;
			poolsize=&quot;5&quot;
			destDir=&quot;$&#123;src&#125;&quot;
			mergeDir=&quot;$&#123;src&#125;&quot;
		/&gt;
	&lt;/hibernatedoclet&gt;
&lt;/target&gt;


&lt;path id=&quot;classpath.dir&quot;&gt;
	&lt;fileset dir=&quot;lib&quot;&gt;
		&lt;include name=&quot;**/*.jar&quot; /&gt;
	&lt;/fileset&gt;
	&lt;fileset dir=&quot;$&#123;tomcat.home&#125;/common/lib&quot;&gt;
		&lt;include name=&quot;**/*.jar&quot; /&gt;
	&lt;/fileset&gt;
&lt;/path&gt;


&lt;target name=&quot;compile&quot; depends=&quot;generate&quot;&gt;
	&lt;echo message=&quot;Compilando projeto...&quot; /&gt;
	&lt;javac srcdir=&quot;$&#123;src&#125;&quot; destdir=&quot;$&#123;build&#125;&quot; classpathref=&quot;classpath.dir&quot; /&gt;
	&lt;copy todir=&quot;$&#123;build&#125;&quot;&gt;
		&lt;fileset dir=&quot;$&#123;src&#125;&quot;&gt;
			&lt;exclude name=&quot;**/*.java&quot; /&gt;
			&lt;include name=&quot;**/*.xml&quot; /&gt;
			&lt;include name=&quot;**/*.properties&quot; /&gt;
		&lt;/fileset&gt;
	&lt;/copy&gt;
&lt;/target&gt;


&lt;target name=&quot;undeploy&quot;&gt;
	&lt;delete file=&quot;$&#123;tomcat.home&#125;/webapps/$&#123;war&#125;.war&quot; /&gt;
&lt;/target&gt;


&lt;target name=&quot;deploy&quot; depends=&quot;undeploy,compile&quot;&gt;
	&lt;echo message=&quot;Montando arquivo de distribuicao...&quot; /&gt;
	&lt;war warfile=&quot;portal.war&quot; webxml=&quot;../WEB-INF/web.xml&quot;&gt;
		&lt;lib dir=&quot;../WEB-INF/lib&quot; /&gt;
		&lt;classes dir=&quot;$&#123;build&#125;&quot; /&gt;
		&lt;fileset dir=&quot;$&#123;web&#125;&quot;&gt;
			&lt;include name=&quot;**/*.*&quot; /&gt;
			&lt;exclude name=&quot;**/*.java&quot; /&gt;
			&lt;exclude name=&quot;**/src/**/*.java&quot; /&gt;
			&lt;exclude name=&quot;**/build.xml&quot; /&gt;
			&lt;exclude name=&quot;**/*.jar&quot; /&gt;
		&lt;/fileset&gt;
	&lt;/war&gt;
	
	&lt;copy file=&quot;$&#123;war&#125;.war&quot; todir=&quot;$&#123;deploy.dir&#125;&quot; /&gt;
	&lt;delete file=&quot;$&#123;war&#125;.war&quot; failonerror=&quot;false&quot; /&gt;
&lt;/target&gt;

</project>
[/code]

Alguém sabe como me ajudar? :slight_smile:

Entao, acontece q tem um detalhe, para poder gerar mapeamentos para a versão 3.0 do hibernate vc tem q ter a versão 1.2.2 ou mais recente, na verdade nao sei se a 1.2.2 ja suporta, por via das dúvidas, pegue a mais nova :okok: