Deploying on JBoss EAP 6 using Jenkins and Maven Deploy plugin - maven

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.

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!

Where does maven wildfly plugin deposit its deployed WARs?

I have been deploying mvn wildfly:deploy successfully for a few days, and I always imagined that deployment would place my foo.war in the standalone deployments folder, but all I can find are some foo.war empty directories in deployments/tmp.
Where is maven sticking the deployed files?
Is mvn wildfly:deploy suitable for production use?
The wildfly-maven-plugin uses management operations to deploy the archive created by Maven. It does not move the file itself as that would not work for remote deployments. Where the deployment content is stored is up to the application server itself.
The $JBOSS_HOME/standalone/deployments directory is used by the deployment-scanner to deploy applications copied there. See the documentation on the deployment scanner for more details.

Deployment in Jboss fuse using Maven

I have created a Fuse integration project in developer studio 9.0.2 and I'm using jboss-fuse-karaf-6.3.0 as the runtime container.
I want to deploy this project using Maven, but not able to figure out -
How and where to give server URL, user name and password for the deployment ?
Does project gets deployed to fabric or karaf ?
Will appreciate if anybody can help with some pointers.
Thanks in advance.
Is that server running locally or remote?
Locally you can simply define the server in the servers view and then use Add context menu to deploy your project.
it gets deployed to Karaf
When building projects with Maven I use osgi:install and dev:watch commands (available in both JBoss Fuse and vanilla Karaf). The following setup works well for a development machine.
First build with Maven using install goal, so the artifact gets installed in local repository.
Then issue osgi:install (see Manual Deployment in JBoss Fuse docs) command in your container to install your bundle. Job done!
> osgi:install mvn:it.your.package/your-artifact/1.0.0
Once the bundle is installed you will see a message like
Bundle ID: 352
This is the ID of the bundle installed. Issue the following command:
> dev:watch 352
Watched URLs/IDs:
352
Now every time you rebuild with Maven, the bundle gets redeployed automatically.
Watch out some settings to be changed if dev:watch does not reload bundles on JBoss Fuse 6.3.0
edit: use -SNAPSHOT in your version with this setup. Regular versionsmay not redeploy correctly because the container sees the version is the same and may use previously loaded classes, thus causing classloading issues.

Do not wait for full WAR deployment

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!

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

Resources