Thursday Jan 09, 2014

Running Jersey 2 Applications on Heroku

In this article we’ll create a simple Jersey application deploy it in Jetty servlet container and everything will be hosted on Heroku.

Create an Application

To create a skeleton of Jersey 2 web-app that can be run on Heroku from the jersey-heroku-webapp archetype (available since Jersey 2.5), execute the following Maven command in the directory where you want the new project should be located:

mvn archetype:generate -DarchetypeArtifactId=jersey-heroku-webapp \
    -DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false \
    -DgroupId=com.example -DartifactId=simple-heroku-webapp -Dpackage=com.example \
    -DarchetypeVersion=2.5.1

Adjust the groupIdpackage and/or artifactId of your new web application project to your needs or, alternatively, you can change it by updating the new project pom.xml once it gets generated.

More in my original post on blog.dejavu.sk 

About

Mirror of blog.dejavu.sk

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today