5
votes

I can easily create a Maven project for programming portlets (for example using archetype). But in order to deploy this project to Liferay, I have to run:

mvn package liferay:deploy

Even if I change just a simple JSP file, I have to redeploy the whole portlet application. Is there a way to speed up this development process?

I don't want to use Ant, because then I would have to deal with dependencies and other stuff. I would really like to use Maven to develop Liferay portlet applications.

I tried JRebel, but because of the packaging to WAR file it's magic doesn't work :(

To re-create this situation:

  1. Create project from maven archetype with artifactId: liferay-portlet-archetype
  2. Add properties to pom.xml: liferay.version, liferay.auto.deploy.dir
  3. Start Liferay
  4. mvn package liferay:deploy -> this will create a WAR file and deploy it to liferay auto deploy directory.
  5. Each time you want to change something, you must do mvn package liferay:deploy

This is time consuming on something bigger than just hello world.

As far as I know this is supposed to be the best practice. But Liferay documentation is sparse on this subject. Is there another way?

2
Are you using that Maven Liferay project?Tony Rad
Yes and no. These libraries are used internally from Maven Repository by Liferay Maven Plugin.jirka.pinkas

2 Answers

1
votes

Problem solved using combination of STS (SpringSource Tool Suite) and Liferay IDE. With this combination it's not necessary to use Liferay Maven plugin at all. Just simply add Liferay server, deploy Maven app on this server and it all works.

Using this combination with JRebel is IMHO the most effective solution.

0
votes

Your application can be packaged in WAR for JRebel to work, no problem there. Did you put rebel.xml configuration file into the WAR?