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 ?
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 ?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Ok, ACK, I'm looking into the consistency of our example code, and I've created a bug for this over here: https://issues.sonatype.org/browse/MV...
-
Hi Tim,
Any idea how this can be solved.
Thanks,
EDH -
Inappropriate?Did you download the examples from here?
http://www.sonatype.com/book/mvn-exam...
I just ran "mvn hibernate3:hbm2ddl" and it worked for me. Did you download the examples?
Loading Profile...



EMPLOYEE