Missing artifact: org.hibernate: hibernate-entitymanager: jar: 3.3.2.ga

I'm relatively new to Spring and maven, and I'm just reviewing both of them for the first time in a couple of months. I meet the following error in pom.xml when I try to run the code from this tutorial :

Missing artifact: org.hibernate:hibernate-entitymanager:jar:3.3.2.ga 

Does this mean that I need to download and install an additional jar? I am sure that I downloaded hibernate using spring, and this is confirmed by the fact that the Spring Clinic application sample application works fine on my system when launched from eclipse on the tomcat server.

I did a Google search for this error message and tried many suggestions, but they did not fix the problem on my machine. How can I get through this error message?


EDIT / ANSWER?

I stuck into the project directory structure and found another copy of pom.xml that did not throw an error. It actually used the 3.3.2.ga syntax, so I don't think this case was a problem. The new pom.xml file was located deep in the target / m2e-wtp / web-resources / META-INF / Maven / MavenWeb / MavenWeb / subdirectory. When I moved this new pom.xml to the root directory, the error message disappeared, although the node syntax was still:

 <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.3.2.ga</version> </dependency> 

At the moment, this question will be answered, at least until I try to start it later. Let me think about how to pay tribute to the work that people did on this, while still leaving the answer clear to the people who find it on the search engines.

+6
source share
3 answers

Maven will automatically download the required banks from the maven central repository.

But I did not find org.hibernate:hibernate-entitymanager:jar:3.3.2.ga in maven central , but instead with version 3.3.2.GA with uppercase GA!

 <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.3.2.GA</version> </dependency> 

On Windows, you have another problem (since the Windows file system does not distinguish between file names in upper and lower case): you need to delete the directory:

 c:\documents\<yourName>\.m2\repository\org\hibernate\hibernate-entitymanager\3.3.2.ga\ 

delete this directory and try again to overshadow the maven dependencies.

+5
source

You may have loaded hibernation as you described, but it may have been the wrong version. In any case, make sure you modify the pom.xml file where you define the hibernate-entitymanager to look like the lines below. (because this is the exact version he will be looking for)

 <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.3.2.GA</version> </dependency> 
+1
source

You need to configure the default builder in your project as maven.

To do this, right-click on your project and select Properties (or select the project and press Alt + Enter on the keyboard)

In the dialog box on the left, select Builders .

On the right, select Maven Project Builder and use the Up button on the right to go to the top of the list.

Click Ok and you're done.

EDIT:

To fix the described problem, you need to go to the root folder of your application. Find the following two files: .project and .classpath

You will need to edit them, so exit the eclipse and return these files.

In .project change the following lines:

  • In the build command associated with maven, change the value of the name tag to: org.eclipse.m2e.core.maven2Builder
  • In nature change it to: org.eclipse.m2e.core.maven2Nature

In .classpath change the following lines:

  • <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> to <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>

Hope this helps.

+1
source

Source: https://habr.com/ru/post/958342/


All Articles