Eclipse
From Resin 3.0
Line 4: | Line 4: | ||
===Eclipse Versions Supported=== | ===Eclipse Versions Supported=== | ||
− | Like Tomcat, GlassFish and JBoss the Resin Eclipse plugin is based on the | + | Like Tomcat, GlassFish and JBoss the Resin Eclipse plugin is based on the [http://www.eclipse.org/webtools/ Eclipse Web Tools Platform (WTP)] . You must have the WTP installed for the Resin plugin to work. Generally, if you download the [http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigor Eclipse IDE for Java EE Developers (Indigo)], it will automatically include the WTP. Otherwise, you can add the WTP to your Eclipse installation yourself. |
The Resin Eclipse plugin supports Helios (Eclipse 3.6) and above and should be installed through the [[http://www.caucho.com/eclipse|Resin Eclipse Plugin update site]]. | The Resin Eclipse plugin supports Helios (Eclipse 3.6) and above and should be installed through the [[http://www.caucho.com/eclipse|Resin Eclipse Plugin update site]]. | ||
Line 11: | Line 11: | ||
Detailed instructions on how to install the plugin for your version of Eclipse are described below. | Detailed instructions on how to install the plugin for your version of Eclipse are described below. | ||
− | ===Installing through Eclipse Server auto-discovery=== | + | ===Installing through Eclipse Server auto-discovery (Indigo++)=== |
To install Resin on Indigo or above, go to the 'Servers' View - it is typically in the bottom tabs (make sure you are in the Java EE Perspective). Right click and select 'New->Server'. In the 'New Server' dialog, you will likely not see Resin as an option. To install Resin, you will have to click on the 'Download additional server adapters' option. It will take a few seconds for the 'Install New Extension' dialog to fully load. Once it loads, select the 'Resin (Java EE Web Profile) Server' option and click 'Next'. | To install Resin on Indigo or above, go to the 'Servers' View - it is typically in the bottom tabs (make sure you are in the Java EE Perspective). Right click and select 'New->Server'. In the 'New Server' dialog, you will likely not see Resin as an option. To install Resin, you will have to click on the 'Download additional server adapters' option. It will take a few seconds for the 'Install New Extension' dialog to fully load. Once it loads, select the 'Resin (Java EE Web Profile) Server' option and click 'Next'. | ||
[[Image:New_extension.png|center|frame|Install Server Support for Resin]] | [[Image:New_extension.png|center|frame|Install Server Support for Resin]] | ||
Line 19: | Line 19: | ||
[[Image:New_server_resin.png|center|frame|New Server Dialog with Resin Support]] | [[Image:New_server_resin.png|center|frame|New Server Dialog with Resin Support]] | ||
− | ===Installing from the Resin Eclipse plugin update site=== | + | ===Installing from the Resin Eclipse plugin update site (Helios++)=== |
Eclipse versions prior to Indigo did not have Resin automatically registered as a server option. For these versions, you will need to install the Resin plugin yourself directly from the Resin Eclipse plugin website (http://www.caucho.com/eclipse). One very nice side-effect of the manual plugin installation option is that you can download the very latest pre-release Resin Eclipse plugin snapshot from the snapshot site (http://www.caucho.com/eclipse-snapshot). | Eclipse versions prior to Indigo did not have Resin automatically registered as a server option. For these versions, you will need to install the Resin plugin yourself directly from the Resin Eclipse plugin website (http://www.caucho.com/eclipse). One very nice side-effect of the manual plugin installation option is that you can download the very latest pre-release Resin Eclipse plugin snapshot from the snapshot site (http://www.caucho.com/eclipse-snapshot). | ||
Revision as of 09:42, 8 July 2011
(This page is incomplete and currently being actively updated!)
Resin includes excellent support for Eclipse much in the same fashion as other Java application platforms like GlassFish, JBoss and Tomcat. This page describes the details of the Resin Eclipse plugin.
Contents |
Eclipse Versions Supported
Like Tomcat, GlassFish and JBoss the Resin Eclipse plugin is based on the Eclipse Web Tools Platform (WTP) . You must have the WTP installed for the Resin plugin to work. Generally, if you download the Eclipse IDE for Java EE Developers (Indigo), it will automatically include the WTP. Otherwise, you can add the WTP to your Eclipse installation yourself.
The Resin Eclipse plugin supports Helios (Eclipse 3.6) and above and should be installed through the [Eclipse Plugin update site]. For Indigo (Eclipse 3.7) and above, the Resin plugin is already registered.
Detailed instructions on how to install the plugin for your version of Eclipse are described below.
Installing through Eclipse Server auto-discovery (Indigo++)
To install Resin on Indigo or above, go to the 'Servers' View - it is typically in the bottom tabs (make sure you are in the Java EE Perspective). Right click and select 'New->Server'. In the 'New Server' dialog, you will likely not see Resin as an option. To install Resin, you will have to click on the 'Download additional server adapters' option. It will take a few seconds for the 'Install New Extension' dialog to fully load. Once it loads, select the 'Resin (Java EE Web Profile) Server' option and click 'Next'.
Accept the license terms to start the installation (you might also get an "unsigned content" warning to proceed with the installation). The installation might take a few minutes.
Once the installation finishes, you may be asked to restart Eclipse. You should verify a successful installation by checking if Resin is included in the 'New Server' dialog.
Installing from the Resin Eclipse plugin update site (Helios++)
Eclipse versions prior to Indigo did not have Resin automatically registered as a server option. For these versions, you will need to install the Resin plugin yourself directly from the Resin Eclipse plugin website (http://www.caucho.com/eclipse). One very nice side-effect of the manual plugin installation option is that you can download the very latest pre-release Resin Eclipse plugin snapshot from the snapshot site (http://www.caucho.com/eclipse-snapshot).
To install the plugin, you must first register the plugin website as an Available Software Site in Eclipse. You do this by going to 'Help->Install New Software...->Add...'. In the 'Add Repository' dialog, enter a name and the location for the Resin Eclipse plugin website (http://www.caucho.com/eclipse).
After clicking OK, the plugin site will be registered. After the site is registered, select "Resin (Java EE 6 Web Profile) Server" and click 'Next'.
Review the installation and click 'Next' again. Accept the license terms to start the installation (you might also get an "unsigned content" warning to proceed with the installation). The installation might take a few minutes. Once the installation finishes, you may be asked to restart Eclipse. Once the installation finishes, go to the 'Servers' View - it is typically in the bottom tabs (make sure you are in the Java EE Perspective). Right click and select 'New->Server'. In the 'New Server' dialog, you will see Resin as an option.
Adding a runtime
To add a server, use the Add Server dialog and choose Resin.
The first step to adding a server is adding a Resin runtime. A Resin runtime essentially corresponds to a Resin installation while a server corresponds to particular running instance of the runtime. If you only care about running a single instance of Resin, the runtime and server would be synonymous to you. If you have already created a runtime, you can simply use that to create a new server by choosing it in the first step of the dialog. If the Resin plugin does not find an existing runtime, it will automatically start the Add New Runtime dialog for you as part of adding the server. A runtime consists of a JRE as well as a Resin installation (Resin Home). If you already have Resin installed, point Resin Home to where you installed Resin. If you have not yet installed Resin, you can do so now by clicking the 'Download and Install' button. This will install the latest version of Resin in the Resin Home location.
If you need it, you can certainly create more than one Resin runtime. The most common use of this is using more than one Resin version at a time. You create new runtimes by selecting 'Window->Preferences->Server->Runtime Environments->Add...'.
While adding a new server, you can choose the existing runtime that is most suitable.
Server Licenses
The next step to adding a runtime is requesting a development license. You can use the development license to enable Resin Pro features. The license will be sent to you via email.
Note the license dialog will only appear if your Resin installation is missing a license. Otherwise, the license dialog is omitted.
Requesting a license is completely optional and can be skipped over. All of the Resin Open Source features will still be available to you for development.
Server Configuration
Once you've setup a Resin runtime, you will need to configure the server instance. The Configure Server dialog is fairly self-explanatory. Resin Home is taken from the Resin Runtime for which you are configuring a server. The working directory can and should be different than the Resin Home if you are running multiple instances against the same runtime. If you are running just one instance of Resin, it makes sense for Resin Home and the working directory to be the same, which is the default.
The port configuration is the HTTP port for Resin, the default for which is 8080. If you wish, you can use git-based remote deployment. You can also change the web apps directory for Resin (you can use relative or absolute paths). In most cases, the default of 'webapps' relative to the Resin working directory is probably fine. By default Eclipse projects are deployed as WAR files to the Resin web apps directory. If you want, you can skip the WAR packaging step by choosing 'Deploy as directory'. This will deploy the web application as in exploded form instead. You are required to specify an admin user and password for the Resin server. You can use the defaults, but it is prudent to change it.
After you configure the server, you can add one or more existing projects to the Resin server as the final step of adding a server. Once a server is added, you will see it in the 'Servers' view.
Server Configuration
The configuration for each Eclipse Resin server instance is stored under the /Servers directory. You will see the main resin.xml configuration file as well as admin-users.xml (pre-filled with the values you entered during server configuration), app-default.xml as well as health.xml. The plugin uses the default configuration supplied with Resin for creating the instance configuration. For remote deployment and restart purposes it adds <resin:RemoteAdminService/> to resin.xml, in addition to enabling admin-users.xml.
You can configure your Resin instance appropriately for development using the configuration files in /Servers.
Modifying Server
You can modify the server once it is created, to a greater degree than the server creation wizard allows. In order to modify the server, right click on the instance and select open. This will open a property sheet in Eclipse showing all the configuration options you can modify, including the fine-grained launch configuration.
You can modify the server name, host name, underlying runtime, where the Resin configuration is stored, the server address, server port, automatic publish settings, server operation timeouts and so on. Generally, the defaults are suitable for most situations.
Server Operations
The Resin plugin supports all of the common server operations supported by WTP. You can start a server, stop a server, restart a server, debug on the server, profile a server, add/remove projects to the server, clean the server, and deploy/redeploy applications.
A majority of these operations can be accessed by right-clicking the server instance or right clicking a project associated with a Resin server.