Jelastic + IntelliJ IDEA: ideal combination for Java guys!

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Now Jelastic is integrated with the most intelligent Java IDE – JetBrains IntelliJ IDEA. Such features as smart code completion, easier multi-language editing and flexible cross-platform UI has made IDEA one of the most popular Java IDEs. Each of the individual features in IntelliJ IDEA increases the user’s comfort and contributes to productivity, the way closer tolerances and finer construction in a musical instrument pull the best performance from a musician. For example, IntelliJ IDEA’s savvy code completions, convenient-to-use intention actions, unparalleled code analysis tools and many incremental editor enhancements – each feature separately is top-notch in its class. Its support for navigability and refactoring across multiple languages (Java, JSP, JSF, HQL, Spring) is also an absolutely great feature for productivity. IntelliJ IDEA has a robust plugin ecosystem with lots of available plugins including Jelastic plugin from now. Special Jelastic plugin allows you to log in to Jelastic and deploy an app in the cloud without switching between the IDE and the browser. This plugin is supported beginning from the 11th version of IntelliJ IDEA.

Let’s consider now how to install the plugin and manage Jelastic environments through IntelliJ IDEA.

Plugin Installation

For plugin work it is required JavaEE plugin for IDEA which is included to IntelliJ IDEA Ultimate version.

To install the plugin go to your IDEA:

1. Navigate to Settings > Plugins.

2. Click Browse repositories and in the opened window choose Jelastic plugin.

3. Download and Install it and after that restart IDEA.

download plugin

Entering Jelastic system in IDEA

1. To work with Jelastic system through IDEA navigate to Settings > Jelastic.

2. In the opened Jelastic Settings tab fill in your account credentials: enter your login, password and choose Jelastic provider from the list. Submit your choice.

log in to the plugin

Deploying application to the cloud

1. You can see the button with Jelastic logo in the main IDEA toolbar or in the popup menu for Projects tool window. If you have your java web project and want to deploy it just click this button.

2. In the opened window choose the appropriate artifact (.war archive), state the Context and choose the environment from the list. Confirm your choice.

The deployed project is going to be displayed in Jelastic Tool Window. When you press Deploy button Jelastic Plugin will perform build operation of selected artifact and deploy it to Jelastic.

deployment of the app

Working with existing environments and viewing logs

1. Jelastic Tool Window in IDEA displays your current environments. Expand the list of your environment to see the added nodes and deployed applications.

2. Using context menu you can manage your environment (Stop/Start, Restart or Refresh) and deployed projects (Destroy, Open in browser or Refresh).

open the application

3. To get the logs of the containers click on the node and choose Get logs menu item. Choose the file you are interested in and click View log (or just double-click on item).

view application logs

Creating web project in IDEA and artifacts

1. You can create your own project in IDEA and deploy it straightly to Jelastic environment. A project should be created as Java Module. So while creating your new project fill in all required fields and select Java Module type.

create idea project

2. As the next step you need to select the desired technologies. Choose Web Application as your project should support this framework.

choose web application

When the project is created, the default artifact will be generated. It is an exploded war package which includes executable files of web project and also static pages.

3. To view the existing artifacts for the project navigate to File > Project structure > Artifacts. Choose an artifact from the list to see its structure and some more detailed information.

4. Build on make option allows to generate the chosen artifact each time after building the project.

build on make

For deploying to the server a new war archive artifact should be created and Build on make option ticked in it.

new war arvhive

5. When the project is configured, the code is written and everything is ready for deploying the only thing left is to click Make project. After that the artifacts are going to be built and fully ready for deploy.

10

6. Then deploy the project you’ve just created as it’s described earlier.

11

7. To check if your application is working choose Open in browser menu item for the appropriate context.

12

The application is going to be opened in your browser.

13

Here you can also see the video version of the same procedure:

That’s all! Enjoy using Jelastic through IDEA!

Jelastic also integrates with build systems such as Maven, Ant, Hudson and Jenkins, as well as the Eclipse IDE and we continuing to work on plugins for other widely used IDEs. Please tell us which one do you prefer to use in the comments below.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

2 Comments

Leave a Reply

Contact Jelastic for More Information CONTACT
%d bloggers like this: