eclipse 无法创建 JPA 方面:“找不到项目方面 jpt.jpa”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17299667/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 20:47:35  来源:igfitidea点击:

Cannot create JPA Facet: "project facet jpt.jpa could not be found"

eclipsejpaconfigurationfacet

提问by AllieCat

I have a maven project in Eclipse Java EE IDE for Web Developers. But when I go enable JPA facet, I cannot choose JPA (there is no JPA option). Have I forgotten to include some dependency?

我在 Eclipse Java EE IDE 中有一个面向 Web 开发人员的 Maven 项目。但是当我启用 JPA facet 时,我不能选择 JPA(没有 JPA 选项)。我忘记包含一些依赖了吗?

enter image description here

在此处输入图片说明

I've installed the following Maven dependencies: eclipslink-2.5.-RC1.jar, javax.persistence-2.0.0.jar, and mysql-connector-java-5.1.9.jar.

我已经安装了以下 Maven 依赖项:eclipslink-2.5.-RC1.jar、javax.persistence-2.0.0.jar 和 mysql-connector-java-5.1.9.jar。

I get the following warning on my project:

我的项目收到以下警告:

Implementation of project facet jpt.jpa could not be found. Functionality will be limited.

找不到项目 facet jpt.jpa 的实现。功能将受到限制。

UPDATE: I have the Dali Java Persistence Tools installed.

更新:我安装了 Dali Java Persistence Tools。

enter image description here

在此处输入图片说明

采纳答案by Padawan

The JPA facet is not dependent on what is in your pom.xml. Check to make sure you have these plugins installed (The ones highlighted in blue).

JPA 方面不依赖于 pom.xml 中的内容。检查以确保您安装了这些插件(以蓝色突出显示的插件)。

Help -> Install New Software... -> What is already installed?

帮助 -> 安装新软件... -> 已经安装了什么?

enter image description here

在此处输入图片说明

If they're missing you can find the plugin here: http://www.eclipse.org/webtools/dali/

如果他们丢失了你可以在这里找到插件:http: //www.eclipse.org/webtools/dali/

Hope this helps!

希望这可以帮助!