Skip to content

Set up your IDE

Steffen Baumann edited this page Oct 6, 2016 · 8 revisions

Quick guide on setting up your IDE

Installing Eclipse and WAS Liberty

Fast way: Set up Eclipse and local WAS Liberty server

  1. Download the bundled IDE from IBM Box
  2. Extract the contents to your preferred location <IDE_HOME>
  3. Start Eclipse from <IDE_HOME>\eclipse\eclipse.exe
  4. Open the view 'Servers'
  5. Click the link 'No servers are available. Click this link to create a new server...'
  6. Select 'IBM > WebSphere Application Server Liberty' and click 'Next'
  7. optional - change the Name of the server.
  8. Make sure, 'Choose an existing installation' is selected and click 'Browse...'
  9. Select the directory <IDE_HOME>\liberty
  10. Click 'Next' and check whether 'Liberty server' is 'defaultServer' and the User is 'localAdmin'
  11. Click 'Finish'

Details are covered by the <IDE_HOME>\info.txt as well

Do-it-yourself: Starting (almost) from scratch

  • Prerequisite: You have a proper configured JDK running on your system
  1. Follow the download instructions for IBM Bluemix IDE
    After installing Eclipse and the IBM Bluemix Tools you can install a WAS Liberty
  2. Open the view 'Servers'
  3. Click the link 'No servers are available. Click this link to create a new server...'
  4. Select 'IBM > WebSphere Application Server Liberty' and click 'Next'
  5. optional - change the Name of the server.
  6. Make sure, 'Install from an archive or a repository'.
  7. Click 'Next' and select your
  8. Select 'Download and install a new runtime environment from ibm.com:'
  9. Chose the 'WAS Liberty with Java EE 7 Full Platform'
  10. Finish the Installation

You will have to provide some more user information once the Server instance is started.

Integration with Bluemix GitHub - Build & Deploy

This sections describes a very quick way to publish your changes to Bluemix. Using Maven applications is very useful here, whereas other build and deploy tools (e.g. Gradle) should work very similar. Please notice, this might not the best approach though ;-)

Starting with Bluemix DevOps Services

IBM Bluemix DevOps Services allows managing your application by a GitHub repository.

  1. Add your application to a GitHub project via button on your application page.
  2. Copy the URL for the new repository

Back to Eclipse

Next step is adding the Maven project from Eclipse. Sample applications using Maven are available in IBM Box. We need the Bluemix Git repository in Eclipse first.

  1. Open the 'Git Repositories' view in Eclipse (Window > Show View > other ... > Git > Git Repositories)
  2. Select 'Clone a Git repository' and insert the copied URL in the URI field. Additional fields should filled in automatically.
  3. Enter your Bluemix credentials for the 'Authentication' section. You might be asked to enter those later again. Make sure you check storing your credentials, so you do not need to enter them each time.
  4. Within the 'Git Repositories' view expand the 'Working Tree' and delete all folder and files, except .git and .settings.
  5. Select your Project in Eclipse ('Project Explorer' view) and share it with the repository (Right-click > Team > Share Project...).
  6. Make sure, you are adding a new working directory to the existing repository.
  7. Commit and Push all changes done so far.

Returning to the Bluemix DevOps Services

In the 'Build & Deploy' section you are able to stage the build and deploy of your application. If you are building locally and uploading a finished WAR, you can deploy directly. Otherwise, you need to Build your application first.

  1. Configure the 'Build Stage' and select 'Maven' from the 'Builder Type' drop down.
  2. Set the Working Directory, which usually is your Project name from Eclipse.
  3. Set the Build Archive Directory to 'target' and save your changes.
  4. Once the build is finished, you need to get the name of your WAR file by clicking the 'Last Execution Result'.
  5. Configure the 'Deploy Stage' by changing the 'Deploy Script':
#!/bin/bash
cf push "${CF_APP}" -p ""
# View logs`
#cf logs "${CF_APP}" --recent
  1. Save the changes and start the stage.

Congratulation, you finished your Build & Deploy!