Do not wait for full WAR deployment - maven

I am new one in jenkins, linux and tomcat so i need your advice.
Is that possible to configure tomcat in way, not to wait for full WAR deployment?
E.x. new WAR file deployed to webapps/ and started to deploy automatically, so Jenkins waits for full app WAR deployment.
I just need to let Jenkins know, that app started to deploy and do not wait until it fully deploys.
Thanks!

Related

How to redeploy WAR inside a JBoss WildFly container?

I am trying to make my local Java development environment more lighter.
Dockerfile multi-stage steps looks like this:
MAVEN CONTAINER
build app from source code
WILDFLY CONTAINER
prepare server (data sources, drivers)
copy WAR from MAVEN
start server and deploy application
This usually takes about 1-3 minutes, even with dependencies-offline-mode.
After making some code changes I have two options - build new image (1-3 minutes) or manually build WAR and redeploy app from WildFly Administration Panel. Is there any tool to automate this?
Maybe this basic approach will be enough:
0. start local env as always
1. make some code changes
2. build WAR in MAVEN conotainer
3. copy WAR into WILDFLY container
4. enter WILDFLY container bash and redeploy using JBOSS-CLI
Are you using some Maven plugins? Bash scripts? Thank you for hints!

Deploying on JBoss EAP 6 using Jenkins and Maven Deploy plugin

I am setting up a CI environment to build and deploy java projects to a remote server using mvn jboss-as:deploy goal.
Couple of questions
1. Do i need to do anything specific on jboss standalone.xml to enable hot deployment. For example
auto-deploy:exploded option needs to be enabled?
Presently the deployment is manual process: copying the war to deploy folder and then touch the ar file. Do I need to remove the old wars under deploy folder for remote hot deployment to work successfully?
Once hot deployment is performed using jenkins, if a server restart is performed, older version of the war is getting deployed. Any clue on this?
Please help.
I figured out the issue. Since previously the war was deployed manually, I had to remove the war files from Standalone/deployments folder. On a server restart the war under this folder would be deployed causing older version of the application to show up.

Weblogic Maven Plugin Deployment Issue

I'm using eclipse Kepler, Weblogic 10.3.5 and Maven 3.0.5 with the Weblogic-Maven-Plugin. When I deploy my application using eclipse Run As...Run On Server, this is what I get:
When I deploy this way, you see the application on the Weblogic Server and I'm able to reach my application through my localhost link.
When I use the Weblogic-Maven-Plugin, this is what I get:
You see the application has been placed under the adminServer and I get an error when I try to reach the application through my localhost link (Yes, I even ran the start-app command).
I have few questions:
Why is it that when I use the weblogic-maven-plugin, it deploys under the adminServer?
Is there a way to have the weblogic-maven-plugin deploy in a similar fashion as the Run As option in eclipse?
Why can I not reach the application with my localhost link after deploying with the plugin?
Any help is greatly appreciated.
I face this problem some weeks ago but in another environment Jdeveloper 12c with Maven and OJMake and OJDeploy.
The deployment is the last step on your way to run our application on WLS(WebLogic Server)
How do i solve the issue?
I create an Maven Ear projet
I create also Maven War project
I add the war project in the ear project also dependency and later also web_module
My deploy(to WLS) Configuration is in the pom from Ear project.
I you use run as from Eclipse or Jdeveloper there is a complex mechanism which do the work for us. If we want maven to do the job for us, then we must tell him what to do. We must also know what type of archive file we suppose to send/deploy to WLS

Deploy to weblogic using maven and jenkins

We are using Jenkins in our project for build and deployment on dev environments. I have sucessfullly created a war file using maven in jenkins and now I have to create another job to deploy that war file into the weblogic server.
However, I am not aware of the required steps for configuring this job in jenkins. Will it be a matter of just invoking a maven deploy command? Can some one please tell me what will be the required steps to deploy a war file into weblogic 10.3.5 using jenkins?
edit : The approach we are following is after creating the war file we are cheking the war file created into svn and then the deploy job will take the war file from there and deploy it into the weblogic. Does some one thing there is a better way of doing thhings than this?
Thanks,
Manish
Use the Jenkins "Weblogic Deployer Plugin". This will do the deployment for you. All you need to do is specify:
Task Name: Give the deployment a name; Eg. Webapp WL Deployment
Environment: Specify the environment you are deploying to. Make sure you are using the AdminServer port number and not the Managed Server port number; default is 7001
Name: The name weblogic should use for your webapp to display the deployed component
Built resource to deploy: The file name of your webapp. You can use also use regular expressions for this
Targets: The name of the managed server you want to deploy the webapp to
Weblogic libraries: Whether or not the webapp should be deployed as a library component.

Maven Jetty Run from Jar

Here is want I want to do. I created a maven project and configured the jetty plugin for it in eclipse...
So from Eclipse if I do run and set the maven goal there to be jetty:run it runs my project in jetty on the port specified in web.xml. Now I want to build the jar file and when I do java -jar myapp.jar it will automatically call jetty:run.
How can I do this?
If you want to package your application so that you can hand it to someone and have them run it as a standalone application without having to go through deploying a war file into a web container, then that is a different concern from doing mvn jetty:run at development time, I will call that deployment time to avoid any confusion
At deployment time, we can't assume there will be maven on the machine, thus no mvn jetty:run, and even if there was, this would not work, unless we deliver the source code to run the build as in the development environment!
A standalone web application can be packaged by bundling the jetty jars in the application war along with a Main class to start jetty programmatically, and get it to run the application war. This relies on the fact that the file and directory structure of the WAR and JAR are different, and thus there is no significant overlap between the two, which is what makes this workaround possible, and it also leaves the option of deploying the war file in a web container possible
There is a maven plugin that embeds winstone which is another lightweight servlet container
For jetty, you may start by reading Embedded Jetty 7 webapp executable with Maven

Resources