Fórum

How to change Liferay Portlet Plugin API library in Eclipse?

thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

How to change Liferay Portlet Plugin API library in Eclipse?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
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?

Here: http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Getting+Started+Tutorial on the lowest 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.
thumbnail
Gregory Amerson, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
The Plugin API classpath container is based on the targeted runtime, which it sounds like you have already gotten configured to point to new runtime. To get the Plugin API container to refresh, simply close your project and reopen it. That will get Eclipse to requery the container and you should see the new jars. If you don't see the new jars let me know and we will figure out what the problem is.
thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
Didn't work.

I have "old" liferay installation in d:\apps\liferay-portal-6.0.6 and "new" liferay in d:\apps\liferay-portal-6.0.6-clean

I have wiped out some webapps from "new" one.

thumbnail
Gregory Amerson, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
The link to that image file didn't work or at least I can't see the full image. Can you send another link or maybe just attach the file to the forum post?
thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
Sure, here is the file. It shows a part of Eclipse window. May be you saw it all.
thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
Suppose I just have removed "Liferay Portlet Plugin API" entry from my project. Is it possible to have it back?

I did everything again from scratch and tried to remove this entry. Now I have this entry just absent in my project.

Looks like this entry appears only if project is created from the beginning and can't be edited later.
thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
Removing the entry "Liferay Portlet Plugin API" from classpath dialog and subsequent restoration of this entry with manual adding the following


        <classpathentry kind="con" path="com.liferay.ide.eclipse.server.plugin.container/portlet">
		<attributes>
			<attribute name="org.eclipse.jst.component.nondependency" value="" />
		</attributes>
	</classpathentry>


to .classpath file and subsequent running Eclipse with -clean option didn't help.

This beast remembers the paths somewhere nobody knows!
thumbnail
Gregory Amerson, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Can you look at what is the targeted runtime for your project? Right click project, go to properties > Targeted Runtimes and see which is selected. And check and make sure that it isn't pointing to the old non-clean tomcat runtime.
thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
Wow! You are a genius! It was it! The "target runtime" was the old one and when I changed it, the entry renewed after close-open! Thanks! emoticon
thumbnail
Sandeep Nair, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Liferay Legend Postagens: 1744 Data de Entrada: 06/11/08 Postagens Recentes
Kravchenko Dmitry:
Wow! You are a genius! It was it! The "target runtime" was the old one and when I changed it, the entry renewed after close-open! Thanks! emoticon


Ofcourse he is a genius!!! Before Liferay he had been developing for MyEclipse IDE emoticon
thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
And how "Targeted Runtime" setting correlate with "JRE system library" entry in classpath? How these ones differ? Thanks.
thumbnail
Gregory Amerson, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Glad you got things working. The JRE is just the set of base java libraries, like java.lang.**. The "runtime" is the J2ee appserver/container runtime libraries, like servlet-api.jar and for LIferay, that includes portlet API jars, etc.

And in the case of the Liferay Plugin API container, that container keys off of the targeted runtime which in your case is the Liferay/Tomcat runtime.

Its fairly confusing I understand how you feel.emoticon Which may all be replaced by maven pom dependencies in 2012 once I add maven support (this will be optional of course, the current way will always be available to developers).
thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
Thanks a lot emoticon
Look forward for new improvements emoticon
Harsha Maram, modificado 10 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

New Member Mensagem: 1 Data de Entrada: 25/08/10 Postagens Recentes
I have almost this sort of problem, could any one help:

We have changed the ROOT folder in webapps to something else, in my case 'wmss'. Now, when I create a portlet plugin project, from IDE, the library is referring to the location assuming 'ROOT' folder still exists. Means, all the jars inside 'Liferay Portlet Plugin API' pointing to
"\liferay-portal-6.1.20-ee-ga2\tomcat-7.0.27\webapps\ROOT\WEB-INF\lib"

instead of
"\liferay-portal-6.1.20-ee-ga2\tomcat-7.0.27\webapps\wmss\WEB-INF\lib"

Suggestions please...
thumbnail
Gregory Amerson, modificado 10 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Harsha Maram:
I have almost this sort of problem, could any one help:

We have changed the ROOT folder in webapps to something else, in my case 'wmss'. Now, when I create a portlet plugin project, from IDE, the library is referring to the location assuming 'ROOT' folder still exists. Means, all the jars inside 'Liferay Portlet Plugin API' pointing to
"\liferay-portal-6.1.20-ee-ga2\tomcat-7.0.27\webapps\ROOT\WEB-INF\lib"

instead of
"\liferay-portal-6.1.20-ee-ga2\tomcat-7.0.27\webapps\wmss\WEB-INF\lib"

Suggestions please...



What does the contents of \liferay-portal-6.1.20-ee-ga2\tomcat-7.0.27\conf look like?

Is there any way that you can modify ROOT.xml to point to \liferay-portal-6.1.20-ee-ga2\tomcat-7.0.27\webapps\wmss\?
David George, modificado 8 Anos atrás.

RE: How to change Liferay Portlet Plugin API library in Eclipse?

New Member Postagens: 7 Data de Entrada: 08/04/11 Postagens Recentes
Kravchenko Dmitry:
This beast remembers the paths somewhere nobody knows!


It does!

if anyone is stuck on this after changing the runtime as suggested below then:-

Under Java Build Path in Eclipse, remove the Liferay Portlet Plugin API

Edit the following file:-

/eclipse/workspace/.metadata/.plugins/com.liferay.ide.server.core/classpath.decorations.xml


fix the paths.

Return to Java Build Path and click Add Library then add back in the Liferay Portlet API.

Your paths should be good.