Skip to content

Latest commit

 

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lein-felix

Build Status Dependencies Status Clojars Project

A lein plugin for the Apache Felix OSGi project

Project logo

This project provides a Clojure lein plugin for working with Apache Felix projects and performing OSGi tasks related to the OSGi framework. The meat of this plugin is a sane default configuration and wrappers for various system shell commands necessary for the smooth installtion and operation of Felix-based OSGi bundles.

Versions

The following lein-felix release correspond to different Apache Felix, Clojure, and clojure.osgi releases:

lein-felix Apache Felix Apache Maven Bundle Plugin Clojure clojure.osgi
0.3.0 5.6.10 3.5.1 1.9.0 1.9.0-2
0.1.0, 0.2.0 5.6.10 3.5.0 1.8.0 1.8.0-1

Important Note: Due to Apache mirrors' archiving practices, versions 0.1.0 and 0.2.0 no longer work; version 0.3.0 was released after the Felix download host was changed to point to the Apache archives host, so it should be good for future use (as long as Apache doesn't change the host or the URL path!).

Dependencies

This plugin shells out to the system and expects the following binary executables to be on the system path or part of your system shell:

  • curl
  • mkdir
  • mv
  • mvn
  • unzip
  • java

Default Values

The following is the default map used to create and interact with a local install of Felix:

  {:felix {
     :framework {
       :id 'org.apache.felix/org.apache.felix.framework}
     :download {
       :host "https://archive.apache.org"
       :dist-name "org.apache.felix.main.distribution"}
     :version "5.6.10"
     :jar "bin/felix.jar"
     :script {
       :install-dir "bin"
       :name "felix"}
     :clojure-osgi {
       :id 'com.theoryinpractise/clojure.osgi}}})

These may be overridden in a map associated with the key :felix in a project.clj' top-level, or in a project's :profiles section, also under :felix.

Usage

This plugin comes with its own help:

$ lein felix help
  Usage: lein felix [COMMAND]

  Supported commands:

    bundle [SUBCOMMAND]       - Perform various operations related to OSGi
                                bundles.
    clean                     - Clean up emphemeral Felix files.
    clojure-osgi [SUBCOMMAND] - Pergform various operations related to Clojure
                                OSGi support.
    download                  - Download the supported version of the Apache
                                Felix distribution.
    help                      - Display this help message.
    install                   - Perform the 'download', 'unpack',
                                'script install', and 'clojure-osgi install'
                                tasks.
    pom                       - Generate a maven-bundle-plugin ready 'pom.xml'
                                file.
    script [SUBCOMMAND]       - Perform various operations related to the
                                wrapper script for the felix.jar file,
    uninstall                 - Recursively remove the local Felix install dir.
    unpack                    - Unzip the compressed distribution file to the
                                install directory.

  Additional help is available for each command via the 'help'
  subcommand, e.g.:

    $ lein felix download help"

As indicated in the help output, each subcommand has its own help as well, e.g.:

$ lein felix bundle help
  Usage: lein felix bundle [SUBCOMMAND]

  Perform various operations related to OSGi bundles.

  Allowed subcommands:
    create    - Create an OSGi bundle for the project.
    install   - Install the project JAR as an OSGi bundle into Felix.
    uninstall - Uninstall the project's OSGi bundle from the Felix bundle
                directory.
    help      - Display this help message.

  This command uses the following configuration options:

  * :felix :install-dir

Examples

If you'd like to see lein-felix in action, you can view the example projects here:

Related Projects

Note that in addition to Apache Felix itself, this lein plugin relies heavily upon the following (under the covers):

License

Copyright © 2017-2018, Starship Hackers

Licensed under the Apache License, Version 2.0.

About

A lein plugin for the Apache Felix OSGi project

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages