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 explodedand set
- Create XML file with name “yourwar.xml” with the following content:
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
1 2 3 4 5
<?xml version="1.0" encoding="UTF-8"?> <Context docBase="/absolute/path/to/project/yourwar" reloadable="false" path="/yourwar"/>
- Create post deployment action that will copy just created XML to Liferay’s autodeploy folder.
- As Liferay official wiki suggests, add empty
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