Get your own customer support community
 

mvn hibernate3:hbm2ddl "no hibernate.cfg.xml configuration provided"

Ran mvn clean on parent project.

Then switched to simple-webapp directory and ran mvn hibernate3:hbm2ddl as explained on page 93 of the Definitive Guide.

Then got the following error:

C:\projects\simple-project\simple-webapp>set M2_HOME=C:\dev\apps\apache-maven-2.
1.0
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple WebApp
[INFO] task-segment: [hibernate3:hbm2ddl]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing hibernate3:hbm2ddl
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] [hibernate3:hbm2ddl]
[INFO] src/main/resources/hibernate.cfg.xml not found within the project. Trying
absolute path.
[INFO] No hibernate configuration file loaded.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] No hibernate.cfg.xml configuration provided. Annotated classes/packages i
s only configurable via hibernate.cfg.xml
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Sat Jul 25 13:20:45 CEST 2009
[INFO] Final Memory: 8M/16M
[INFO] ------------------------------------------------------------------------
C:\projects\simple-project\simple-webapp>

How can I solve this ?
 
sad I’m sad
Inappropriate?
1 person has this question

User_default_medium