You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ##
25
23
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.
48
25
49
26
1. Login to Bluemix.
50
27
@@ -61,7 +38,7 @@ In order to deploy your app on BlueMix, it has to be wrapped in a WAR file. You
61
38
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.
*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
77
54
|*usage:*|`$ cf start APP`|
78
55
|------------|-----------------|
79
56
|*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.
80
71
81
72
## License ##
82
73
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