Skip to content

Commit

Permalink
Correct deploy to Bluemix and Maven integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeden25 committed Feb 6, 2015
1 parent 3e7077c commit 227586d
Show file tree
Hide file tree
Showing 55 changed files with 802 additions and 608 deletions.
Binary file modified ElephantSQL-Uploader.war
Binary file not shown.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Simply upload a line-separated file of text (e.g. tweets), and it will add each
This tutorial is intended to deploy a pre-compiled warfile through the command line. If you would like to
use Eclipse and modify the source code, see [development](#development).

Give it a try! Click the button below to fork into IBM DevOps Services and deploy your own copy of this application on Bluemix.

[![Deploy to Bluemix](images/deploy-button.png)](https://hub.jazz.net/code/cfui/bluemix/deploy.html?Repository=https://github.com/ibmjstart/bluemix-java-postgresql-uploader.git)

Note it will take a minute or so to start up.

## Prerequisites ##

Before we begin, we first need to install the [**cf**](https://github.com/cloudfoundry/cli/releases) command line tool that will be used to upload and manage your application. If you've previously installed an older version of the cf tool, make sure you are now using v6 of cf by passing it the -v flag:
Expand All @@ -29,14 +35,12 @@ From the command line, navigate to the directory of the app and run the followin

1. Login to Bluemix.


| *usage:* | `$ cf login [-a API_URL] [-o ORG] [-s SPACE]`|
|------------|:---------------------------------------------|
| *example:* | `$ cf login -a https://api.ng.bluemix.net` |

2. Create an instance of the ElephantSQL service, giving it a unique name in the last argument. The application is written to assume that the service instance name will begin with "elephantsql".


| *usage:* | `$ cf create-service SERVICE PLAN SERVICE_INSTANCE`|
|------------|:---------------------------------------------------|
| *example:* | `$ cf create-service elephantsql turtle elephantsql_JEU`|
Expand All @@ -46,17 +50,15 @@ path and the --no-start option so we can bind our required service before starti
app a unique app name to be used as its hostname; for instance, if you replace `<YOUR-NAME>`
with 'user1' then the example below would be hosted at http://jeu-user1.mybluemix.net.


| *usage:* | `$ cf push APP [--no-manifest] [--no-start] [-p PATH]` |
|------------|:----------------------------------------------------------------|
| *example:* | `$ cf push jeu-<YOUR-NAME> -b https://github.com/cloudfoundry/java-buildpack --no-manifest --no-start -p ElephantSQL-Uploader.war`|

*Note* : `-p elephantSQL.war` assumes you are running these commands from within the same directory that
*Note* : `-p ElephantSQL-Uploader.war` assumes you are running these commands from within the same directory that
this file resides.

4. Bind the elephantSQL service instance to the new app


| *usage:* | `$ cf bind-service APP SERVICE_INSTANCE`|
|------------|:----------------------------------------|
| *example:* | `$ cf bind-service jeu-<YOUR-NAME> elephantsql_JEU`|
Expand Down
13 changes: 0 additions & 13 deletions app/.classpath

This file was deleted.

8 changes: 0 additions & 8 deletions app/.settings/org.eclipse.wst.common.component

This file was deleted.

7 changes: 0 additions & 7 deletions app/.settings/org.eclipse.wst.common.project.facet.core.xml

This file was deleted.

3 changes: 0 additions & 3 deletions app/WebContent/META-INF/MANIFEST.MF

This file was deleted.

15 changes: 0 additions & 15 deletions app/WebContent/WEB-INF/ibm-web-ext.xml

This file was deleted.

Binary file removed app/WebContent/WEB-INF/lib/commons-codec-1.6.jar
Binary file not shown.
Binary file not shown.
Binary file removed app/WebContent/WEB-INF/lib/commons-io-2.4.jar
Binary file not shown.
Binary file removed app/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar
Binary file not shown.
Binary file removed app/WebContent/WEB-INF/lib/fluent-hc-4.2.5.jar
Binary file not shown.
Binary file removed app/WebContent/WEB-INF/lib/httpclient-4.2.5.jar
Binary file not shown.
Binary file not shown.
Binary file removed app/WebContent/WEB-INF/lib/httpcore-4.2.4.jar
Binary file not shown.
Binary file removed app/WebContent/WEB-INF/lib/httpmime-4.2.5.jar
Binary file not shown.
Binary file removed app/WebContent/WEB-INF/lib/json-simple-1.1.jar
Binary file not shown.
Binary file not shown.
Binary file removed app/WebContent/WEB-INF/lib/servlet-api-2.5.jar
Binary file not shown.
33 changes: 0 additions & 33 deletions app/WebContent/WEB-INF/web.xml

This file was deleted.

Binary file removed app/WebContent/favicon.ico
Binary file not shown.
27 changes: 27 additions & 0 deletions bluemix-java-postgresql-uploader/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
78 changes: 42 additions & 36 deletions app/.project → bluemix-java-postgresql-uploader/.project
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PostgreSQLUpload</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>bluemix-java-postgresql-uploader</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
25 changes: 13 additions & 12 deletions app/.settings/.jsdtscope → ...-postgresql-uploader/.settings/.jsdtscope
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="js/" kind="src" path="WebContent"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/webapp"/>
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
15 changes: 8 additions & 7 deletions app/.settings/org.eclipse.jdt.core.prefs → ...ader/.settings/org.eclipse.jdt.core.prefs
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="bluemix-java-postgresql-uploader">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<property name="context-root" value="bluemix-java-postgresql-uploader"/>
<property name="java-output-path" value="/bluemix-java-postgresql-uploader/target/classes"/>
</wb-module>
</project-modules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<root>
<facet id="jst.jaxrs">
<node name="libprov">
<attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
</node>
</facet>
<facet id="jst.jsf">
<node name="libprov">
<attribute name="provider-id" value="jsf-no-op-library-provider"/>
</node>
</facet>
</root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="jst.jaxrs" version="1.1"/>
<installed facet="jst.jsf" version="2.0"/>
</faceted-project>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1
Loading

0 comments on commit 227586d

Please sign in to comment.