当我右键单击项目时,然后单击 Maven,然后单击添加依赖项。 它显示错误。 Artifact ID 不能为空。 我重建了索引。 我不知道在 Artifact ID 和组 ID 中放入什么。 我想添加 Hibernate 库。
最佳答案
将其放入 pom.xml
的依赖项
部分:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.6.Final</version>
</dependency>
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
关于java - 无法添加maven依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26383157/