Hot Deploy

Pawel Michalski, modified 11 Years ago. New Member Posts: 12 Join Date: 2/3/15 Recent Posts
I'm using LiferayStudio and maven project Portlet (using maven-eclipse-plugin no m2e).
I have plobelm when i deploy portlet in eclipse.
My portlet has wtp nature additional has liferay-plugin-package.properties (portal-dependency-jars ) .
When i add appiccation to serwer always deploy in liferay\tomcat\webapps . I want to deploy in liferay/deploy folder that would work portal-dependency-jars and other things.

I tired to change server vm argument -Dwtp.deploy but didn't work.

Did you have similar problem. I need to deploy portlet into eclipse.
thumbnail
David H Nebinger, modified 11 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
I don't use the deployment feature of Liferay IDE or LDS. I use the maven "liferay:depoy" target which copies the war to the Liferay deploy directory.

Why avoid the tools? Well I want to replicate what will happen during deployment to test, QA, and prod environments. The IDE/LDS doesn't do the deployment in the same way and that can give you a "false positive" sense of deployment success.
Pawel Michalski, modified 11 Years ago. New Member Posts: 12 Join Date: 2/3/15 Recent Posts
Ok David, I have a few questuin to You:

Tell me how undeploy portlet, or redeploy in your tools?

In WTP eclipse procject you only must push one button (publish to server) . You don't need to do mvn package liferay:deploy .

Mvn task take much longer than deploy/republish in eclipse WTP Projecs.

Do you have any experience in this?

How to configure Eclipse that deploy/redeploy/ publish to Liferay Server has less time after change source code?
Pawel Michalski, modified 11 Years ago. New Member Posts: 12 Join Date: 2/3/15 Recent Posts
Ok, I solved my problem.

If you using maven-eclipse-plugin into your eclipse(LS) and you want to deploy plugin (portlets) like WTP into LiferayServer You need to configure faclet.
Note: setting faclet isn't posible from eclipse(LS) you need to do in pom.xml (maven-eclipse-plugin config) like belowe.

 <plugin>
                <groupid>org.apache.maven.plugins</groupid>
                <artifactid>maven-eclipse-plugin</artifactid>
                <version>2.7</version>    
                <configuration>
                    <downloadsources>true</downloadsources>
                    <downloadjavadocs>false</downloadjavadocs>
                    <wtpversion>2.0</wtpversion>
                    <additionalbuildcommands>
                    <additionalprojectfacets>
            			<liferay.portlet>6.0</liferay.portlet>
          			</additionalprojectfacets>
                </additionalbuildcommands></configuration>
</plugin>
thumbnail
David H Nebinger, modified 11 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Pawel Michalski:
Tell me how undeploy portlet, or redeploy in your tools?


Undeploy is just like non-eclipse methods, you delete the folder from the webapps directory.

Redploy is just the "mvn liferay:deploy" all over again.

In WTP eclipse procject you only must push one button (publish to server) . You don't need to do mvn package liferay:deploy. Mvn task take much longer than deploy/republish in eclipse WTP Projecs.


That is very true. For me, knowing that my other regular hot deployments will work , well that has a higher benefit than the ease of deployment in Eclipse. That's just the way I determine value, others will have a different formula which may have other outcomes.

I can say that I haven't run into any problems moving code from my own environment to other environments, but that might have given me the warm and fuzzies with my own process that doesn't actually have enough causality to justify it.

How to configure Eclipse that deploy/redeploy/ publish to Liferay Server has less time after change source code?


Well, the obvious answer here is not WTP, it's JRebel. It beats WTP deployment times hands down.
thumbnail
Olaf Kock, modified 11 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
To deploy your portlet, just drag the project from your project explorer view and drop it on the server view, right on the line where the Liferay Server name is (not below it). This will make Studio deploy the plugin as it should. If you just use the maven target or the WTP methods, Studio will have no clue that your portlet has been deployed to Liferay and can't do hot-updates (e.g. update Liferay whenever you save your project's files).

Unless you don't want these automatic updates to happen, of course. Then use David's recommendation.