Automating with Ant on a server - java

I have a ant file on the server-side, and from the client-side I need to execute it on the server, how can this be done?

SSH should work on any Unix system:
ssh gooner#host.example.com ant -f /home/gooner/build.xml
Do not use RSH - it's obsolete, and it's been replaced with the more secure SSH.

You could execute the ANT build script and targets from a servlet.
This article explains how: http://onjava.com/pub/a/onjava/2002/07/24/antauto.html?page=1

Perhaps overkill for your situation, but you might want to look at Hudson. It is a Java build server with a web interface. It is relatively easy to set up and configure projects, though you will need to run a servlet container on your server (such as Apache Tomcat).

Related

WAS thin client deploy

Currently, I use WAS for deploying the java builds on a remote server. I need to remove whole big WAS server since I dont host any application as it is just for deployment using wsadmin.
I just want to retain the WAS libraries which may require for deployment remove everything else.
Is it possible to deploy with WAS but using only needed libraries?
If yes, what could be the procedure to do that?
Thanks
One such solution is described in Using the latest Jython with a WebSphere Application Server wsadmin thin client.
Another one is WDR.

What is the easiest way deploy java web aplication to remote tomcat

I'm new to use Tomcat and often need to update project but I know only manually update war file on server. This is takes to much time. How can i use more effectively. I want to use git or add my remote server on eclipse.
You should try to automate such steps. The manager-application from tomcat could be controlled by scripts. So using the manager application with some sort of script (bash, REST, ANT) would by my choice.
Take a look at:
https://tomcat.apache.org/tomcat-9.0-doc/index.html
https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html
Tomcat manager remote deploy script

Running portable web services application server

I need portable container for running web services as server. JSON as a response. The server application must be able to start up using .bat script under Windows. Machine running the server must have only Java Runtime Enviroment installed, no other stuff required.
Axis2 on top of Tomcat do not seem like simple portable web server. What are the other alternatives?
UPDATE:
How come no one offered?
com.sun.net.httpserver.HttpServer;
and
com.sun.jersey.api.container.httpserver.HttpServerFactory;
Jetty is a good option.
Another very lightweight option is fluent-http.
I'm not that familiar with Axis2, but as far as I know you can use embedded tomcat to achieve this with whichever frameworks you please.
Take a look at the tomcat maven plugin which I believe will even generate your application as a jar containing embedded tomcat in the latest version.

Running netty application in Amazon Elasticbeanstalk

I have a regular netty application server that runs on port 44080 and is built as a .jar file. I would like to use elastic beanstalk to manage the lifecycle of the application. Is there a way I can deploy the jar or something similar using elastic beanstalk?
It seems netty is currently not supported by elastic beanstalk. If your application can also run on Tomcat, you could do that - with Tomcat, you just need to enter some basic settings in the webinterface and you´ll get a fully working environment where you can upload jar files to.
If you need netty as a platform, you could try using Amazon OpsWorks. I never worked with it myself, but I know you can create your own "environment configurations" there. You´d basically create a few scripts to setup your server and deploy your application and OpsWorks lets you execute those through the web ui and also provides capabilites for auto-scaling, failover, etc. in OpsWorks environments.
There's nothing wrong about using Netty. In fact, one of our archetypes for AWS Elastic Beanstalk contains support for Dropwizard (by using Docker as its stack), thus not being dependent on a Java Web Container.
$ mvn archetype:generate -Dfilter=elasticbeanstalk-docker-dropwizard
It might need a few tweaks, but the overall idea is to package all your dependencies into a zip file and deploy it. Also, make sure your Dockerfile EXPOSEs port 44080.

Invoke fuse esb automatically

I need to write an automated script which will call fuse esb and then it should call osgi:install command to deploy a bundle.. what is the best possible way? Any input/pointers highly appreciated. Thanks.
You can use SSH or the Karaf client to execute a script that installs a bundle etc. See some details here: http://karaf.apache.org/manual/latest-2.3.x/users-guide/remote-console.html

Categories

Resources