如何在 Eclipse 中更改 Liferay Portlet Plugin API 库?
我已将我的网络应用程序切换到在 Liferay 的另一个安装上运行。因此,我能够将项目中的类路径库更改为新的服务器位置。这包括 JRE 系统库和 Liferay v6.0 CE。即,可以从 Java 构建路径对话框中为新服务器位置添加这两个库。
但库“Liferay Portlet Plugin API”仍然引用旧的 Liferay 安装路径,我看不出有什么办法可以改变它。
怎么可能呢?
更新1 这里: http://www.liferay .com/community/wiki/-/wiki/Main/Liferay+IDE+Getting+Started+Tutorial 在最下面的图片上,您可以看到 Package Explorer 中列出的所有三个库。其中两个我能够更改,问题是关于第三个。
I have switched my web-application to run on another installtion of Liferay. Consequently, I was able to changle classpath libraries in my project to new server location. This includes JRE System Library and Liferay v6.0 CE. I.e, both these libraries can be added for new server location from Java Build Path dialog.
But the library "Liferay Portlet Plugin API" still refers old Liferay installation path and I see no way to change it.
How is it possible?
UPDATE 1
Here: http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Getting+Started+Tutorial
On the very most low picture you can see all three libraries listed in Package Explorer. Two of them I was able to change and the question is about third one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以手动更改文件
.metadata\.plugins\org.eclipse.jdt.core\variablesAndContainers.dat
。因此,打开文件系统浏览器(我的电脑)导航到 liferay IDE 工作区位置并转到
.metadata\.plugins\org.eclipse.jdt.core
。打开文件variablesAndContainers.dat
并查找并编辑您的 jar 位置。之后重新启动 Liferay IDE 或直接关闭并打开您的项目。
更新:
1)记下所需的罐子
2) 转到配置构建路径对话框,然后转到库并选择“Liferay Portlet Plugin API”,然后单击“删除”
3)直接在项目中创建文件夹“lib”(而不是WEB-INF/lib)
4) 将 jar 添加到 lib 文件夹(从 1 开始)
5)选择jar并将其添加到构建路径(右键 - 构建路径 - 添加到构建路径)
或者您可以使用这些 jar 构建用户库,然后将其添加到构建路径
You can manually change file
.metadata\.plugins\org.eclipse.jdt.core\variablesAndContainers.dat
.So open your filesystem browswer (My computer) navigate to your liferay IDE workspace location and go to
.metadata\.plugins\org.eclipse.jdt.core
. Open filevariablesAndContainers.dat
and find and edit your jars locations.After that restart Liferay IDE or simply close and open your project.
UPDATE:
1) Take note of jars that are needed
2) Go to configure build path dialogue than go to libraries and select "Liferay Portlet Plugin API" then click Remove
3) Create folder "lib" directly in your project (not WEB-INF/lib)
4) Add jars to lib folder (from 1.)
5) Select jars and add them to build path (right click - Build path - add to build path)
Or you can crete you User libarary with those jars and than add it to build path
除了在类路径对话框中选择正确的库之外,还应该通过右键单击项目并转到“属性”>“属性”来适当更改“目标运行时”。目标运行时。
PS 并且加一应该关闭项目,然后再次打开它。
Additionally to chosing correct libraries in classpath dialog, one should also change "target runtime" appropriatedly by right click project and going to properties > Targeted Runtimes.
P.S. And plus one should close project and then open it again.
就我而言,按照这个问题中有关清除 eclipse 缓存的说明进行操作( -clear 选项)有帮助,因为在将此库添加到项目构建路径时,更改 liferay 插件 SDK 路径不会更改库的位置...
in my case, following instructions in this question about clearing eclipse cache (-clear option) helped, as changing liferay plugins SDK path wouldn't change the libraries' locations when adding this library to project build path...