Skip to main contentdfsdf

rrobert_ah 's List: 1107-Maven&OSGI

  • Maven & OSGI

    • Transitive dependencies are a new feature in Maven 2.0. This allows you to avoid needing to discover and specify the libraries that your own dependencies require, and including them automatically.
    • "nearest definition" means that the version used will be the closest one to your project in the tree of dependencies, eg. if dependencies for A, B, and C are defined as A -> B -> C -> D 2.0 and A -> E -> D 1.0, then D 1.0 will be used when building A because the path from A to D through E is shorter. You could explicitly add a dependency to D 2.0 in A to force the use of D 2.0
    • Usually, the functionality of a bundle - be it the packages exported or be it the services provided - is made available to the rest of the system, when the bundle is started.
    • The drawback of this method of service registration is that the services have to acquire other services whose functionality is used themselves and also have to observe the presence as services may come and go at any time.

    3 more annotations...

    • bnd works differently, it uses the pull model. Instructions in the bnd file describe the contents of the desired JAR file without writing this structure to disk.
    • Private-Package and Export-Package contain instructions. Instructions are patterns + attributes and directives, looking like normal OSGi attributes and directives

    1 more annotation...

    • Only the packages specified by the header will be exported, the rest will be private and will not be seen outside the containing bundle.
    • Bundle-Classpath
       

      This header is handy when the jar contains embedded libraries or class packages under various folders, by extending the default bundle classpath (which expects the classes to be available directly under the jar root).

    1 more annotation...

    • Profiles can be automatically triggered based on the detected state of the build environment. These triggers are specified via an <activation> section in the profile itself.
    • Maven 2.1.0+ now supports server password encryption
1 - 7 of 7
20 items/page
List Comments (0)