Vert.x deployment on aws (best practice) - deployment

I'm beginner in web development. I used Vert.x framework. And I got app.jar file for the server on aws. Every time I run it with this command:
java -jar app.jar
But I'm not sure, that is right way (I think it's nonprofessional). Who Can tell, what is best practice? I heard that, most of apps are deployed on web application containers, such as Tomcat, JBoss, Jetty etc. Please, show me right way.

Disclaimer: I am a member of the Vert.x core team.
It is not more professional to deploy a webapp in a container environment than running it directly with an executable JAR.
Actually, the opposite movement can be observed: SpringBoot and Wildfly-Swarm are tools to let you run Spring and JavaEE applications as an executable JAR.
So the real question is: does the tool do the job for you?

Related

Is it possible to deploy akka-http to JBoss?

We are developing an akka-http application. Our infrastructure team requires us to deploy it to JBoss. Is it possible, if yes, how?
I found a plugin called xsbt-web-plugin, it converts a sbt application to a war file. That's all I have so far.

How do i deploy my wicket project?

i am new to web development and i created a wicket app on my local computer. i have a server running apache 2.0, maven and open jdk. Its an ubuntu server with only command line.
Any help would be wonderful.
Thank you
You cannot run the wicket app by itself; like any java servlet it has to be run on a servlet container.
There are many containers to choose from, the ones I most commonly come across are
Tomcat
GlassFish
Jetty
You need to install one of containers like that to convert the HTTP requests into java. Once you have one of them installed and running, you can deploy your wicket web-app in it.

WebLogic and OSGi

Is there a way to run an OSGi container in the Weblogic Application Server? I know that it works with JBoss, Glassfish and there are possibilities to add an Equinox servlet bridge to your OSGi project (implementation of the bridge is too old). But I want something similar to JBoss/Glassfish functionality where it is very easy to deploy your OSGi environment, because there are already OSGi implementations. Most of the articels I found were very old and there are no more recent ones. Can someone help with hints or better some links?
Maybe Bnd could create a .war file for me, but how can I achieve it. I read there is a possibility. Example would be great!
EDIT
Just for those who still look into that case. Since version 12.1.2 Weblogic supports OSGi out-of-the-box.
I'd consider the Apache Felix Http bridge. It worked a lot better for me than the ancient Equinox bridge (I messed around with it for a while, but never got it to work well), after I switched to Felix I got something working pretty quickly.
If I understand you correctly, you want to make a 'plain' war file, that can be deployed in any Java EE server. If that's the case, there is nothing OSGi about your war file, so I don't think Bnd will do anything for you.
WebLogic now supports OSGi in version 12.1.2 . See this

How to create stand-alone lift web application?

How to make a standalone lift application? Which tools/libraries to use? How does the performance compare to using lift application as a war in some application server?
With onejar maven plugin http://onejar-maven-plugin.googlecode.com/svn/mavensite/usage.html and maven I could package jetty and project with dependencies inside one jar.
The part of the question on performance doesn't really fit with the rest. You are primarily asking how to package the Lift application as a single JAR/WAR. This doesn't have anything to do with the runtime.
At runtime you will still be running inside a Servlet container (could be Jetty, Tomcat or a full-blown Java EE server). How you package your application won't affect the performance.
You could take a look at Hudson (a great Continuous Integration Server) to see how they deliver as a single WAR file that contains an embedded Servlet container. You can download the WAR file and run it from the command line: java -jar hudson.war
I know this is an old question, but...
If you are using sbt, I wrote a plugin to produce 'executable' wars like those mentioned above.
https://github.com/glenford/sbt-jetty-embed

Maven build deployment

I have to manually deploy my servlet war packages on an Apache tomcat instance running on an AWS (Amazon Web Services) machine (remote server).
Also i have Maven setup for dependency management and build packaging in local development environment.
What I want is to setup my maven install/deploy task such that my packaged war files are deployed and configured(i.e executing specific shell scripts) on the remote server automatically.
Is it possible ?
If yes!!
How can it be done? (Please suggest relevant references.)
Thanks in advance
Ashish
Yes it is possible, you can use the cargo plugin to deploy to a server. See the Getting Started page for some examples.
If your scripts aren't catered for by the plugin, perhaps you could post some more details to see what options there are to address them.
If you are talking about Amazon's Elastic Computing Cloud (EC2), maybe you could check out cloudtools and its maven plugin (see the announcement on Chris Richardson's blog). Never tested myself though.
+1 for cargo plugin, I was not aware of that but could use it myself.
In case it helps you or someone else, you can run any script upon launch of an instance. This blog describes how.