How to compile hibernate project with maven?

I am novice to maven (as well as to hibernate) but want to learn both. I have downloaded a sample project from and now trying to compile it with maven but getting following error:

[INFO] Scanning for projects... Downloading: Final/hibernate-parent-3.5.2-Final.pom [INFO] Unable to find resource 'org.hibernate:hibernate-parent:pom:3.5.2-Final' in repository central ( [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM).

Project ID: org.hibernate:hibernate-tutorials:pom:null

Reason: Cannot find parent: org.hibernate:hibernate-parent for project: org.hibe rnate:hibernate-tutorials:pom:null for project org.hibernate:hibernate-tutorials :pom:null

[INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.hibern ate:hibernate-parent for project: org.hibernate:hibernate-tutorials:pom:null for project org.hibernate:hibernate-tutorials:pom:null at org.apache.maven.DefaultMaven.getProjects( at org.apache.maven.DefaultMaven.doExecute( at org.apache.maven.DefaultMaven.execute( at org.apache.maven.cli.MavenCli.main( at org.apache.maven.cli.compat.CompatibleMain.main( 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces at java.lang.reflect.Method.invoke( at org.codehaus.classworlds.Launcher.launchEnhanced( at org.codehaus.classworlds.Launcher.launch( at org.codehaus.classworlds.Launcher.mainWithExitCode(

at org.codehaus.classworlds.Launcher.main(

Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent : org.hibernate:hibernate-parent for project: org.hibernate:hibernate-tutorials: pom:null for project org.hibernate:hibernate-tutorials:pom:null at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi leInternal( at at org.apache.maven.DefaultMaven.getProject( at org.apache.maven.DefaultMaven.collectProjects( at org.apache.maven.DefaultMaven.getProjects( ... 12 more Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.hibernate :hibernate-parent' not found in repository: Unable to download the artifact from any repository


from the specified remote repositories: central (

for project org.hibernate:hibernate-parent at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo sitory( at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D ... 18 more Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository


from the specified remote repositories: central (

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo sitory( ... 19 more Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to downl oad the artifact from any repository at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Def at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De ... 21 more

Looks it is trying to download libraries from the web? can I not provide all jars required by my sample project on local drive? Is there any quick solution of my problem, to start with? or I should study maven and hibernate in details before I start it?

-------------Problems Reply------------

Hibernate 3.5.2-Final is not available in the Maven central repository but is available in JBoss repository. So add the following to your pom.xml (or your settings.xml):

<name>JBoss Public Repository Group</name>

See also

  • Maven Getting Started - Users
  • JBoss Maven repository changes

I should study maven and hibernate in details before I start it?

Yes. Maven can be simple, or extremely complex depending on how far you want to go with it. Hibernate can be complex to set up if you're doing more than the basics. I'd suggest learning one at a time.

Looks it is trying to download libraries from the web? can I not provide all jars required by my sample project on local drive?

Yes and Yes. By default (I believe) maven both looks on your local filesystem and out on the interwebs. It attempts to keep your local copy in sync. But you can set it up to just use your local repository if you'd like.

Is there any quick solution of my problem, to start with?

Maybe. Change the version number from 3.5.2-Final to 3.3.2.GA for hibernate-parent.

Category:hibernate Views:0 Time:2010-06-08

Related post

  • Compiling flex project on Maven error without information 2011-11-15

    Since 2 days ago, i can't compile my flex project. I tried it in 3 different computers and via eclipse and command-line and all I have is an error without information If I run it in debug mode (-X) and error mode (-e), only get this. This is the only

  • How to add a jar file when using mvn command to compile a project 2011-03-11

    I need to add a jar file to compile my project using maven command, but this jar file is not from another maven depository,it's just a jar file. I don't know how to and this. Thanks --------------Solutions------------- You can go thru this.. Maven: H

  • Maven: compile aspectj project containing Java 1.6 source 2010-04-09

    Primary Question What I want to do is fairly easy. Or so you would think. However, nothing is working properly. Requirement: Using maven, compile Java 1.6 project using AspectJ compiler. Note: Our code cannot compile with javac. That is, it fails com

  • Error trying to compile default CXF project with Maven 2011-11-26

    I am trying to use the archetype: org.apache.cxf.archetype:cxf-jaxws-javafirst and do a Maven compile. Am getting this error: I tried with different versions of JDK, but couldn't succeed. Pls help. [INFO] Compiling 2 source files to D:\myApp\ProcessO

  • How to compile pom.xml without generating project in Maven? 2011-10-13

    I have pom.xml file that contains dependencies and files to checkout from svn so there is no no need to generate project. I just need these libraries and those files, so is there any way to get them without generating a project with maven directory s

  • Syncing web project dependencies maven -> eclipse 2009-01-08

    I've got m2eclipse plugin installed and there's no problem syncing compile time dependencies that appear in pom.xml. Now, I add JPA + Hibernate(or whatever) dependency that maven catches up just fine when doing mvn jetty:run. The problem is, Eclipse

  • Junit4 and TestNG in one project with Maven 2009-08-06

    To run them together there are few options available but I have chosen using different profiles for Junit and TestNG. But now problem is with excluding and including test cases. Since if we add testNG dependency to main project in maven it will skip

  • Updating built in Spring/Hibernate Archetype in Maven? 2009-09-02

    The current version of Hibernate is 3.26 and Spring is 2.54 when I create a Spring and Hibernate project based off the default Archetype. How can I have Maven grab the newest release versions? I tried changing my spring version from 2.5.4 to 2.5.6 bu

  • APT and AOP in the same project, using Maven 2010-09-07

    I have to use Annotation Processing (apt) and AspectJ in the same Maven project. Both work for themselves, but I need to create aspects based on code created by apt. So I would need binary weaving (the original source files are extended by apt). How

  • on save compile and deploy with maven eclipse and weblogic 2010-10-29

    I just started maven in general and m2eclipse in specific. What I have been doing before is follow: 1)Deploy my application to tomcat. 2) make any changes to the java or jsp files. 3) save and run the application again ( no restart is neccessary unle

  • Using multiple source folders (as intermediate step in a conversion of a large Java project to Maven) 2011-03-09

    I am converting a large Java project to use maven. I have a LOT of inter dependencies to work out, but I would like to get it off the ground with maven before I do the real cleanup work. I have broken it up into a few modules plus one giant module; l

  • IllegalArgumentException: Not an entity - distributed model definitions in hibernate/jpa and Maven 2011-09-15

    we're working on a web app with Spring, Hibernate/JPA and Maven. We have several modules that define different entities all based on a core module defining data access and a web view project that gets deployed as a war on a tomcat. Now I'm having qui

  • Dynamically add projects to maven build reactor? 2011-10-27

    I wrote a maven plugin that generates Java source code based on some definition language. The generated source code should be split up into several jar files (interfaces, implementation, etc.). I would like to build my project containing the definiti

  • How to execute the web project with maven support 2012-03-19

    I created a web project with maven support using MyEclipse. There was a jsp file index.jsp so i wanted to run the project.For this I started the MyEclipse tomcat server and deployed this project on the running server. When i execute the it gives me t

  • Where does Eclipse find javac to compile a project? 2008-11-28

    Here is what I have: JAVA_HOME=C:\Software\Java\jdk1.5.0_12 (points to JDK 5.0) In Eclipse "Installed Runtimes" I have: jre 1.5.0_12 (points to JRE 5.0) jre 1.6.0_3 (points to JRE 6.0) (this one is default) I do not have "javac" on my PATH (i.e. I ca

  • What are the available tools to compile .NET projects to standalone native binaries? 2009-08-06

    What tools do you know to compile .NET projects to native binaries that run without .NET Framework, so far I've found : Xenocode Postbuild for .NET, which costs $1599. Salamander .NET Linker, which costs $1249. Mono Ahead-of-Time compilation (AOT), f

  • differences when compiling a project using flex builder and flex sdk 2009-08-14

    The following code compiles fine in flex builder 3, but throws an error when compiled using the command line and flex sdk 3.3. <?xml version="1.0" encoding="utf-8"?> <ww:TestApplication xmlns:mx="" xmlns:ww="*"

  • How to Deploy my Open Source Projects using Maven's Central Repository? 2009-11-02

    Is there anything I could do to get my own open source stuff into Maven's Central repository? I've wondered many times how I could get my own projects into Maven's Central repository. I was asking this myself, especially as I've seen some well known

  • Visual Studio registry capture utility has stopped working, error compiling C# project in Windows7 2010-02-25

    Windows 7 Shows build error like below everytime I compile my project. --------------Solutions------------- From Microsoft Connect: Locate regcap.exe here: C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\Deployment Right click and select p

Copyright (C), All Rights Reserved.

processed in 0.130 (s). 11 q(s)