blob: 981ced4422d56153acdee2558f2b556876d0665d [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
<project xmlns="" xmlns:xsi=""
<name>Apache Sling Sample Framework Fragment Bundle</name>
Shows how to create a fragment bundle that causes additional
packages from the JVM environment to be exported.
After starting this bundle, the OSGi console detail view of
the system bundle (/system/console/bundles/0) should list two
com.example packages as being exported.
Those packages are just dummy examples, the list of exported
packages will obviously need to be adapted to create your own
fragment bundle.
// Convert POM version to valid OSGi version identifier['osgi.version'] =
(['rawVersion'] =~ /-/).replaceAll('.')
The POM packaging is jar but with these settings
we create a valid bundle.
<Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
<Fragment-Host>system.bundle; extension:=framework</Fragment-Host>
Packages listed here will be exported by the system
bundle once this bundle is active.
The OSGi framework does not check whether the packages
are actually available.
com.example.somepackage; version=1.2.3,
com.example.anotherpackage; version=4.5.6