Quick and dirty solution for web developers

Blog posts

Quick and dirty solution for web developers

Posted on 15/07/2016 by Charalampos Chrysikopoulos

In some of our projects we have the problem, that the portlet plugins are big and slow and the deploy time takes a lot of time. Especially for the web developers, who make for example a css change in a portlets css file and want to see quickly if it is fixed, its very annoying.

Here is a small ant task (in the case you are working with the ant SDK, which will "deploy" the jsp, js and css files of your portlet plugin in the liferay server, and will force the plugin to reload itself.

<target name="direct-deploy-only-js-jsp-css" description="test">
<copy verbose="true" failonerror="true" todir="${app.server.dir}/webapps/${plugin.name}/html">
<fileset dir="./docroot/html"/>
</copy>
<copy verbose="true" failonerror="true" todir="${app.server.dir}/webapps/${plugin.name}/css">
<fileset dir="./docroot/css"/>
</copy>
<copy verbose="true" failonerror="true" todir="${app.server.dir}/webapps/${plugin.name}/js">
<fileset dir="./docroot/js"/>
</copy>
<touch file="${app.server.dir}/webapps/${plugin.name}/WEB-INF/web.xml"/>
</target>

Just copy the code in your build.xml file, and execute it while the server is running.

This entry was posted in Liferay and tagged ant, css, js, jsp, Liferay, task by Charalampos Chrysikopoulos

Add new comment

You must have Javascript enabled to use this form.