Habin
Habin

Reputation: 802

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 -

  1. How and where to give server URL, user name and password for the deployment ?
  2. Does project gets deployed to fabric or karaf ?

Will appreciate if anybody can help with some pointers.

Thanks in advance.

Upvotes: 0

Views: 429

Answers (2)

Alessandro Da Rugna
Alessandro Da Rugna

Reputation: 4695

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.

Upvotes: 1

lhein
lhein

Reputation: 217

Is that server running locally or remote?

  1. Locally you can simply define the server in the servers view and then use Add context menu to deploy your project.

  2. it gets deployed to Karaf

Upvotes: 1

Related Questions