0
I Use This!
Activity Not Available

Project Summary

What is this?This project is a simple template for setting up Maven and Jetty. Why would you need that? Can't you just use the maven jetty plugin? Yes you can, but this template also is set up to make a zip containing all dependencies including Jetty and your webapplication.

What can you do with this? Unzip the package, and run the included start script and you have a complete webserver running with your application. This is actually all you need to run many of the webapplications you make, and is production tested.

Why?It eases deployments and upgrades and makes you less dependent of the work queue at your hosting provider. The only thing they need to make sure of is that you have a JVM available.

This is a setup similar to that we use at work. I was however trying to use the same thing for a pet project I have at home, but ended up spending too much time on little stupid details that I should have remembered. So I decided to create a template for the next time around.

This is how I like to do it. Your mileage may wary. If you think the standard template should include anything else or be changed just let me know and I'll see what I can do about it.

How to useTo get a feel with what this is you can: Download zip and unpackage Run mvn clean install Go into the myserver/target/appassembler directory. Run bin\myapp Go to http://localhost:8080/mywar and it displays a hello world page

What just happened? Maven packaged your war and server into a zip in myserver/target The appassembler directoy is almost what is inside the zip You could have unpacked the zip in the target directory and seen the same behaviour

You can start adding stuff immediatley, but you should probably first: Search for mygroup and replace appropriately Search for myapp and replace appropriately That should be it. :)

How does it do this?The template consists of one parent project and two subprojects. The projects are a war and a server project.

The war project is a standard maven war project except for one ting: it is a "thin war" where no dependencies are included in the WEB-INF/lib directory of the war. The dependencies get included and handled by the server project.

The server project uses the maven appassembler and assembly plugin to package a zip of the project. Inside this zip is the war, any dependencies needed in a standard maven repo structure and a script to start a Jetty server with your application.

Why not an archetype?I couldn't figure out how to do it. :) Suggestions are welcome. From what I could gather it would be hard to create a multimodule Archetype.

See alsoJetty reload from maven repo

Tags

jetty maven template

In a Nutshell, jetty-server-maven-bootstrap...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Apache License 2.0
Permitted

Commercial Use

Modify

Distribute

Place Warranty

Sub-License

Private Use

Use Patent Claims

Forbidden

Hold Liable

Use Trademarks

Required

Include Copyright

State Changes

Include License

Include Notice

These details are provided for information only. No information here is legal advice and should not be used as such.

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    there are over 3,000 projects on the Open Hub with security vulnerabilities reported against them
  • ...
    search using multiple tags to find exactly what you need
  • ...
    use of OSS increased in 65% of companies in 2016
  • ...
    by exploring contributors within projects, you can view details on every commit they have made to that project

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis