I just do it with this configuration in my pom.xml

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xdoclet-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>hbm generation with xdoclet</id>
            <phase>generate-sources</phase>
            <configuration>
              <tasks>
                <hibernatedoclet destdir="target/classes">
                  <fileset dir="src/main/java" includes="**/*.java" />
                  <hibernate version="3.0" />
                  <hibernatecfg version="3.0" dialect=
"org.hibernate.dialect.MySQLDialect" driver="com.mysql.jdbc.Driver" jdbcurl
="jdbc:mysql://spirou.smals-mvm.be/spitools_prod" username="dummy" password
="dummy" showSql="true" />
                </hibernatedoclet>
              </tasks>
              <generatedSourcesDirectory>target/classes</
generatedSourcesDirectory>
            </configuration>
            <goals>
              <goal>xdoclet</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

-------------------------------------

I wish to regenerate hibernate(version 2.0)  mapping files in my
project and currently am using Ant to do so.Can I achieve the same
with the hibernate3-maven-plugin  ?
Here's the ant task :

<!-- regenerate the hibernate mapping files -->
                         <taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask">
                                     <classpath refid="portallib.classpath"
/>
                         </taskdef>
                         <hibernatedoclet
destdir="${ant.common.eportal.services.dir}/src"
force="false" excludedtags="@version,@author,@todo">
                                     <fileset
dir="${ant.common.eportal.services.dir}/src">
                                                 <include
name="**/portal/**/*.java" />
                                                 <include
name="**/reference/**/*.java" />
                                     </fileset>
                                     <hibernate version="2.0" />
                         </hibernatedoclet>
                         <echo message="Regenerated Hibernate mapping files
in
${basedir}\bin" level="info" />
--


Jeff  Mutonho

GoogleTalk : ejbengine
Skype        : ejbengine
Registered Linux user number 366042


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to