With Karaf 3 I can deploy wab project and war project.
I have made a no OSGi web project . I want to deploy that on Karaf 3. How to do it ?
Using netbeans , I have made a war file from my web project and I have install on Karaf 3 the .war project using that : bundle:install -s file:/path/myproject.war
I have no error for the install.
But I can't see that working when I go to http://localhost:8181/myproject .
Then Why that don't work? What is the problem ?
Thank you for your advice and help,
You might need to install the war feature first
feature:install war
Install the war feature first, with feature:install war as Christian already mentioned.
Though for a no-osgi war you'll need to install it with the webbundle prefix.
bundle:install webbundle:file:/path/myproject.war?WebContext-Path=myproject
Pax Web will create a OSGi war from it on the fly and this will be installed.
Related
Recently, I have been working on Apache Karaf project.
The first one is a CXF REST service example and the second one is an Apache Karaf Maven example to run and deploy a Karaf container.
What I would like to do is to combine these two. The idea is to download a couple of JAR files from a repository and then package them into a Karaf.
Building Karaf Assembly manually then deploying the created JAR files in my deploy folder under Karaf is not a good idea if the task is reccurent each day. I would very much like to automate this if possible?
To achieve automatic deploy of Java project in Karaf, follow these steps:
Create a feature project: It is a Maven project and its goal is to create a descriptor of JAR (bundles) to be deployed under Karaf. The packaging of this Maven project is feature.
For your project of Karaf Assembly, add your feature as dependency and add it as boot feature so it can be installed when Karaf is up.
Look at this project https://github.com/benson-basis/karaf-feature-version-tc.
It has all the necessary configuration to automate Karaf building and deploy.
I have an osgi bundle which was deployed in apache karaf using the feature.xml and service injection is done using blueprint.xml. How to deploy the same bundle in Weblogic OSGI container.
https://docs.oracle.com/middleware/1212/wls/WLPRG/osgi.htm#WLPRG764
I followed the steps mentioned in the above link. Copied the OSGI jar in the WL_HOME/server/osgi-lib location and restarted the server, but was not able to start it. Am i missing some thing?
Note:- I was able to deploy a simple OSGI jar without any dependencies by copying the jar in the osgi-lib folder.
You need to install the Aries blueprint bundles.
We have our own karaf based application and recently we decided to migrate our web console on hawtio as a plugin. Is there any possibility to append hawtio to our project as an OSGI bundle? i've downloaded hawtio project, but there is no maven module with packaging mode "bundle" or something like that. As an option of course we can get kar archive file, extract it and use its bundles. But that's not a native way at all. Thank you!
Hello have you try to use the latest Hawtio for karaf (hawtio-karaf) available on maven repository?
http://search.maven.org/#artifactdetails|io.hawt|hawtio-karaf|1.4.26|jar
It provide a features.xml that can be install on Karaf.
First: install everything on your local maven repo.
Second: launch your karaf.
Third: run the command: feature:repo-add mvn:io.hawt/hawtio-karaf/1.4.26/xml/features
Fourth: run the command: feature:install hawtio
According to the official website, the default URL is: http://localhost:8181/hawtio/
Let me know if it is working as you were expecting.
There is no clean solution for standalone unit testing, but apache karaf provides exam environment for such situations - http://karaf.apache.org/manual/latest/developers-guide/writing-tests.html
So we can run tests with our application and hawtio in dev mode.
On production this leak of functionality is absent.
I followed this tutorial http://www.mastertheboss.com/jboss-maven/jboss-maven-example-building-a-java-ee-6-application/ in order to have a simple web application to better understand Java EE and JBOSS. I set up the example project (by archetype) and compiled it.
However, I am stuck after running mvn compile. I want to deploy my application as a war file to my JBOSS webroot directory (in my case /usr/share/jboss-as/standalone/deployments/).
I think mvn package and mvn install must be executed. Where can I specify that I want a war file and that it should be copied to my deployment location on JBOSS?
Obviously, I can use the jboss maven plugin http://docs.jboss.org/jbossas/7/plugins/maven/latest/, which is addressed via console
jboss-as:deploy
Configuration is read from the POM file.
I am working on to reach a solution to deploy a web application as a bundle to Virgo 3.0.1.RELEASE. My scenario is:
I use Maven Bundle Plugin to generate the manifest.
I exclude all the JAR dependencies using Maven WAR plugin.
I need to command Virgo to host the plain Maven JAR artifacts in the local repository. As an instance Apache Karaf along with PAX can provide plain JAR files as OSGi bundles.
So,
Any ideas on how to configure Virgo for to host Maven repository plain JARs?
Generally, in your experience, what is the best solution to use a ready Maven repository and host it as an OBR?
Thanks in advance.
The best solution I've found so far is actually using Wrap Deployer on Apache Karaf.
Basically stick with Karaf, since it provides all you need :)
With Karaf and the features you don't really need a OBR, since the features service does a pretty good job of resolving already deployed bundles and won't install those again. You need to add the OBR flag to your features file though.