0

I'm working on a Liferay project.

I'm developing a new Liferay theme using Plugins SDK.

I wonder is it better to use ANT or MAVEN for the project?

Because I managed to run both projects in eclipse.

Also is there any way to deploy automatically the theme in the production server ? (Distant server using tomcat).

For now I'm just using auto deployment, copying the war file to the /deploy file.

Regards

VC1
  • 1,660
  • 4
  • 25
  • 42
wadi3
  • 226
  • 3
  • 13
  • Is ant or maven better? "It depends". At least both are different. Also, I personally object to be able to deploy new plugins to a production server "on the fly" from a development environment. It's a bit too fragile IMHO. Do you have a proper backup? Can you reproduce the current server setup on a new machine, should the current one go down? – Olaf Kock Mar 18 '14 at 14:18

2 Answers2

0

You can add remote server to your Eclipse with Plugins SDK, check https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/developing-apps-with-liferay-ide-liferay-portal-6-2-dev-guide-02-en

MatR
  • 26
  • 2
0

(this may be helpful for older versions of plugins-sdk)

Assuming that you have ssh access to the remote server, the following ant target can be added and used in /liferay-plugins-sdk/build-common-plugin.xml

<property name="web-server" value="11.11.11.11" />
<property name="web-server-username" value="yourusername" />
<property name="web-server-password" value="yourpassword" />
<property name="web-server-deploy-folder-path" value="/liferay-x.x/deploy" />

<target name="remote-deploy" depends="war">
    <echo message="Copying plugin to remote server ..." />
    <scp
        file="${plugin.file}"
        todir="${web-server-username}:${web-server-password}@${web-server}:${web-server-deploy-folder-path}" 
        trust="true"
      />
    <echo message="Done!" />
</target>
Artem Khojoyan
  • 857
  • 1
  • 6
  • 11
  • Hi This worked for me as well, but its more comfortable to use the remote server adapter for managing deployment. – wadi3 Mar 18 '14 at 12:07