Using as maven dependency
Adopting Fuchsia is a straightforward task if you are used to Maven. First we need to add the OW2 maven repository to our list of repositories (as below).
<project ... >
...
<repositories>
<repository>
<id>ow2-release</id>
<name>OW2-Release</name>
<url>http://repository.ow2.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>ow2-snapshot</id>
<name>OW2-Snapshot</name>
<url>http://repository.ow2.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
...
</project>
Now, we have to declare one or more Fuchsia module as a maven dependency of your project.
<dependency>
<groupId>org.ow2.chameleon.fuchsia</groupId>
<artifactId>org.ow2.chameleon.fuchsia.core</artifactId>
<version>0.0.1</version>
</dependency>
Here we reference the version 0.0.1 of Fuchsia, but of course you can update that version for the version you are willing to use.
Note
|
The catch
This method is quick and fast to integrate for compilation, although, depending on the importer adopted, it may require 3td party dependencies to be installed in your runtime platform manually. In order to not worry in finding all the dependencies for the importer adopted, you can use Fuchsia compilation profiles to gather all the dependencies needed according to your importers. |
Compiling a distribution
In order to generate a Fuchsia distribution there is only one mandatory profile the core, all the other modules are optional and can be included in the distribution by adding the appropriate maven profile ( mvn -P parameter ). The maven profile and its contents are specified right below.
-
core - This module contains all the basic Fuchsia types, fuchsia shell tool is installed automatically in this profile as well, even though its not part of the bundle core
-
discoveries
-
mdns - the implementation of dnssd/mdns discovery protocol
-
upnp
-
discovery-filebased
-
discovery-philips-hue
-
-
importers
-
exporter
-
exporter-jaw-ws
-
-
tools
-
grid
-
shell
-
Configuration profiles
Config profiles are the instantiation of the linker and the processor. Those two tend to be customized, since the filter adopted in the default instantiation of the linker might not be valid for for case
-
discoveries:
-
mdns-config
-
-
importers:
-
importer-cxf-config
-
mqtt-config
-
push-config
-
-
exporters:
-
exporter-cxf-config
-
Thus, in order to compile Fuchsia with the grid, exporter-jax-ws and mqtt, would be enough to:
-
go to the distribution directory
-
type mvn -Pcore,grid,exporter-jax-ws,mqtt
After the compilation process is finished, your Fuchsia distribution is ready to use:
-
go to the distribution/target/chameleon-distribution/
-
type ./chameleon.sh --interactive (or the apropriate script according to your OS)