Liferay projects building in wrong deploy folder - liferay

Working with liferay and portlets from last 3 weeks.
I downloaded the bundled liferay server and placed it on my local drive.
I did the set up and was able to access localhost:8080 properly.
I also created some custom portlets and when build them in eclipse the war files were getting deployed in the path C:/liferay/deploy.
Now, I changed the server location, I wanted to have the server in D:/ drive.
When I did the transition, started the tomcat server from D:/liferay/tomcat/bin/startup.bat
and then build the project, the war files are still building in c:/ drive.
When I copy the war file manually from c:/liferay/deploy to D:/liferay/deploy it gets deployed successfully.
I want the war file to be created directly in the d:/liferay/deploy folder.
Can someone help me understand what all changes do i need to do here?

If you are using Liferay plugin sdk then there would be file named as
build.<userid>.properties
in your plugin sdk.Change the below properties as per new configuration and give a try
app.server.portal.dir
app.server.lib.portal.dir
app.server.lib.global.dir
app.server.deploy.dir
auto.deploy.dir

Related

Liferay: war getting copied at deployment, disappearing, but no app

I am working through the example in the Liferay documentation; I have created and built the little greeting applet and gotten no errors at compile or build. I don't get any errors at deployment, either, but the application is showing up.
The deployment says it is copying my war file to portal-dir/deploy. I have determined that I can copy the war file there, though something (I guess in the server) removes it after a few seconds. But when I go to look at it in a browser off my local server, it is not there.
Does anyone know what I should look at to fix this?
No need to fix anything here -this is how autodeployment works. Web archives found in deploy directory are removed from there, extracted, processed by Liferay and in the end you should be able to find them in ${catalina.home}\webapps (assuming that you're using a Tomcat bundle).

Deploy JSF-Maven application from Eclipse directly to tomcat

Well, i have doubts about best practice to do a deploy correctly. So, lets go.
I have a project JSF with Maven in my local machine in ECLIPSE IDE. In other side (my server online) i have a Tomcat Server (version 6) + SVN Server working normally. The communication from my Eclipse with SVN Repository works fine. My doubt is about putting WAR file from my eclipse workspace to tomcat webapp folder, so i have some solutions to do this:
A) This is the most simple form but i don't know if this correct (best practice): Make a Maven Build (in ECLIPSE) and i'll have a WAR file. Copy the WAR file manually to tomcat webapp folder.
B) Make a "svn checkout" in my "SERVER ONLINE" (where is locate my svn server) and after i can make "mvn tomcat:deploy" to generate WAR file, and copy to tomcat webapp folder.
C) I think this form is more correct but i don't know how can i do: From my ECLIPSE IDE directly deploy (create WAR file) in TOMCAT Remote Server (webapp remote folder).
D) Open "http://XXX.XXX.XXX.XXX:8080/manager/html" and put manually the WAR file.
Well, this is the first time i'm doing this, and i need know what is the most used form.
I and heard most people deploy by A C D way.
You can do it manually without Eclipse see here

Excluding jar files from GWTP war file

Currently I am working on a GWTP application. While deploying to application server I remove all the jar files from the application.war file and then I push the war to webapps. I have put all the jars in the application server lib directory. The application works fine. I just have to know, can we remove all the jars from WEB-INF/lib of war file. Is this approach right? please let me know.
And also I have another question. I manually remove the jar files from the created war file which got created using ant. Please give me examples to automatically remove jars from build.xml.
I see only disadvantages from this approach:
If you want to run another application on your server which use an other version of a library, you can't.
Each time you update a jar in you dev environment, you will need to manually copy it to your server lib/ directory instead of having it automatically packaged.
Why having them in WEB-INF/lib bothers you?

How to deploy a WAR file on Linux machine

I have a Linux Machine. Apache server is running and I need to deploy my project which is a .war file developed on Windows machine.
Can someone give me bit idea how to do that?
if you have FTP or SCP access to the directories where Tomcat is installed, you should be able to simply copy the generated WAR file to the tomcat/webapps directory. Tomcat will automatically deploy the war for you.
When redeploying, I find it safest to delete the original .WAR file in Tomcat, and tomcat will automatically destory the exploded directory for you. When that's done, copy up the .WAR file.
Finally, make sure you copy the .WAR file "all at once". If you have a slow upload, Tomcat will try and deploy the .WAR file even though it has not completely been uploaded yet. This will lead to a partial or unsuccessful deployment. It's best if you upload to a neutral directory (home directory, temp, whichever), and then either rename (using mv) the .WAR into tomcat, or simply copy it there using the local file systems copy command. Much faster than the upload. Safest way is to mv the file from the same filesystem.
All of this assumes you do not have any of the manager or admin ports open for Tomcat, as it provides mechanisms to remotely deploy applications directly.
But, in truth, simply removing the old app and slipping in the new app works simply and well for many applications.

How to deploy a theme.war file in liferay

I have a theme.war file, which I've placed in the server/tomcat/tomcat6/webapps of liferay folder. When I start the tomcat server this war files create a theme folder. Now to deploy it what should i do?
if you deployed from a bundle (and assuming the bundle's base directory is LIFERAY) there should be a LIFERAY/deploy directory next to the LIFERAY/tomcat6 directory. To deploy plugins to the Liferay portal server you should drop the WAR file in this deploy directory, not in the webapps. Plugins include portlet applications, themes, layouts, hooks and extensions.
In addition to what David stated (deploy through the "deploy" folder) you'll have to select your theme for the community, organization or just one page by selecting Manage/Page/Look&Feel when it's deployed to tomcat.
Somehow I had the impression that you expect it to show up immediately.
If you want to deploy directly to tomcat you'll have to build your theme in the plugins-sdk with "ant direct-deploy" - this creates a tomcat-deployable theme.

Resources