简体   繁体   中英

Unable to add maven dependency

When i right click on project then Maven then Add Dependencies. It is showing error. Artifact id cannot be empty. I had rebuild index. I don't know what to put in artifact id and group id. I want to add Hibernate libraries.

Put this in your pom.xml in the section dependencies :

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>4.3.6.Final</version>
</dependency>

From the Maven documentation :

The minimum requirement for a POM are the following:

  • project root
  • modelVersion - should be set to 4.0.0
  • groupId - the id of the project's group.
  • artifactId - the id of the artifact (project)
  • version - the version of the artifact under the specified group

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM