You can develop Liferay portlets with IntelliJ IDEA exactly as in Eclipse Liferay IDE. Follow simple steps:
- Create debug configuration in IntelliJ IDEA using Local Tomcat
- Configure deployment artifact: add your WAR as “yourwar:war exploded”
- Create XML file with name “yourwar.xml” with the following content:
<?xml version="1.0" encoding="UTF-8"?> <Context docBase="/absolute/path/to/project/yourwar" reloadable="false" path="/yourwar"/>
Please note, docBase have to be the same as “Output directory” setting in ItelliJ IDEA of the artifact you deploy. Also, path have to be the same as “Application context” in Run/Debug configuration
- Create post deployment action that will copy just created XML to Liferay’s autodeploy folder.
Enjoy automatic deployment, hot-swap and debugging your LIferay application.
Please note, I tested it with IntelliJ IDEA 12.1 and Liferay 6.0.5 on Tomcat 6