Skip to content

Commit 5c39973

Browse files
committed
Simplified instructions
Removed optionality in favor of reducing the time until a first push...moved instructions for importing into Eclipse until after the first deploy.
1 parent 4cdbe71 commit 5c39973

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed

README.md

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,13 @@ Before we begin, we first need to install the [**cf**](https://github.com/cloudf
1515

1616
cf -v
1717
18-
## Download the App ##
18+
## Download ##
1919

20-
The source for this app is at GitHub so, for example, if you are using the command line you can clone the repository like this:
20+
Download the latest WAR file 'release' from https://github.com/ibmjstart/bluemix-java-postgresql-upload/releases
2121

22-
git clone https://github.com/ibmjstart/bluemix-java-postgresql-upload.git
23-
24-
If you want to use Eclipse to work on it, there are two different ways you can get the source into Eclipse:
22+
## Deploy to BlueMix and Binding the PostgreSQL Service via the Command Line Interface ##
2523

26-
Option A. Import the Eclipse project by following these instructions:
27-
1. Start by cloning the repository, as described above
28-
2. Open Eclipse
29-
3. Select File->Import
30-
4. Under the header labeled "General", click "Existing Projects Into Workspace" and click Next
31-
5. Click "Browse" next to the first text field, and navigate to the cloned repository and find the folder labeled "app" and click ok.
32-
6. Under Projects you should now see a project called "PostgreSQLUpload", make sure the checkbox next to the "PostgreSQLUpload" project is checked and then click Finish
33-
7. You should now see the "PostgreSQLUpload" project in your list of projects in Eclipse.
34-
35-
-OR-
36-
37-
Option B. Import the WAR File
38-
1. Navigate to https://github.com/ibmjstart/bluemix-java-postgresql-upload/releases
39-
2. Click the green button labeled "PostgreSQLUpload.war" and that will download the WAR file.
40-
3. Open Eclipse
41-
4. Then File->Import
42-
5. Scroll down to the "Web" section, expand that section and click WAR File then click Next.
43-
6. Click next and then Finish and the project should be imported into Eclipse
44-
45-
## Deploying the App to BlueMix and Binding the PostgreSQL Service##
46-
47-
In order to deploy your app on BlueMix, it has to be wrapped in a WAR file. You can export the project from Eclipse to a WAR file, or download the WAR file for this sample here: https://github.com/ibmjstart/bluemix-java-postgresql-upload/releases. In the terminal, go in the directory of the app.
24+
From the command line, navigate to the directory of the app and run the following commands.
4825

4926
1. Login to Bluemix.
5027

@@ -61,7 +38,7 @@ In order to deploy your app on BlueMix, it has to be wrapped in a WAR file. You
6138
3. From the directory you placed your WAR file in, push the app with the -p flag to specify the WAR file path and the --no-start option so we can bind our required service before starting our app. Give your app a unique app name to be used as its hostname; for instance the example below would be hosted at http://jpu.ng.bluemix.net.
6239

6340
| *usage:* | `$ cf push APP [--no-manifest] [--no-start] [-p PATH]` |
64-
|------------|-----------------------------------------------------------------|
41+
|------------|:----------------------------------------------------------------|
6542
| *example:* | `$ cf push jpu --no-manifest --no-start -p PostgreSQLUpload.war`|
6643

6744
*Note* : `-p PostgreSQLUpload.war` assumes you are running these commands from within the same directory that this file resides.
@@ -77,6 +54,20 @@ In order to deploy your app on BlueMix, it has to be wrapped in a WAR file. You
7754
| *usage:* | `$ cf start APP`|
7855
|------------|-----------------|
7956
| *example:* | `$ cf start jpu`|
57+
58+
## Import the App into Eclipse ##
59+
60+
To view and edit the application, simply import the project into Eclipse. If you don't have an Eclipse instance with Java EE support, you may download it from https://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/keplersr2
61+
62+
Once you have it running, you can Import the WAR file as a new project via
63+
1. File->Import...
64+
2. Scroll down to the "Web" section, expand that section and click WAR File then click Next.
65+
3. Deselect the 'Add project to an EAR' checkbox
66+
4. Click next and then Finish and the project should be imported into Eclipse
67+
68+
Now that you have the project in Eclipse, you can edit the source and re-deploy to BlueMix by either:
69+
a. Exporting your updated project as a WAR file and push it from the command line as before; or
70+
b. Installing the [Eclipse Cloud Foundry Plugin](https://marketplace.eclipse.org/content/cloud-foundry-integration-eclipse), defining the BlueMix endpoint (https://api.ng.bluemix.net), and deploying your application right from Eclipse.
8071

8172
## License ##
8273
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

0 commit comments

Comments
 (0)