https://github.com/forge/furnace
Lightweight Modular Service Container - Based on existing JBoss Modules, Maven, and CDI Standard Technologies.
https://github.com/forge/furnace
Last synced: 8 months ago
JSON representation
Lightweight Modular Service Container - Based on existing JBoss Modules, Maven, and CDI Standard Technologies.
- Host: GitHub
- URL: https://github.com/forge/furnace
- Owner: forge
- License: epl-1.0
- Created: 2013-05-15T18:26:15.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2023-03-20T10:59:22.000Z (almost 3 years ago)
- Last Synced: 2025-04-13T10:59:20.951Z (11 months ago)
- Language: Java
- Homepage: https://forge.jboss.org
- Size: 2.93 MB
- Stars: 33
- Watchers: 7
- Forks: 27
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Furnace
=======
Lightweight Modular Service Container - Based on JBoss Modules and Maven. It's easier than OSGi :)
[](https://travis-ci.org/forge/furnace)
[](https://www.eclipse.org/legal/epl-v10.html)
[](https://maven-badges.herokuapp.com/maven-central/org.jboss.forge.furnace/furnace-se)
Usage
=====
First, include the Furnace dependency in your project:
org.jboss.forge.furnace
furnace-se
${version.furnace}
Then configure the container and start it:
Furnace furnace = FurnaceFactory.getFurnace()
furnace.addRepository(AddonRepositoryMode.MUTABLE, new File(OperatingSystemUtils.getUserForgeDir(), "addons"));
To install addons, you will need to add the following dependencies to your project:
org.jboss.forge.furnace
furnace-manager
${version.furnace}
org.jboss.forge.furnace
furnace-manager-resolver-maven
${version.furnace}
Then create a new AddonManager:
AddonManager manager = new AddonManagerImpl(furnace, new MavenAddonDependencyResolver())
Once you have an `AddonManager` instance, you can begin to install addons (You can do this while Furnace is running):
InstallRequest request = manager.install(AddonId.from("org.example:my-addon", "1.0.0.Final"));
request.perform();
Don't forget to start Furnace:
Future future = furnace.startAsync();
future.get(); // wait for Furnace to start, before continuing.
Once this is done, you'll now be able to request services from Furnace's `AddonRegistry`, and utilize the functionality of the addons you've installed:
MyServiceType instance = furnace.getAddonRegistry().getServices(MyServiceType.class).get();
Of course, addons can be pre-bundled into a project using the Furnace Maven Plugin, making it much simpler (and faster) to run your application:
org.jboss.forge.furnace
furnace-maven-plugin
${version.furnace}
deploy-addons
prepare-package
addon-install
false
${basedir}/addon-repository
org.example:my-addon,1.0.0.Final
To learn more about writing addons, see the full documentation here: https://github.com/forge/core#developing-an-addon