简体   繁体   English

Maven2:存在jar,但是Eclipse仅显示pom文件

[英]Maven2: jars are present but eclipse is showing only pom files

I have created a maven project and generated the entities using hibernate tool. 我已经创建了一个maven项目,并使用休眠工具生成了实体。 Now I have to add ejb3-persistence dependency to the project path. 现在,我必须将ejb3-persistence依赖项添加到项目路径。 So whenever I search for the jar, instead of showing jars, eclipse is showing only pom files. 因此,每当我搜索jar时,eclipse都不会显示jar,而只会显示pom文件。 But I have the jars in the repository. 但是我在存储库中有罐子。

I solved the issue by making the following changes. 我通过进行以下更改解决了该问题。

  1. I opened the directory of ejb3-persistence in the local maven repository. 我在本地Maven存储库中打开了ejb3-persistence目录。
  2. Checked the pom file of ejb3-persistence . 检查了ejb3-persistencepom文件。 For example ejb3-persistence-1.0.2.GA.pom in that directory.And I have observed that tag packaging is having value like pom 例如该目录中的ejb3-persistence-1.0.2.GA.pom ,我观察到标签包装具有像pom这样的价值
  3. Then I changed the value in the packaging tag to jar and now it starts working. 然后,我将包装标签中的值更改为jar ,现在它开始工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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