We are working on building an Angular application and hosting it on Liferay. I have started example Liferay portals to go. So far I have developed a Liferay portlet using Maven. I was able to build a war for it and deployed it manually by copying the war file to portal/deploy
directory. Similarly, when a portlet is built using Ant, once its built, its automatically deployed in the Liferay portal.
Is there a way to auto-deploy the maven built portlet, rather than copying the war file every time? If there is a way, what setting have to be changed in the pom file?
Edit:
By adding the following to pom file auto-deploy the portlet?
<build>
<plugins>
<plugin>
<groupId>com.liferay.maven.plugins</groupId>
<artifactId>liferay-maven-plugin</artifactId>
<version>${liferay.maven.plugin.version}</version>
<configuration>
<autoDeployDir>${liferay.auto.deploy.dir}</autoDeployDir>
<appServerDeployDir>${liferay.app.server.deploy.dir}</appServerDeployDir>
<appServerLibGlobalDir>${liferay.app.server.lib.global.dir}</appServerLibGlobalDir>
<appServerPortalDir>${liferay.app.server.portal.dir}</appServerPortalDir>
<liferayVersion>${liferay.version}</liferayVersion>
<pluginType>portlet</pluginType>
</configuration>
<executions>
<execution>
<id>maven-deploy</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>