Set Up the Eclipse IDE for Linux


So far, you've configured your environment, installed the Atlassian SDK, and created a HelloWorld plugin project. You've tweaked the plugin project a bit but it has no modules so other than live in the UPM, it does nothing. Of course, you've done all this on the command line — most programmers prefer the advantages of an IDE. So, on this page, you configure the Eclipse IDE to work with the SDK, import HelloWorld, and add some functionality.

Windows user? See this page.

IntelliJ user? See this page.

Step 1: Install the Eclipse IDE

If you already have a version of Eclipse installed you don't need this step. This tutorial assumes you use a particular version of Eclipse, and you may need to adjust procedures if you use another version. If you prefer another IDE, skip this page.


In this step, you download and install the Eclipse IDE for Java EE Developers (Indigo). This version of Eclipse comes with most of the Maven dependencies already installed. Do the following to install Eclipse in your system:

  1. Download the Eclpse IDE for Java EE developers.
    This IDE has many of the dependencies required by the Maven Eclipse plugin.
    The Maven Plugin to be downloaded is not compatible with Eclipse Kepler or Indigo, so download the Luna edition.
  2. Move the tar file into your home directory.
  3. Expand the tar file.

    tar -xvzf eclipse-standard-luna-R-macosx-cocoa-x86_64.tar.gz
    

    When you are done, you will have an eclipse directory in your home directory.

Step 2: Start Eclipse and update the Installed JREs

Now you are ready to start Eclipse.

  1. Change directory to ~/eclipse.
  2. Run the eclipse program by typing:
    ./eclipse
    Eclipse prompts you to identify the location of your workspace.
  3. Enter the location of the atlastutorial directory.
  4. Open the Eclipse > Preferences dialog.
  5. Filter for or navigate to the Installed JREs page.
  6. Make sure that the checked JRE comes from the JDK 1.6.

Step 3: Install the Maven Eclipse Plugin

Start Eclipse and do the following:

  1. Choose Help > Install New Software from the menu bar.
    The Available Software dialog appears.
  2. Click the Add button.
    The Add Repository dialog appears.
  3. Enter Sonatype M2Eclipse in the Name field.
  4. Enter http://download.eclipse.org/technology/m2e/releases in the Location in the field.
  5. Press OK to close the dialog.
    The system searches the site for the plugin. After a moment, the Name field fills with the Maven Integration for Eclipse.
  6. Check the box and press Next.
  7. Select the Maven Integration for Eclipse.
  8. Press Next and Next again.
  9. Accept the terms of the license agreement and press Finish.
    Eclipse calculates the dependencies and space
  10. Press Next.
  11. Accept the License agreement and press Next
  12. Press Finish.
    The installation procedure runs.
  13. Restart Eclipse when prompted.

Step 4: Configure the Maven Plugin

After Eclipse has restarted, configure it to use the Maven Eclipse plugin you just installed.

  1. Choose Window > Preferences from the Eclipse menu bar.
    The system displays the preferences dialog.
  2. Filter for or navigate to the Maven > Installations page.
  3. Click the Add button.
    The Maven Installation dialog displays.
  4. Browse to your /usr/share/atlassian-plugin-sdk-<version>/apache-maven installation.
  5. Press OK.
    The system sets this external repository for you. The dialog should look like the following:
  6. Ensure the Global settings are coming from the installation directory.
  7. Press Apply.
  8. Click the Maven root.
  9. Uncheck Download repository index updates on startup.
    This prevents Maven from updating on Eclipse start up, which can be time-consuming. The atlas- commands update the repositories for you.
  10. Press OK to close the dialog.

The Next Steps

You've got Eclipse set up and configured. Now, you can import your project into Eclipse and use the Atlassian SDK with it.

 

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport