Reputation: 196
Hallo,
I have a more specific question about deploying a Java-application.
I have created a Java application, it is a WAR file and can be installed on any Java application server. This works perfect. Now for users who do not have Java experience I want to package somehow my application together with the application server and distribute it as a stand-alone version.
Question 1: Is this possible? Question 2: Which application server would be best for this? Question 3: Where should I start to learn how to do this?
Do you have any experience you can share with me.
Thanks.
Upvotes: 1
Views: 1823
Reputation: 570295
Maven has a neat plugin (the jetty-console-maven-plugin
) that allows to create an "executable" war (it creates a single artifact that embeds a Jetty servlet container). It's incredibely easy to use, check it out.
Upvotes: 1
Reputation: 4860
I have two suggestions for you
I prefer the first option as this uses tomcat.
Upvotes: 3
Reputation: 75346
Have a look at the Winstone servlet container which has what you want as a supported use case.
This is how the Hudson continuous integration server runs standalone.
Upvotes: 2
Reputation: 1833
It depends on your application. Do you have EJBs? If not, let's go for Tomcat which is lighter and will make the job. If yes you need JBoss to run them properly.
Then you can ZIP the whole server with your War included and this should work.
Upvotes: 2
Reputation: 116256
With JBoss at least, the trivial way of zipping the whole server once your app is deployed should work fine. Since JBoss includes Tomcat, I guess it should work with Tomcat as well.
To make it easier for users to start the server, you could provide a custom runMyServer.bat
(or .sh
) to execute run.bat -c MyServer -b 127.0.0.1
(substituting the desired IP address of course :-).
Upvotes: 1