How generate hibernate.cfg.xml with maven (hibernate3-maven-plugin)?

I'm newbie with Maven. I need generate a hibernate.cfg.xml more I don't idea about this. In this link (http://mojohaus.org/hibernate3-maven-plugin) I don't understand how configures. Somebody can help-me? Thanks a advance.

Answers


Using the plugin you mentioned, you can set these properties in you pom.xml:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>hibernate3-maven-plugin</artifactId>
        <version>3.0</version>
        <executions>
            <execution>
                <goal>hbm2cfgxml</goal>
            </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  ...
</project>

The plugin will be executed after the compile phase.


I sorry for delay, but I have a solution. I have two archive, being: pom.xml and build.bat (build.xml). The build.xml has my configuration for generate the mapping of the hibernate.

I got it run (build.xml) through of pom.xml with below command (something similar the example of the Gilberto Torrezan).

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.1</version>
  <executions>
     <execution>
     <phase>generate-sources</phase>
     <goals> 
            <goal>exec</goal>
     </goals>
     </execution>
  </executions>
  <configuration>
     <executable>ant/build_hibernate.bat</executable>
   </configuration>
 </plugin>

Thanks.


Need Your Help

jQuery.post() not going through?

jquery

On button click I have the simple jQuery post:

Need help with a simple ASP.NET ModalPopupExtender example

asp.net ajax modalpopupextender

I'm new to ASP.NET and I'm trying to get this Ajax ModalPopupExtender working. This is an example i found on the net, but nothing happens when btnpopup is clicked.