
Liferay IDE Proxy Configuration
Requirements For Tutorial #
- Liferay IDE 2.0.x
- Liferay Portal Server 6.1.1 CE GA2
- Liferay Portal Server 6.1.x running remotely (Tomcat, JBoss, Glassfish servers supported and Proxies supported.
- OmniAdmin username/password for remote Liferay Portal instance
- Download one of the liferay IDE test bundles which contain a 2.0 test build from the urls below:
Liferay IDE bundle for Linux(64-bit) md5: 115495fbd08bc8f78e01bd708713dd0b
Liferay IDE bundle for Linux(32-bit) md5: 145b5ffb0f72d717ca7ef5bf22fe9918
Liferay IDE bundle for Windows(64-bit) md5: 51071a9f1e2bdb7af2f6c4800aa0e6e5
Liferay IDE bundle for Windows(32-bit) md5: ce967ca4535df300e0ff20bc0756deb3
Introduction #
The Remote Server support is a feature of Liferay IDE where you can deploy your Liferay projects to a remote Liferay Portal. The remote instance of Liferay Portal must have the Remote IDE Connector application installed from Liferay marketplace. This application installs the server-manager-web plugin for Liferay that provides an API for Liferay IDE's Remote Server Adapter to use for all its remote operations. In the test builds above a new feature has been added that includes support for HTTP and SOCKS type proxies.
Configure the Remote Server Adapter to use a HTTP/SOCKS Proxy #
You can configure both the HTTP or SOCKS proxy for connecting to Liferay Portal with the remote server adapter. Below are the steps to follow:
- Ensure that the remote Liferay Portal instance is running and you can login using OmniAdmin username/password
- Ensure your proxy server is running and configured.
- In Eclipse bundled with Liferay IDE 2.0.x plugins installed, go to Windows > preferences > General > Network Connections, then in the Active Provider check box, choose Manual.
- Clear all the data in Proxy entries by selecting each entry's data and clicking on the clear button.
- Double click on the HTTP (or SOCKS) entry which depends on which type of proxy you want to use and input your proxy server's hostID and port.
- Select OK
- The next thing is to remove the data in the Proxy bypass, because the default hostname for liferay IDE is localhost(127.0.0.1), and you must remove the default bypass to make the proxy you will set work correctly.
- Select OK
- The next step is to define a new remote server. So the first thing is to click on the liferay server shortcut and open a new page called Define a New Server.
- Select next
- Then type in the hostname for the remote Liferay Portal.
- Select the runtime stub as well or configure a new one if one isn't available. This must point to a local Liferay Portal Tomcat bundle.
- Then you'll see the validating is working, and it may take a few seconds.
- Click Next
- The wizard will begin validating the connection, and will show any invalid response from the server as a warning.
- If you've set the proxy configuration in the preference following the steps above, but the remote server is shutdown or the proxy isn't working, you'll see this errror:
- If you even haven't set any proxy at all or the situation is the normal access blocked by the remote server, you will see another error like this:
- Don't forget to input the password for the first time verification. If the password is not given, even though what you've configured is right, it will still have an error.
- When everything above is correct, then type in your passwd and click on validate button again. You will see the correct response like this.
- Select Finish
- Once you select Finish, the new Remote Server will be available in the Servers view and Eclipse will connect to the remote server by the proxy which you've already configured. Then the remote liferay logs will be displayed in Eclipse's console. If your remote server is in debug mode, the Eclipse java debugger will be attached to the remote process automatically.
- If the settings are invalid and the connection can't be established, you can modify the Remote Server settings at any time by double-clicking the server instance in the Servers view and modify the settings in the configuration editor.
Using the Remote Server Adapter #
Once you have the Remote Server correctly configured and connected in Eclipse, you can begin using it as you would a local Liferay Portal Tomcat server, publishing projects to the server.
- Right-click the server and choose Add and Remove modules...
- Select Liferay projects you wish to publish to the remote server, select Finish
- The deployment process should start and after it is published to remote server you should see a message saying plugin is deployed
- After you have made the initial remote deployment, if you make any changes to your project, you will need to publish these changes (or have them published automatically in the settings). To invoke a publish operation (after having modified some project files) right click on the server in the Servers view and select Publish
- If you want to modify the publish operation behavior, you can do that in the server configuration editor (double-click server in Servers view)
#If you receive errors, visit the Liferay IDE forums and post the warning/error to try to get help.