Create an executable jar for SBT scalatra webapp using Jetty [duplicate] - jetty

This question already has answers here:
Standalone deployment of Scalatra servlet
(3 answers)
Closed 8 years ago.
I wrote a small scalatra webapp using SBT. Webapp has default jetty plugin configured. Now i want to create an executable jar from that scalatra webapp which should run by simply executing the jar. I am trying to bundle the jar with assembly plugin and create jar But couldn't make it working.
Can someone suggest me how could i solve this problem.

Link suggested by #RobinGreen answers my question.
URL : Standalone deployment of Scalatra servlet
You will also get more details at below links : scalatra.org/guides/deployment/standalone.html
For project structure reference, check here : scalatra.org/getting-started/project-structure.html

Related

Amazon AWS throwing 403 Forbidden after deploying django from different system [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have used Ubuntu 14.04 and python 3.4 as development machine for Django.
The deployment to Amazon AWS was successful using eb deploy and website running without problem.
Somehow later I need to change my system and used another laptop for deployment. I copied my Virtualenv django project folder and pasted into my new system with same configuration. But now when I deploying using eb deploy with same security access id in AWS, it deployed succesfully but when accessing the website I am getting error as
Forbidden - You don't have permission to access / on this server.
But When I again deploy from old system it works but from new it doesn't.
I did following steps and it worked from my new machine.
1. I used mysql-devel package which is for MySQL to work on AWS with django using RDS. This was configured in django.config file. I removed this configuration from it.
2. I removed .elasticbeanstalk folder.
3. Then finally ran commands : python manage.py collectstatic & python manage.py migrate
4. Then used "eb deploy". The site was successfully deployed and running.
5. Then I again put mysql-devel package in django.config file and deploy it.

Developing in Adobe CQ5 with jetty?

We use maven to deploy the code changes to cq interner server / CRX Lite and the problem here is that it takes long time where the changes itself is often only one line code.
Has somebody experience with CQ5 with jetty and can give me a good Guide?
am not sure i understand the relationship with jetty (which ships as servlet container of latter versions of AEM/CQ5), but will answer to the code deployment part:
deploying a full content package (full content) should be done using
maven-content-package plugin for smaller deployments of content,
when you can't use integrated dev environments like sling eclipse dev
tools, i'd suggest you use the excellent repo command that basically zips the current folder and deploy it. I'm using it as an external tool command of intellij and it's really fast.
finally, if the deployment you're referring to is osgi deployment, maven sling plugin can help you with that (will still compile/package the whole osgi bundle though)

How to deploy the Web service in to tomcat 7 from out side of eclipse juno?

i am very new to web services and i have one problem please suggest me .. i.e i have a WSDL(SOAP) file and with that i created the Web Service-server and web service-Client using Top-Down approach with JAX-WS in eclipse Juno Java EE. i integrated the Tomcat 7 with that Eclipse and from eclipse its working fine.
But my problem is i need to run the Tomcat from out side of the eclipse and i need to deploy the web service in to the tomcat. i don't want to run the Tomcat using eclipse? i just need to run the client from eclipse but i dont want to run the tomcat from eclipse. Please Help me.
File -> Export -> Web -> War (configure where to create it)
Deploying a tomcat application consist of building a war file then deploying it. We call this servlet.
Building the WAR
As you already have your server code, you should now complet the WEB-INF/web.xml file. This file describe the path of your servlet(your server code), on the tomcat server. Depending of your framework you can have some configuration to add in your META-INF/context.xml file.
In an eclipse project, thoses file are generaly under a directory name 'webapp' in your project. (src/main/webapp for a maven project).
First you must use the javaee & javaweb tools of eclipse to build a war file that contains all yours libs, files, class and web.xml
Alternativly you can use a maven build process to get a war, if you use maven.
Deploying the war
After installing tomcat, the deployement is as simple as drop the .war file is deploy directory of the home-directory of tomcat. Then your application is usable on default port 8080.
If you have install also the manager webapp of tomcat, you can see all yours currently deployed application in the manager http://myurl:8080/manager/html.
When you install tomcat, let be sure that your eclipse pseudo server is shutdown, or your tomcat server will have problem to get it's port and startup.

deploying scalatra onto Jetty

How does one deploy scala or scalatra onto Jetty servlet container? Does anyone have experience or can point me to some resources online?
If you're using sbt, run the package command from within the sbt shell. This will create you a war file in the target dir. You can drop that into jetty's webapps directory and configure a context xml file in its contexts directory.
If you're using maven, I believe the command you want is mvn package.
Are you using Simple Build Tool (SBT) for your project? If you do, it's as easy as running "sbt jetty"
Check it out: http://code.google.com/p/simple-build-tool/

Why 2 versions of Jetty Maven plugins?

I set up a new webapp Maven project and wanted to test it with Jetty's Maven plugin.
So I issued the console command: mvn jetty:run
After defining the pluginGroup in Maven's settings file I ran once again the command.
Unfortunately, it failed because I was using one of the below mentioned versions of the plugin:
maven-jetty-plugin
jetty-maven-plugin
Why are there 2 Maven based plugins for achieving the same thing - running Jetty? Why do they have to bring so much confusion?
Or be so kind as to explain me the differences between them.
With Jetty7 this plugin was renamed to jetty-maven-plugin to better conform to maven2 convention. The Jetty 7 version of the plugin has also undergone substantial changes in configuration. For more information, see the Jetty 7 Maven Plugin feature guide.
See the docs here
The maven-jetty-plugin is for Jetty 6 and jetty-maven-plugin is for Jetty7 and later. The name change was made to "adhere with maven plugin naming conventions" and is part of the big mess created by the move of Jetty to the Eclipse Foundation. Actually, Jetty 7 is considered as a transition version (this must be the politically correct expression for big mess).