是否将最新的EclipseLink版本添加到Netbeans项目中? [英] Adding the latest EclipseLink version to a Netbeans project?
问题描述
我正在使用EclipseLink作为使用Netbeans的持久性提供程序,通过JPA开发JSF applicationi. EclipseLink的默认版本是带有Netbeans 7.1的2.0,但是我非常需要为eclipselink.ddl-generation添加新的create-or-extend-tables,它是在2.4 如何使用EclipseLink 2.3作为NB 7中的持久性提供程序?,但是没有成功.
I am developing JSF applicationi with JPA using EclipseLink as the persistence provider using Netbeans. The default version of EclipseLink is 2.0 with Netbeans 7.1, but I badly need the new addition of create-or-extend-tables for eclipselink.ddl-generation which was introduced with 2.4 http://wiki.eclipse.org/EclipseLink/DesignDocs/368365. So I want to add EclipseLink 2.4 to my existing netbeans project, but failed. I followed How do you use EclipseLink 2.3 as persistence provider in NB 7? , but there was no success.
我从 http:/下载了EclipseLink 2.4.0安装程序邮编(28 MB). /www.eclipse.org/eclipselink/downloads/index.php .解压缩后,在几个文件夹中有几个jar文件,但是我仅将eclipselink.jar文件(没有版本号,在jlib文件夹中找到)添加到Netbeans项目库中.
I downloaded the EclipseLink 2.4.0 Installer Zip (28 MB) from http://www.eclipse.org/eclipselink/downloads/index.php. There were several jar files in few folders after I unzip it, but I added only the eclipselink.jar file (with out a version number, which was found in jlib folder) to the Netbeans project libraries.
我也尝试在persistence.xml下添加一个新库,仍然失败.
I tried to add a New Library under persistence.xml also, still failed.
我手动添加了代码
<property name="eclipselink.ddl-generation" value="create-or-extend-tables" />
到persistence.xml文件,但表被删除,但未创建.
to persistence.xml file, but tables are deleted, but not created.
如何将最新的EclipseLink版本添加到Netbeans项目中?
推荐答案
这就是我很幸运的方式
- 下载 eclipselink 2.4
- 在Netbeans 7中,从项目">属性":库"中删除以前的eclipselink jars
- 将新的 eclipselink.jar 添加为编译"库,将 eclipse-jpa-modelgen 添加为处理程序".
- Download the eclipselink 2.4
- In Netbeans 7 remove the previous eclipselink jars from Project > Properties : Libraries
- Add the new eclipselink.jar as "compile" library and eclipse-jpa-modelgen as "processor".
您将在eclipselink/jlib和eclipselink/jlib/jpa中找到这些库
You will find these libraries in eclipselink/jlib and eclipselink/jlib/jpa
-persistence.xml
-- persistence.xml
value =创建或扩展表"
value="create-or-extend-tables"
这篇关于是否将最新的EclipseLink版本添加到Netbeans项目中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!