A sample multimodule Maven Project that can be used as a quickstart to setup a development project based on JBoss Fuse.
The project is divided in 2 main sections:
- Modules
- CI
Modules is where you place your custom code, in form of maven modules. The only requirements that you have is that those module are OSGi compatible, to deploy correctly on Fuse.
Attached to this project you find 2 dummy Camel based modules, there just to allow you to track back references to them in he other part of the quickstart.
CI is a collection of modules and plain scripts that automate the provisioning and release of you project.
It's divided in:
- config
- deploy_scripts
- features
- karaf_scripts
- offline_maven_repo
In config you put all the properties that you'd like to keep independent from the Maven build job.
In the base example we have just a single .properties
file that we use to override values that are defined also in the Maven job.
We use this mechanism to allow a hook to override values directly at the filesystem level. In our implementation the script that contains the default Karaf constants values is automatically loading the script specified with the Maven variable overridden.properties.path
and loading it, it will have the capability to override default values.
In this section you will find example bash
scripts that show you how to trigger the process end to end.
In this Maven project you define your features files. Features files are Karaf unit of deployment and are a convenient way to organize you bundle and your configuration. Each time you add a new Maven module to your project, your probably want to add a correspondent xml node in your features files, with the description of the components that you want to logically group.
In this Maven project we put most of the Karaf interaction commands, in form of .karaf
scripts.
In these scripts you may specify the container that you want to create, the fabric profiles, their specific configuration and you also define which of your defined features you want to deploy to which specific Fabric profiles.
You may invoke these scripts from withing Karaf shell with their absolute file system path or via their Maven coordinates. You will find examples of usage inside the deploy_scripts
In this Maven project you will find the configuration needed to produce a .zip
archive containing all the Maven artifacts that your project will require. In this way, you will be able to deploy your project without the requirement of having internet connectivity or access to a Nexus Maven repository.
The way to define which artifacts you want to pack is to define the correspondent features that you want to include.
mvn clean install -DskipTests -Dmaven.test.skip
Study the scripts inside ci/deploy_scripts