diff --git a/Procfile b/Procfile
index 8459100..4873772 100644
--- a/Procfile
+++ b/Procfile
@@ -1 +1 @@
-web: sh target/bin/webapp
+web: java -cp target/classes:target/dependency/* HelloWorld
diff --git a/README.md b/README.md
index fb0a7b6..4135277 100644
--- a/README.md
+++ b/README.md
@@ -83,7 +83,7 @@ You can run any Java application on Heroku that uses Maven as build tool. As an
## Declare Dependencies in `pom.xml`
-Cedar recognizes Java apps by the existence of a `pom.xml` file. Here's an example `pom.xml` for the Java/Jetty app we created above. The `maven-appassembler-plugin` generates an execution wrapper with the correct `CLASSPATH`.
+Cedar recognizes Java apps by the existence of a `pom.xml` file. Here's an example `pom.xml` for the Java/Jetty app we created above.
### pom.xml
@@ -100,7 +100,7 @@ Cedar recognizes Java apps by the existence of a `pom.xml` file. Here's an examp
org.eclipse.jetty
jetty-servlet
- 7.4.5.v20110725
+ 7.6.0.v20120127
javax.servlet
@@ -111,22 +111,14 @@ Cedar recognizes Java apps by the existence of a `pom.xml` file. Here's an examp
- org.codehaus.mojo
- appassembler-maven-plugin
- 1.1.1
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 2.4
+ copy-dependencies
package
- assemble
-
- target
-
-
- HelloWorld
- webapp
-
-
-
+ copy-dependencies
@@ -154,13 +146,15 @@ On Mac & Linux:
:::term
$ export PORT=5000
- $ sh target/bin/webapp
+ $ java -cp target/classes:"target/dependency/*" HelloWorld
+
+(double quotes needed to prevent expansion of '*')
On Windows:
:::term
$ set PORT=5000
- $ target\bin\webapp.bat
+ $ java -cp target\classes:"target\dependency\*" HelloWorld
You should now see something similar to:
@@ -180,8 +174,9 @@ To run your web process on Heroku, you need to declare what command to use. We'
Here's what the `Procfile` looks like:
:::term
- web: sh target/bin/webapp
+ web: java -cp target/classes:target/dependency/* HelloWorld
+(note: no double quotes needed in Procfile)
## Store Your App in Git
@@ -241,14 +236,14 @@ Now, let's check the state of the app's processes:
$ heroku ps
Process State Command
------------ ------------------ ------------------------------
- web.1 up for 10s sh target/bin/webapp
+ web.1 up for 10s java -cp target/classes:target
The web process is up. Review the logs for more information:
:::term
$ heroku logs
...
- 2011-08-18T05:30:55+00:00 heroku[web.1]: Starting process with command `java -Xmx384m -Xss256k -XX:+UseCompressedOops -classpath target/classes:"target/dependency/*" HelloWorld`
+ 2011-08-18T05:30:55+00:00 heroku[web.1]: Starting process with command `java -Xmx384m -Xss256k -XX:+UseCompressedOops -cp target/classes:target/dependency/* HelloWorld`
2011-08-18T05:30:56+00:00 app[web.1]: 2011-08-18 05:30:56.310:INFO::jetty-7.4.5.v20110725
2011-08-18T05:30:56+00:00 app[web.1]: 2011-08-18 05:30:56.353:INFO::started o.e.j.s.ServletContextHandler{/,null}
2011-08-18T05:30:56+00:00 app[web.1]: 2011-08-18 05:30:56.389:INFO::Started SelectChannelConnector@0.0.0.0:22464 STARTING
diff --git a/pom.xml b/pom.xml
index e1ca90a..02beb22 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
org.eclipse.jetty
jetty-servlet
- 7.4.5.v20110725
+ 7.6.0.v20120127
javax.servlet
@@ -21,22 +21,14 @@
- org.codehaus.mojo
- appassembler-maven-plugin
- 1.1.1
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 2.4
+ copy-dependencies
package
- assemble
-
- target
-
-
- HelloWorld
- webapp
-
-
-
+ copy-dependencies