Maven hard-deploy in JBOSS 7 - maven

Previousally we where using JBOSS 5 and the codehaus plugin (http://mojo.codehaus.org/jboss-maven-plugin) to deploy war to JBOSS. We where using the jboss:hard-depoly maven goal. This goal could be executed even if my JBOSS server was not up
Recently we moved to JBOSS 7, and started using the plugin (http://docs.jboss.org/jbossas/7/plugins/maven/latest/) . we are now using the goal jboss-as:deploy goal. This plugin does not support hard-deploy and jboss must be started to run this goal.
Is there a specfic reason to not support the hard-deploy goal?Simply copying the war file to deployements directory in JBOSS 7 still works and why this goal is not included?

jboss-as plugin uses JBoss Management api to do everything it does. If Jboss AS7 is not up, there will of course be no JBoss Management endpoint handling requests. Having such hard-deploy would imply totally different approach - one would have to define JBoss home and parse its configuration offline. Since this is not in general supported by the plugin, I'd imagine that is the reason hard-deploy goal is not supported as well.

Related

Where to install JDBC driver for Vaadin app run from IntelliJ using bundled Jetty servlet container?

I will ultimately be deploying my Vaadin web app to Tomcat servlet container.
In Tomcat, JDBC drivers generally need to be stored outside of the web app, in a separate Tomcat folder. So I do not want to add any JDBC driver as a dependency within my Maven build settings.
In the meantime, while developing I am running the Vaadin 8 or 8.1 web app (created from the vaadin-archetype-application Maven archetype) from within IntelliJ 2017.1 using the Jetty servlet container that is somewhere mysteriously bundled (“embedded”?) within the project.
Where can I store my JDBC driver jar file(s) while developing with IntelliJ-Jetty combo?
This depends on wether you use Tomcat or Jetty as an "old fashioned" appserver, or if you use it as an embedded component in your application. The archetype you have used probably assumes the latter (adds jetty-plugin to pom), while it sounds like you want the first scenario. In that case, just install the driver in the tomcat or jetty instance you want to use, and create a run configuration in IntelliJ for that instance. If you need the driver compile-time, add it to the pom with scope "provided". If you want to just have it available to the jetty-plugin, add it as a dependency for that plugin (inside the plugin definition).
See this related question for more info about including dependencies only for embedded jetty.

Deploy multiple Spring Boot modules with Maven

I have created two separate maven modules (let's call them MODULE1 and MODULE2) which are submodules of a third integration module (SUPERMODULE).
MODULE1 and MODULE2 are both Spring Boot Web Applications. What I'm trying to achieve is to start (not build) both projects / web apps by means of SUPERMODULE.
As I see it, there are two options:
Deploy them both to the same tomcat server (probably the better & more interesting solution)
Deploy them to different tomcat servers with different ports
I found no viable example to achieve either one of these options (... by means of a single maven integration project). Hence, I would be glad if someone could point me into the right direction - or are both possibilities bad practice?
You said :
Deploy them both to the same tomcat server
(1) Build automation software
Any Build Automation tool (Jenkins, bamboo...) would allow you to create a job that deploys both your wars to tomcat (the same server or different server, you can setup your job as you wish).
Do you use an automation software ? I believe that would be the best the solution / best practices.
(2) Build an EAR - Deploy to Tomee
You said:
What I'm trying to achieve is to start (not build) both projects / web
apps by means of SUPERMODULE.
What you are really describing is an EAR!
I'll describe the idea, however, it seems Spring boot does not play well with EAR: Spring Boot EAR Packaging and https://github.com/purple52/spring-boot-ear-skinny-war
Since your 2 submodules are spring boot app, you could:
build the submodules as WAR
have your Supermodule build an EAR
include both WARs in the EAR (maven dependencies)
this however implies that you use (for instance) Tomee instead of tomcat (is that an option for you?).
as mentioned above, after some research it seems a spring-boot war does not work when packaged inside an EAR. The SpringServletContainerInitializer isn't called. So this would not be an option at the moment.

How to deploy fuse project in server?

I create one fuse project using Jboss developer studio with apache camel spring context..
Currently I am running my project in local machine in internal Jboss-eap of Jboss developer studio. Now i want to deploy my project in application server or container.
Please give me answer of below question :
1) What should i use : fabric8 or osgi?
2) What are the dependency need to add in pom.xml for deployment?
3) I have jboss-fuse-6.1.0.redhat-379 , as per my understanding it is container. For deploy my project in server should i required any application server like jboss-eap?
4) As i am using maven for dependency, should i need to copy my maven local repository to server?
I suggest to read the JBoss Fuse 6.1 documentation - there is a deploying into the container guide
https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.1/html/Deploying_into_the_Container/
As you have JBoss Fuse then its a container by itself, so you do not need JBoss EAP - its two different containers.
You can deploy from the Eclipse editor if you have the Fuse plugins installed (I think they are named integration stack). You can read how to install those plugins at the installation section from this page: http://tools.jboss.org/blog/

Replacing/deploying only the changes in the already depolyed ear in Jboss 7

I am deploying the ear file each time when i making a changes as my project is multi-module and it is really tedious to upload/deployed the entire ear again in Jboss 7.Is there any way to replace only the changed jar/war/files in the already deployed ear in jboss without deploying the entire ear file again.
Thanks.
You should consider using JRebel - it allows reloading changes. After you compile any class it will automaticaly reload it, supporting modern frameworks (like reloading spring beans, etc) and application servers (JBoss included). It works as a java agent. You will find more details on producent site: http://zeroturnaround.com/software/jrebel/features/
To introduce JRebel in Maven project you just need to add jrebel-maven-plugin

deploy Apache ServiceMix 4 application into JBoss Application Server 7

I have an standalone Apache ServiceMix 4.4 application, it works nicely. Now, I want to deploy this application inside a JBoss Application Server 7. I use Maven as project and dependency management tool.
My objective is deploying the application not touching any line of code, only maven POM files. I can add new dependencies, change some versions (minor) and use different tools. I want, as a second objective, integrate all the Apache CXF DOSGi container features into JBoss AS ones seamlessly.
I think it is possible, but I found information for old releases of JBoss and ServiceMix or incomplete guides like this.
Can someone provide more information about that?
EDIT
I have found some issues in JBoss issue tracker:
Initial runtime support for Karaf based products
And some JBoss forum topics:
Migrating osgi bundles running in Karaf to JBoss 7 as OSGI container
I forgot to mention that my application is using Apache Karaf OSGi runtime.
Well Servicemix is "pre-"setup of a Container (Apache Karaf) and lot's of other Apache Projects like ActiveMq and Camel plus some ServiceMix specialties. So why would you want to deploy this setup in another Container?
If you want to do something like this, try to deploy std. Apache Camel, ActiveMQ and CXF and your own app in JBoss.

Resources