Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: configuring Liferay for IntelliJ IDEA
Hi all,
For some time now, I've been trying to configure IntelliJ IDEA for working with liferay and didn't find any single document on the net explaining how to do that.
These are the steps that I've already done:
1. Configured and installed the portal in {liferaydir}/portal
2. Built extension environment using the ant clean start build-ext command.
3. Created a new project in IntelliJ where I've specified {liferaydir}/ext/classes as the target classpath.
4. Setted up the web resources directory to {liferaydir}/ext/ext-web/docroot(I don't know if this is correct because when creating a new portlet I get intelliSense errors from IntelliJ because for example: <%@ include file="/html/common/init.jsp" %> is not found). I believe that there is something strange with the {liferaydir}/ext-web/tmp because those sources are outside the {liferaydir}/ext-web/docroot folder.
5. Setted to create the sources in {liferaydir}/src folder that will be created by IntelliJ.
6. Setted no exploded configuration since I really don't know if there is a way to auto-deploy in the web application server(e.g. resin) by only using IntelliJ and not the ant deploy command which takes a HUGE ammount of time to complete and in my opinion this is unnacceptable(I just hope there is another way)
Thank you in advance for your answers.
Best regards,
Dan.
For some time now, I've been trying to configure IntelliJ IDEA for working with liferay and didn't find any single document on the net explaining how to do that.
These are the steps that I've already done:
1. Configured and installed the portal in {liferaydir}/portal
2. Built extension environment using the ant clean start build-ext command.
3. Created a new project in IntelliJ where I've specified {liferaydir}/ext/classes as the target classpath.
4. Setted up the web resources directory to {liferaydir}/ext/ext-web/docroot(I don't know if this is correct because when creating a new portlet I get intelliSense errors from IntelliJ because for example: <%@ include file="/html/common/init.jsp" %> is not found). I believe that there is something strange with the {liferaydir}/ext-web/tmp because those sources are outside the {liferaydir}/ext-web/docroot folder.
5. Setted to create the sources in {liferaydir}/src folder that will be created by IntelliJ.
6. Setted no exploded configuration since I really don't know if there is a way to auto-deploy in the web application server(e.g. resin) by only using IntelliJ and not the ant deploy command which takes a HUGE ammount of time to complete and in my opinion this is unnacceptable(I just hope there is another way)
Thank you in advance for your answers.
Best regards,
Dan.
Here's an Liferay wiki page for it.
I've gotten it to debug in trunk
Here's the link:
http://wiki.liferay.com/index.php/Configuring_IntelliJ_6.0_to_work_with_Liferay_source_code
I've gotten it to debug in trunk
Here's the link:
http://wiki.liferay.com/index.php/Configuring_IntelliJ_6.0_to_work_with_Liferay_source_code
Jerry Niu:
Here's an Liferay wiki page for it.
I've gotten it to debug in trunk
Here's the link:
http://wiki.liferay.com/index.php/Configuring_IntelliJ_6.0_to_work_with_Liferay_source_code
Hi,
Thank you for your response. I know this sounds like a dumb question, but in IntelliJ could you tell me how you configured the path to web resources because I've this problem with <%@ include file="/html/common/init.jsp" %> which cannot be found if I configure the web resources root to {liferaydir}/ext-web/docroot(because init.jsp is in the {liferaydir}/ext-web/tmp folder).
Another thing to ask if I don't bother you too much already is if there's a way to make IntelliJ autodeploy directly to the server directory so I don't use the "ant deploy" command.
Thank you very much for your time and pacience with me.
Best regards,
Dan.
I'm just adding some information on this thread since I was fighting the same problem.
In IDEA 6.0.5, I added both ext-web/docroot and ext-web/tmp as Web Resource Directories. At that point the code was clean (no errors according to IDEA) in /html/common/init.jsp, but renderRequest and renderResponse were still unknown in the portlet view.jsp I was testing. I copied the defineObjects tag call into the view.jsp and it still didn't work either. Next I patched the DefineObjectsTei.java to declare renderRequest/renderResponse as tag-defined variables and this worked:
I think this thread in the IDEA forums is related.
Finally, I upgraded to the new milestone release, IDEA 7.0.M1, and neither of those workarounds was necessary. The TEI patch is no longer needed and IDEA now correctly discovers the renderRequest/renderResponse page variables out of the box.
Hope this helps,
Nathan
In IDEA 6.0.5, I added both ext-web/docroot and ext-web/tmp as Web Resource Directories. At that point the code was clean (no errors according to IDEA) in /html/common/init.jsp, but renderRequest and renderResponse were still unknown in the portlet view.jsp I was testing. I copied the defineObjects tag call into the view.jsp and it still didn't work either. Next I patched the DefineObjectsTei.java to declare renderRequest/renderResponse as tag-defined variables and this worked:
new VariableInfo("renderRequest", RenderRequest.class.getName(), true,
VariableInfo.AT_END),
new VariableInfo("renderResponse", RenderResponse.class.getName(), true,
VariableInfo.AT_END)
I think this thread in the IDEA forums is related.
Finally, I upgraded to the new milestone release, IDEA 7.0.M1, and neither of those workarounds was necessary. The TEI patch is no longer needed and IDEA now correctly discovers the renderRequest/renderResponse page variables out of the box.
Hope this helps,
Nathan
i followed the instructions on the wiki to develop liferay with intellij idea but it has instructions only for the main portal. How is the ext environment imported in intellij ?
Also following the instructions in the wiki with liferay 4.2.2, all my jsp's pretty much show errors coz it cannot find the tld's and other resources and there is no mention on how to configure them in the wiki ? Has anyone successfully gotten the portal and the ext environment to work under intellij ?
Any help/suggestion will be appreciated.
-- darshak
Also following the instructions in the wiki with liferay 4.2.2, all my jsp's pretty much show errors coz it cannot find the tld's and other resources and there is no mention on how to configure them in the wiki ? Has anyone successfully gotten the portal and the ext environment to work under intellij ?
Any help/suggestion will be appreciated.
-- darshak
Community
Company
Feedback