I've trying to use XDoclet2 plugin for Maven2 to generate Hibernate XML, but I've found a problem with queries.
The Maven2 pom.xml:
<plugin>
<groupId>xdoclet</groupId>
<artifactId>maven2-xdoclet2-plugin</artifactId>
<configuration>
<configs>
<config>
<plugin>org.xdoclet.plugin.hibernate.HibernateMappingPlugin</plugin>
<params>
<version>2.0</version>
<destdir>${basedir}/target/classes/</destdir>
</params>
</config>
</configs>
</configuration>
<dependencies>
<dependency>
<groupId>xdoclet-plugins</groupId>
<artifactId>xdoclet-plugin-hibernate</artifactId>
<version>1.0.4-SNAPSHOT</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>xdoclet</goal>
</goals>
</execution>
</executions>
</plugin>
<groupId>xdoclet</groupId>
<artifactId>maven2-xdoclet2-plugin</artifactId>
<configuration>
<configs>
<config>
<plugin>org.xdoclet.plugin.hibernate.HibernateMappingPlugin</plugin>
<params>
<version>2.0</version>
<destdir>${basedir}/target/classes/</destdir>
</params>
</config>
</configs>
</configuration>
<dependencies>
<dependency>
<groupId>xdoclet-plugins</groupId>
<artifactId>xdoclet-plugin-hibernate</artifactId>
<version>1.0.4-SNAPSHOT</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>xdoclet</goal>
</goals>
</execution>
</executions>
</plugin>
The class tags:
/**
* @hibernate.class table="I18N_Textos"
*
* @hibernate.query name="getTextoI18N" query="from I18NTextos i where i.locale=:locale and i.texto=:texto"
*
*/
* @hibernate.class table="I18N_Textos"
*
* @hibernate.query name="getTextoI18N" query="from I18NTextos i where i.locale=:locale and i.texto=:texto"
*
*/
<query name="getTextoI18N">
<representation/><![CDATA[from I18NTextos i where i.locale=:locale and i.texto=:texto]]>
</query>
<representation/><![CDATA[from I18NTextos i where i.locale=:locale and i.texto=:texto]]>
</query>
===> The result: it raises an error, representation node is incorrect
I don't know if I'm doing something wrong, because I've seen a previous bug on queries with more than one line and... well, I can't even create a query with just one line. Any help, please?
Thanks in advance,
Andrés
