felix-main-4.0.1.orig/ 0000755 0001750 0001750 00000000000 11644652011 014400 5 ustar drazzib drazzib felix-main-4.0.1.orig/pom.xml 0000644 0001750 0001750 00000015026 11644652002 015721 0 ustar drazzib drazzib
org.apache.felixfelix-parent2.1../pom/pom.xml4.0.0bundleApache Felix Mainorg.apache.felix.main4.0.1scm:svn:http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.main-4.0.1scm:svn:https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.main-4.0.1scm:svn:https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.main-4.0.1${pom.groupId}org.apache.felix.framework${framework.version}4$4.0.10.10.00.10.00.12.01.6.6release1$org.apache.felixmaven-bundle-plugin2.3.5true
<_donotcopy>(CVS|.svn|config.properties)
org.apache.felix.main.Mainorg.apache.felix.mainApache FelixOSGi R4 framework.The Apache Software Foundation*;artifactId=org.apache.felix.framework;inline=trueorg.apache.felix.main.*!org.osgi.service.log, !org.osgi.service.obr,org.osgi.*!*org.apache.maven.pluginsmaven-dependency-plugincopypackagecopy${pom.groupId}org.apache.felix.gogo.runtime${gogo.runtime.version}jartrue${project.basedir}/bundle${pom.groupId}org.apache.felix.gogo.shell${gogo.shell.version}jartrue${project.basedir}/bundle${pom.groupId}org.apache.felix.gogo.command${gogo.command.version}jartrue${project.basedir}/bundle${pom.groupId}org.apache.felix.bundlerepository${obr.version}jartrue${project.basedir}/bundlemaven-antrun-pluginpackagerunsrc/main/resourcestrue
felix-main-4.0.1.orig/LICENSE 0000644 0001750 0001750 00000054274 11644652011 015421 0 ustar drazzib drazzib
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
felix-main-4.0.1.orig/NOTICE 0000644 0001750 0001750 00000000525 11644652011 015306 0 ustar drazzib drazzib
Apache Felix Main
Copyright 2006-2011 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
This product includes software developed at
The OSGi Alliance (http://www.osgi.org/).
Copyright (c) OSGi Alliance (2000, 2009).
Licensed under the Apache License 2.0.
felix-main-4.0.1.orig/DEPENDENCIES 0000644 0001750 0001750 00000001764 11644652012 016162 0 ustar drazzib drazzib // ------------------------------------------------------------------
// Transitive dependencies of this project determined from the
// maven pom organized by organization.
// ------------------------------------------------------------------
Apache Felix Main
From: 'The Apache Software Foundation' (http://www.apache.org/)
- Apache Felix Framework (http://felix.apache.org/org.apache.felix.framework) org.apache.felix:org.apache.felix.framework:bundle:4.0.1
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
I. Included Third-Party Software
This product includes software developed at
The OSGi Alliance (http://www.osgi.org/).
Copyright (c) OSGi Alliance (2000, 2009).
Licensed under the Apache License 2.0.
II. Used Third-Party Software
This product uses software developed at
The OSGi Alliance (http://www.osgi.org/).
Copyright (c) OSGi Alliance (2000, 2009).
Licensed under the Apache License 2.0.
III. License Summary
- Apache License 2.0
felix-main-4.0.1.orig/src/ 0000755 0001750 0001750 00000000000 11644652002 015167 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/ 0000755 0001750 0001750 00000000000 11644652002 016113 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/appended-resources/ 0000755 0001750 0001750 00000000000 11644652002 021703 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/appended-resources/META-INF/ 0000755 0001750 0001750 00000000000 11655235301 023044 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/appended-resources/META-INF/LICENSE 0000644 0001750 0001750 00000026136 11644652002 024060 0 ustar drazzib drazzib
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
felix-main-4.0.1.orig/src/main/appended-resources/META-INF/NOTICE 0000644 0001750 0001750 00000000247 11644652002 023752 0 ustar drazzib drazzib This product includes software developed at
The OSGi Alliance (http://www.osgi.org/).
Copyright (c) OSGi Alliance (2000, 2009).
Licensed under the Apache License 2.0.
felix-main-4.0.1.orig/src/main/appended-resources/META-INF/DEPENDENCIES 0000644 0001750 0001750 00000000667 11644652002 024625 0 ustar drazzib drazzib I. Included Third-Party Software
This product includes software developed at
The OSGi Alliance (http://www.osgi.org/).
Copyright (c) OSGi Alliance (2000, 2009).
Licensed under the Apache License 2.0.
II. Used Third-Party Software
This product uses software developed at
The OSGi Alliance (http://www.osgi.org/).
Copyright (c) OSGi Alliance (2000, 2009).
Licensed under the Apache License 2.0.
III. License Summary
- Apache License 2.0
felix-main-4.0.1.orig/src/main/resources/ 0000755 0001750 0001750 00000000000 11655235301 020126 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/resources/config.properties 0000644 0001750 0001750 00000010562 11644652002 023514 0 ustar drazzib drazzib # 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Framework config properties.
#
# To override the packages the framework exports by default from the
# class path, set this variable.
#org.osgi.framework.system.packages=
# To append packages to the default set of exported system packages,
# set this value.
#org.osgi.framework.system.packages.extra=
# The following property makes specified packages from the class path
# available to all bundles. You should avoid using this property.
#org.osgi.framework.bootdelegation=sun.*,com.sun.*
# Felix tries to guess when to implicitly boot delegate in certain
# situations to ease integration without outside code. This feature
# is enabled by default, uncomment the following line to disable it.
#felix.bootdelegation.implicit=false
# The following property explicitly specifies the location of the bundle
# cache, which defaults to "felix-cache" in the current working directory.
# If this value is not absolute, then the felix.cache.rootdir controls
# how the absolute location is calculated. (See next property)
#org.osgi.framework.storage=${dollar}{felix.cache.rootdir}/felix-cache
# The following property is used to convert a relative bundle cache
# location into an absolute one by specifying the root to prepend to
# the relative cache path. The default for this property is the
# current working directory.
#felix.cache.rootdir=${dollar}{user.dir}
# The following property controls whether the bundle cache is flushed
# the first time the framework is initialized. Possible values are
# "none" and "onFirstInit"; the default is "none".
#org.osgi.framework.storage.clean=onFirstInit
# The following property is used to enable/disable bundle cache locking.
# On JVMs that do not support file channel locking, you may want to
# disable this feature. The default is enabled.
#felix.cache.locking=true
# The following property limits how many open files the bundle cache
# is allowed to use. The default value is 0, which is unlimited.
#felix.cache.filelimit=0
# The following property determines which actions are performed when
# processing the auto-deploy directory. It is a comma-delimited list of
# the following values: 'install', 'start', 'update', and 'uninstall'.
# An undefined or blank value is equivalent to disabling auto-deploy
# processing.
felix.auto.deploy.action=install,start
# The following property specifies the directory to use as the bundle
# auto-deploy directory; the default is 'bundle' in the working directory.
#felix.auto.deploy.dir=bundle
# The following property is a space-delimited list of bundle URLs
# to install when the framework starts. The ending numerical component
# is the target start level. Any number of these properties may be
# specified for different start levels.
#felix.auto.install.1=
# The following property is a space-delimited list of bundle URLs
# to install and start when the framework starts. The ending numerical
# component is the target start level. Any number of these properties
# may be specified for different start levels.
#felix.auto.start.1=
felix.log.level=${log.level}
# Sets the initial start level of the framework upon startup.
#org.osgi.framework.startlevel.beginning=1
# Sets the start level of newly installed bundles.
#felix.startlevel.bundle=1
# Felix installs a stream and content handler factories by default,
# uncomment the following line to not install them.
#felix.service.urlhandlers=false
# The launcher registers a shutdown hook to cleanly stop the framework
# by default, uncomment the following line to disable it.
#felix.shutdown.hook=false
#
# Bundle config properties.
#
org.osgi.service.http.port=8080
obr.repository.url=http://felix.apache.org/obr/releases.xml
felix-main-4.0.1.orig/src/main/java/ 0000755 0001750 0001750 00000000000 11644652002 017034 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/java/org/ 0000755 0001750 0001750 00000000000 11644652002 017623 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/java/org/apache/ 0000755 0001750 0001750 00000000000 11644652002 021044 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/java/org/apache/felix/ 0000755 0001750 0001750 00000000000 11644652002 022153 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/java/org/apache/felix/main/ 0000755 0001750 0001750 00000000000 11655235301 023100 5 ustar drazzib drazzib felix-main-4.0.1.orig/src/main/java/org/apache/felix/main/AutoProcessor.java 0000644 0001750 0001750 00000036017 11644652002 026561 0 ustar drazzib drazzib /*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.main;
import java.io.File;
import java.util.*;
import org.osgi.framework.*;
import org.osgi.service.startlevel.*;
public class AutoProcessor
{
/**
* The property name used for the bundle directory.
**/
public static final String AUTO_DEPLOY_DIR_PROPERY = "felix.auto.deploy.dir";
/**
* The default name used for the bundle directory.
**/
public static final String AUTO_DEPLOY_DIR_VALUE = "bundle";
/**
* The property name used to specify auto-deploy actions.
**/
public static final String AUTO_DEPLOY_ACTION_PROPERY = "felix.auto.deploy.action";
/**
* The property name used to specify auto-deploy start level.
**/
public static final String AUTO_DEPLOY_STARTLEVEL_PROPERY = "felix.auto.deploy.startlevel";
/**
* The name used for the auto-deploy install action.
**/
public static final String AUTO_DEPLOY_INSTALL_VALUE = "install";
/**
* The name used for the auto-deploy start action.
**/
public static final String AUTO_DEPLOY_START_VALUE = "start";
/**
* The name used for the auto-deploy update action.
**/
public static final String AUTO_DEPLOY_UPDATE_VALUE = "update";
/**
* The name used for the auto-deploy uninstall action.
**/
public static final String AUTO_DEPLOY_UNINSTALL_VALUE = "uninstall";
/**
* The property name prefix for the launcher's auto-install property.
**/
public static final String AUTO_INSTALL_PROP = "felix.auto.install";
/**
* The property name prefix for the launcher's auto-start property.
**/
public static final String AUTO_START_PROP = "felix.auto.start";
/**
* Used to instigate auto-deploy directory process and auto-install/auto-start
* configuration property processing during.
* @param configMap Map of configuration properties.
* @param context The system bundle context.
**/
public static void process(Map configMap, BundleContext context)
{
configMap = (configMap == null) ? new HashMap() : configMap;
processAutoDeploy(configMap, context);
processAutoProperties(configMap, context);
}
/**
*
* Processes bundles in the auto-deploy directory, performing the
* specified deploy actions.
*
*/
private static void processAutoDeploy(Map configMap, BundleContext context)
{
// Determine if auto deploy actions to perform.
String action = (String) configMap.get(AUTO_DEPLOY_ACTION_PROPERY);
action = (action == null) ? "" : action;
List actionList = new ArrayList();
StringTokenizer st = new StringTokenizer(action, ",");
while (st.hasMoreTokens())
{
String s = st.nextToken().trim().toLowerCase();
if (s.equals(AUTO_DEPLOY_INSTALL_VALUE)
|| s.equals(AUTO_DEPLOY_START_VALUE)
|| s.equals(AUTO_DEPLOY_UPDATE_VALUE)
|| s.equals(AUTO_DEPLOY_UNINSTALL_VALUE))
{
actionList.add(s);
}
}
// Perform auto-deploy actions.
if (actionList.size() > 0)
{
// Retrieve the Start Level service, since it will be needed
// to set the start level of the installed bundles.
StartLevel sl = (StartLevel) context.getService(
context.getServiceReference(org.osgi.service.startlevel.StartLevel.class.getName()));
// Get start level for auto-deploy bundles.
int startLevel = sl.getInitialBundleStartLevel();
if (configMap.get(AUTO_DEPLOY_STARTLEVEL_PROPERY) != null)
{
try
{
startLevel = Integer.parseInt(
configMap.get(AUTO_DEPLOY_STARTLEVEL_PROPERY).toString());
}
catch (NumberFormatException ex)
{
// Ignore and keep default level.
}
}
// Get list of already installed bundles as a map.
Map installedBundleMap = new HashMap();
Bundle[] bundles = context.getBundles();
for (int i = 0; i < bundles.length; i++)
{
installedBundleMap.put(bundles[i].getLocation(), bundles[i]);
}
// Get the auto deploy directory.
String autoDir = (String) configMap.get(AUTO_DEPLOY_DIR_PROPERY);
autoDir = (autoDir == null) ? AUTO_DEPLOY_DIR_VALUE : autoDir;
// Look in the specified bundle directory to create a list
// of all JAR files to install.
File[] files = new File(autoDir).listFiles();
List jarList = new ArrayList();
if (files != null)
{
Arrays.sort(files);
for (int i = 0; i < files.length; i++)
{
if (files[i].getName().endsWith(".jar"))
{
jarList.add(files[i]);
}
}
}
// Install bundle JAR files and remember the bundle objects.
final List startBundleList = new ArrayList();
for (int i = 0; i < jarList.size(); i++)
{
// Look up the bundle by location, removing it from
// the map of installed bundles so the remaining bundles
// indicate which bundles may need to be uninstalled.
Bundle b = (Bundle) installedBundleMap.remove(
((File) jarList.get(i)).toURI().toString());
try
{
// If the bundle is not already installed, then install it
// if the 'install' action is present.
if ((b == null) && actionList.contains(AUTO_DEPLOY_INSTALL_VALUE))
{
b = context.installBundle(
((File) jarList.get(i)).toURI().toString());
}
// If the bundle is already installed, then update it
// if the 'update' action is present.
else if ((b != null) && actionList.contains(AUTO_DEPLOY_UPDATE_VALUE))
{
b.update();
}
// If we have found and/or successfully installed a bundle,
// then add it to the list of bundles to potentially start
// and also set its start level accordingly.
if ((b != null) && !isFragment(b))
{
startBundleList.add(b);
sl.setBundleStartLevel(b, startLevel);
}
}
catch (BundleException ex)
{
System.err.println("Auto-deploy install: "
+ ex + ((ex.getCause() != null) ? " - " + ex.getCause() : ""));
}
}
// Uninstall all bundles not in the auto-deploy directory if
// the 'uninstall' action is present.
if (actionList.contains(AUTO_DEPLOY_UNINSTALL_VALUE))
{
for (Iterator it = installedBundleMap.entrySet().iterator(); it.hasNext(); )
{
Map.Entry entry = (Map.Entry) it.next();
Bundle b = (Bundle) entry.getValue();
if (b.getBundleId() != 0)
{
try
{
b.uninstall();
}
catch (BundleException ex)
{
System.err.println("Auto-deploy uninstall: "
+ ex + ((ex.getCause() != null) ? " - " + ex.getCause() : ""));
}
}
}
}
// Start all installed and/or updated bundles if the 'start'
// action is present.
if (actionList.contains(AUTO_DEPLOY_START_VALUE))
{
for (int i = 0; i < startBundleList.size(); i++)
{
try
{
((Bundle) startBundleList.get(i)).start();
}
catch (BundleException ex)
{
System.err.println("Auto-deploy start: "
+ ex + ((ex.getCause() != null) ? " - " + ex.getCause() : ""));
}
}
}
}
}
/**
*
* Processes the auto-install and auto-start properties from the
* specified configuration properties.
*
*/
private static void processAutoProperties(Map configMap, BundleContext context)
{
// Retrieve the Start Level service, since it will be needed
// to set the start level of the installed bundles.
StartLevel sl = (StartLevel) context.getService(
context.getServiceReference(org.osgi.service.startlevel.StartLevel.class.getName()));
// Retrieve all auto-install and auto-start properties and install
// their associated bundles. The auto-install property specifies a
// space-delimited list of bundle URLs to be automatically installed
// into each new profile, while the auto-start property specifies
// bundles to be installed and started. The start level to which the
// bundles are assigned is specified by appending a ".n" to the
// property name, where "n" is the desired start level for the list
// of bundles. If no start level is specified, the default start
// level is assumed.
for (Iterator i = configMap.keySet().iterator(); i.hasNext(); )
{
String key = ((String) i.next()).toLowerCase();
// Ignore all keys that are not an auto property.
if (!key.startsWith(AUTO_INSTALL_PROP) && !key.startsWith(AUTO_START_PROP))
{
continue;
}
// If the auto property does not have a start level,
// then assume it is the default bundle start level, otherwise
// parse the specified start level.
int startLevel = sl.getInitialBundleStartLevel();
if (!key.equals(AUTO_INSTALL_PROP) && !key.equals(AUTO_START_PROP))
{
try
{
startLevel = Integer.parseInt(key.substring(key.lastIndexOf('.') + 1));
}
catch (NumberFormatException ex)
{
System.err.println("Invalid property: " + key);
}
}
// Parse and install the bundles associated with the key.
StringTokenizer st = new StringTokenizer((String) configMap.get(key), "\" ", true);
for (String location = nextLocation(st); location != null; location = nextLocation(st))
{
try
{
Bundle b = context.installBundle(location, null);
sl.setBundleStartLevel(b, startLevel);
}
catch (Exception ex)
{
System.err.println("Auto-properties install: " + location + " ("
+ ex + ((ex.getCause() != null) ? " - " + ex.getCause() : "") + ")");
if (ex.getCause() != null)
ex.printStackTrace();
}
}
}
// Now loop through the auto-start bundles and start them.
for (Iterator i = configMap.keySet().iterator(); i.hasNext(); )
{
String key = ((String) i.next()).toLowerCase();
if (key.startsWith(AUTO_START_PROP))
{
StringTokenizer st = new StringTokenizer((String) configMap.get(key), "\" ", true);
for (String location = nextLocation(st); location != null; location = nextLocation(st))
{
// Installing twice just returns the same bundle.
try
{
Bundle b = context.installBundle(location, null);
if (b != null)
{
b.start();
}
}
catch (Exception ex)
{
System.err.println("Auto-properties start: " + location + " ("
+ ex + ((ex.getCause() != null) ? " - " + ex.getCause() : "") + ")");
}
}
}
}
}
private static String nextLocation(StringTokenizer st)
{
String retVal = null;
if (st.countTokens() > 0)
{
String tokenList = "\" ";
StringBuffer tokBuf = new StringBuffer(10);
String tok = null;
boolean inQuote = false;
boolean tokStarted = false;
boolean exit = false;
while ((st.hasMoreTokens()) && (!exit))
{
tok = st.nextToken(tokenList);
if (tok.equals("\""))
{
inQuote = ! inQuote;
if (inQuote)
{
tokenList = "\"";
}
else
{
tokenList = "\" ";
}
}
else if (tok.equals(" "))
{
if (tokStarted)
{
retVal = tokBuf.toString();
tokStarted=false;
tokBuf = new StringBuffer(10);
exit = true;
}
}
else
{
tokStarted = true;
tokBuf.append(tok.trim());
}
}
// Handle case where end of token stream and
// still got data
if ((!exit) && (tokStarted))
{
retVal = tokBuf.toString();
}
}
return retVal;
}
private static boolean isFragment(Bundle bundle)
{
return bundle.getHeaders().get(Constants.FRAGMENT_HOST) != null;
}
} felix-main-4.0.1.orig/src/main/java/org/apache/felix/main/Main.java 0000644 0001750 0001750 00000056007 11644652002 024636 0 ustar drazzib drazzib /*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.main;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.*;
import org.apache.felix.framework.util.Util;
import org.osgi.framework.Constants;
import org.osgi.framework.FrameworkEvent;
import org.osgi.framework.launch.Framework;
import org.osgi.framework.launch.FrameworkFactory;
/**
*
* This class is the default way to instantiate and execute the framework. It is not
* intended to be the only way to instantiate and execute the framework; rather, it is
* one example of how to do so. When embedding the framework in a host application,
* this class can serve as a simple guide of how to do so. It may even be
* worthwhile to reuse some of its property handling capabilities.
*
**/
public class Main
{
/**
* Switch for specifying bundle directory.
**/
public static final String BUNDLE_DIR_SWITCH = "-b";
/**
* The property name used to specify whether the launcher should
* install a shutdown hook.
**/
public static final String SHUTDOWN_HOOK_PROP = "felix.shutdown.hook";
/**
* The property name used to specify an URL to the system
* property file.
**/
public static final String SYSTEM_PROPERTIES_PROP = "felix.system.properties";
/**
* The default name used for the system properties file.
**/
public static final String SYSTEM_PROPERTIES_FILE_VALUE = "system.properties";
/**
* The property name used to specify an URL to the configuration
* property file to be used for the created the framework instance.
**/
public static final String CONFIG_PROPERTIES_PROP = "felix.config.properties";
/**
* The default name used for the configuration properties file.
**/
public static final String CONFIG_PROPERTIES_FILE_VALUE = "config.properties";
/**
* Name of the configuration directory.
*/
public static final String CONFIG_DIRECTORY = "conf";
private static Framework m_fwk = null;
/**
*
* This method performs the main task of constructing an framework instance
* and starting its execution. The following functions are performed
* when invoked:
*
*
*
Examine and verify command-line arguments. The launcher
* accepts a "-b" command line switch to set the bundle auto-deploy
* directory and a single argument to set the bundle cache directory.
*
*
Read the system properties file. This is a file
* containing properties to be pushed into System.setProperty()
* before starting the framework. This mechanism is mainly shorthand
* for people starting the framework from the command line to avoid having
* to specify a bunch of -D system property definitions.
* The only properties defined in this file that will impact the framework's
* behavior are the those concerning setting HTTP proxies, such as
* http.proxyHost, http.proxyPort, and
* http.proxyAuth. Generally speaking, the framework does
* not use system properties at all.
*
*
Read the framework's configuration property file. This is
* a file containing properties used to configure the framework
* instance and to pass configuration information into
* bundles installed into the framework instance. The configuration
* property file is called config.properties by default
* and is located in the conf/ directory of the Felix
* installation directory, which is the parent directory of the
* directory containing the felix.jar file. It is possible
* to use a different location for the property file by specifying
* the desired URL using the felix.config.properties
* system property; this should be set using the -D syntax
* when executing the JVM. If the config.properties file
* cannot be found, then default values are used for all configuration
* properties. Refer to the
* Felix
* constructor documentation for more information on framework
* configuration properties.
*
*
Copy configuration properties specified as system properties
* into the set of configuration properties. Even though the
* Felix framework does not consult system properties for configuration
* information, sometimes it is convenient to specify them on the command
* line when launching Felix. To make this possible, the Felix launcher
* copies any configuration properties specified as system properties
* into the set of configuration properties passed into Felix.
*
*
Add shutdown hook. To make sure the framework shutdowns
* cleanly, the launcher installs a shutdown hook; this can be disabled
* with the felix.shutdown.hook configuration property.
*
*
Create and initialize a framework instance. The OSGi standard
* FrameworkFactory is retrieved from META-INF/services
* and used to create a framework instance with the configuration properties.
*
*
Auto-deploy bundles. All bundles in the auto-deploy
* directory are deployed into the framework instance.
*
*
Start the framework. The framework is started and
* the launcher thread waits for the framework to shutdown.
*
*
*
* It should be noted that simply starting an instance of the framework is not
* enough to create an interactive session with it. It is necessary to install
* and start bundles that provide a some means to interact with the framework;
* this is generally done by bundles in the auto-deploy directory or specifying
* an "auto-start" property in the configuration property file. If no bundles
* providing a means to interact with the framework are installed or if the
* configuration property file cannot be found, the framework will appear to
* be hung or deadlocked. This is not the case, it is executing correctly,
* there is just no way to interact with it.
*
*
* The launcher provides two ways to deploy bundles into a framework at
* startup, which have associated configuration properties:
*
*
*
Bundle auto-deploy - Automatically deploys all bundles from a
* specified directory, controlled by the following configuration
* properties:
*
*
felix.auto.deploy.dir - Specifies the auto-deploy directory
* from which bundles are automatically deploy at framework startup.
* The default is the bundle/ directory of the current directory.
*
*
felix.auto.deploy.action - Specifies the auto-deploy actions
* to be found on bundle JAR files found in the auto-deploy directory.
* The possible actions are install, update,
* start, and uninstall. If no actions are specified,
* then the auto-deploy directory is not processed. There is no default
* value for this property.
*
*
*
*
Bundle auto-properties - Configuration properties which specify URLs
* to bundles to install/start:
*
*
felix.auto.install.N - Space-delimited list of bundle
* URLs to automatically install when the framework is started,
* where N is the start level into which the bundle will be
* installed (e.g., felix.auto.install.2).
*
*
felix.auto.start.N - Space-delimited list of bundle URLs
* to automatically install and start when the framework is started,
* where N is the start level into which the bundle will be
* installed (e.g., felix.auto.start.2).
*
*
*
*
*
* These properties should be specified in the config.properties
* so that they can be processed by the launcher during the framework
* startup process.
*
* @param args Accepts arguments to set the auto-deploy directory and/or
* the bundle cache directory.
* @throws Exception If an error occurs.
**/
public static void main(String[] args) throws Exception
{
// Look for bundle directory and/or cache directory.
// We support at most one argument, which is the bundle
// cache directory.
String bundleDir = null;
String cacheDir = null;
boolean expectBundleDir = false;
for (int i = 0; i < args.length; i++)
{
if (args[i].equals(BUNDLE_DIR_SWITCH))
{
expectBundleDir = true;
}
else if (expectBundleDir)
{
bundleDir = args[i];
expectBundleDir = false;
}
else
{
cacheDir = args[i];
}
}
if ((args.length > 3) || (expectBundleDir && bundleDir == null))
{
System.out.println("Usage: [-b ] []");
System.exit(0);
}
// Load system properties.
Main.loadSystemProperties();
// Read configuration properties.
Properties configProps = Main.loadConfigProperties();
// If no configuration properties were found, then create
// an empty properties object.
if (configProps == null)
{
System.err.println("No " + CONFIG_PROPERTIES_FILE_VALUE + " found.");
configProps = new Properties();
}
// Copy framework properties from the system properties.
Main.copySystemProperties(configProps);
// If there is a passed in bundle auto-deploy directory, then
// that overwrites anything in the config file.
if (bundleDir != null)
{
configProps.setProperty(AutoProcessor.AUTO_DEPLOY_DIR_PROPERY, bundleDir);
}
// If there is a passed in bundle cache directory, then
// that overwrites anything in the config file.
if (cacheDir != null)
{
configProps.setProperty(Constants.FRAMEWORK_STORAGE, cacheDir);
}
// If enabled, register a shutdown hook to make sure the framework is
// cleanly shutdown when the VM exits.
String enableHook = configProps.getProperty(SHUTDOWN_HOOK_PROP);
if ((enableHook == null) || !enableHook.equalsIgnoreCase("false"))
{
Runtime.getRuntime().addShutdownHook(new Thread("Felix Shutdown Hook") {
public void run()
{
try
{
if (m_fwk != null)
{
m_fwk.stop();
m_fwk.waitForStop(0);
}
}
catch (Exception ex)
{
System.err.println("Error stopping framework: " + ex);
}
}
});
}
try
{
// Create an instance of the framework.
FrameworkFactory factory = getFrameworkFactory();
m_fwk = factory.newFramework(configProps);
// Initialize the framework, but don't start it yet.
m_fwk.init();
// Use the system bundle context to process the auto-deploy
// and auto-install/auto-start properties.
AutoProcessor.process(configProps, m_fwk.getBundleContext());
FrameworkEvent event;
do
{
// Start the framework.
m_fwk.start();
// Wait for framework to stop to exit the VM.
event = m_fwk.waitForStop(0);
}
// If the framework was updated, then restart it.
while (event.getType() == FrameworkEvent.STOPPED_UPDATE);
// Otherwise, exit.
System.exit(0);
}
catch (Exception ex)
{
System.err.println("Could not create framework: " + ex);
ex.printStackTrace();
System.exit(0);
}
}
/**
* Simple method to parse META-INF/services file for framework factory.
* Currently, it assumes the first non-commented line is the class name
* of the framework factory implementation.
* @return The created FrameworkFactory instance.
* @throws Exception if any errors occur.
**/
private static FrameworkFactory getFrameworkFactory() throws Exception
{
URL url = Main.class.getClassLoader().getResource(
"META-INF/services/org.osgi.framework.launch.FrameworkFactory");
if (url != null)
{
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
try
{
for (String s = br.readLine(); s != null; s = br.readLine())
{
s = s.trim();
// Try to load first non-empty, non-commented line.
if ((s.length() > 0) && (s.charAt(0) != '#'))
{
return (FrameworkFactory) Class.forName(s).newInstance();
}
}
}
finally
{
if (br != null) br.close();
}
}
throw new Exception("Could not find framework factory.");
}
/**
*
* Loads the properties in the system property file associated with the
* framework installation into System.setProperty(). These properties
* are not directly used by the framework in anyway. By default, the system
* property file is located in the conf/ directory of the Felix
* installation directory and is called "system.properties". The
* installation directory of Felix is assumed to be the parent directory of
* the felix.jar file as found on the system class path property.
* The precise file from which to load system properties can be set by
* initializing the "felix.system.properties" system property to an
* arbitrary URL.
*
**/
public static void loadSystemProperties()
{
// The system properties file is either specified by a system
// property or it is in the same directory as the Felix JAR file.
// Try to load it from one of these places.
// See if the property URL was specified as a property.
URL propURL = null;
String custom = System.getProperty(SYSTEM_PROPERTIES_PROP);
if (custom != null)
{
try
{
propURL = new URL(custom);
}
catch (MalformedURLException ex)
{
System.err.print("Main: " + ex);
return;
}
}
else
{
// Determine where the configuration directory is by figuring
// out where felix.jar is located on the system class path.
File confDir = null;
String classpath = System.getProperty("java.class.path");
int index = classpath.toLowerCase().indexOf("felix.jar");
int start = classpath.lastIndexOf(File.pathSeparator, index) + 1;
if (index >= start)
{
// Get the path of the felix.jar file.
String jarLocation = classpath.substring(start, index);
// Calculate the conf directory based on the parent
// directory of the felix.jar directory.
confDir = new File(
new File(new File(jarLocation).getAbsolutePath()).getParent(),
CONFIG_DIRECTORY);
}
else
{
// Can't figure it out so use the current directory as default.
confDir = new File(System.getProperty("user.dir"), CONFIG_DIRECTORY);
}
try
{
propURL = new File(confDir, SYSTEM_PROPERTIES_FILE_VALUE).toURL();
}
catch (MalformedURLException ex)
{
System.err.print("Main: " + ex);
return;
}
}
// Read the properties file.
Properties props = new Properties();
InputStream is = null;
try
{
is = propURL.openConnection().getInputStream();
props.load(is);
is.close();
}
catch (FileNotFoundException ex)
{
// Ignore file not found.
}
catch (Exception ex)
{
System.err.println(
"Main: Error loading system properties from " + propURL);
System.err.println("Main: " + ex);
try
{
if (is != null) is.close();
}
catch (IOException ex2)
{
// Nothing we can do.
}
return;
}
// Perform variable substitution on specified properties.
for (Enumeration e = props.propertyNames(); e.hasMoreElements(); )
{
String name = (String) e.nextElement();
System.setProperty(name,
Util.substVars(props.getProperty(name), name, null, null));
}
}
/**
*
* Loads the configuration properties in the configuration property file
* associated with the framework installation; these properties
* are accessible to the framework and to bundles and are intended
* for configuration purposes. By default, the configuration property
* file is located in the conf/ directory of the Felix
* installation directory and is called "config.properties".
* The installation directory of Felix is assumed to be the parent
* directory of the felix.jar file as found on the system class
* path property. The precise file from which to load configuration
* properties can be set by initializing the "felix.config.properties"
* system property to an arbitrary URL.
*
* @return A Properties instance or null if there was an error.
**/
public static Properties loadConfigProperties()
{
// The config properties file is either specified by a system
// property or it is in the conf/ directory of the Felix
// installation directory. Try to load it from one of these
// places.
// See if the property URL was specified as a property.
URL propURL = null;
String custom = System.getProperty(CONFIG_PROPERTIES_PROP);
if (custom != null)
{
try
{
propURL = new URL(custom);
}
catch (MalformedURLException ex)
{
System.err.print("Main: " + ex);
return null;
}
}
else
{
// Determine where the configuration directory is by figuring
// out where felix.jar is located on the system class path.
File confDir = null;
String classpath = System.getProperty("java.class.path");
int index = classpath.toLowerCase().indexOf("felix.jar");
int start = classpath.lastIndexOf(File.pathSeparator, index) + 1;
if (index >= start)
{
// Get the path of the felix.jar file.
String jarLocation = classpath.substring(start, index);
// Calculate the conf directory based on the parent
// directory of the felix.jar directory.
confDir = new File(
new File(new File(jarLocation).getAbsolutePath()).getParent(),
CONFIG_DIRECTORY);
}
else
{
// Can't figure it out so use the current directory as default.
confDir = new File(System.getProperty("user.dir"), CONFIG_DIRECTORY);
}
try
{
propURL = new File(confDir, CONFIG_PROPERTIES_FILE_VALUE).toURL();
}
catch (MalformedURLException ex)
{
System.err.print("Main: " + ex);
return null;
}
}
// Read the properties file.
Properties props = new Properties();
InputStream is = null;
try
{
// Try to load config.properties.
is = propURL.openConnection().getInputStream();
props.load(is);
is.close();
}
catch (Exception ex)
{
// Try to close input stream if we have one.
try
{
if (is != null) is.close();
}
catch (IOException ex2)
{
// Nothing we can do.
}
return null;
}
// Perform variable substitution for system properties.
for (Enumeration e = props.propertyNames(); e.hasMoreElements(); )
{
String name = (String) e.nextElement();
props.setProperty(name,
Util.substVars(props.getProperty(name), name, null, props));
}
return props;
}
public static void copySystemProperties(Properties configProps)
{
for (Enumeration e = System.getProperties().propertyNames();
e.hasMoreElements(); )
{
String key = (String) e.nextElement();
if (key.startsWith("felix.") || key.startsWith("org.osgi.framework."))
{
configProps.setProperty(key, System.getProperty(key));
}
}
}
}
felix-main-4.0.1.orig/doc/ 0000755 0001750 0001750 00000000000 11655235301 015146 5 ustar drazzib drazzib felix-main-4.0.1.orig/doc/changelog.txt 0000644 0001750 0001750 00000017057 11644652002 017647 0 ustar drazzib drazzib Changes from 4.0.0 to 4.0.1
---------------------------
** Improvement
* Update to latest framework version 4.0.1
Changes from 3.2.2 to 4.0.0
---------------------------
** Improvement
* [FELIX-3094] - [Main] Launcher should attempt to restart framework if the system bundle was updated
* [FELIX-3123] - [Main] Integrate OBR 1.6.6
* [FELIX-3125] - Update to latest framework version 4.0.0
** Task
* [FELIX-3051] - [Main] Integrate latest Gogo Command bundle to support inspecting generic capabilities/requirements
Changes from 3.2.1 to 3.2.2
---------------------------
** Improvement
* Update to latest framework version 3.2.2
Changes from 3.2.0 to 3.2.1
---------------------------
** Improvement
* Update to latest framework version 3.2.1
Changes from 3.0.9 to 3.2.0
---------------------------
** Improvement
* Update to latest framework version 3.2.0
Changes from 3.0.8 to 3.0.9
---------------------------
** Bug
* [FELIX-2796] - felix.auto.deploy.action throws NPE with only "update" action
** Improvement
* Update to latest framework version 3.0.9
Changes from 3.0.7 to 3.0.8
---------------------------
** Improvement
* Update to latest framework version 3.0.8
* Update to gogo version 0.8.0
Changes from 3.0.6 to 3.0.7
---------------------------
** Improvement
* Update to latest framework version 3.0.7
Changes from 3.0.5 to 3.0.6
---------------------------
** Improvement
* Update to latest framework version 3.0.6
** New Feature
* [FELIX-2678] - Startlevel for bundles in auto.deploy.dir
Changes from 3.0.4 to 3.0.5
---------------------------
** Improvement
* Update to latest framework version 3.0.5
Changes from 3.0.3 to 3.0.4
---------------------------
** Improvement
* Update to latest framework version 3.0.4
Changes from 3.0.2 to 3.0.3
---------------------------
** Improvement
* Update to latest framework version 3.0.3
* Update to gogo 0.6.1
Changes from 3.0.1 to 3.0.2
---------------------------
** Improvement
* Update to latest framework version 3.0.2
Changes from 3.0.0 to 3.0.1
---------------------------
** Improvement
* Update to latest framework version 3.0.1
Changes from 2.0.5 to 3.0.0
---------------------------
** Improvement
* Update to latest framework version 3.0.0
* [FELIX-1797] - Customizable Framework startup message
* [FELIX-2042] - Use Gogo as the default shell for the framework distribution
* [FELIX-2336] - Variable substitution in configuration files should ignore mismatched delimiters
Changes from 2.0.4 to 2.0.5
---------------------------
** Improvement
* Update to latest framework version 2.0.5
Changes from 2.0.3 to 2.0.4
---------------------------
** Improvement
* Update to latest framework version 2.0.4
Changes from 2.0.2 to 2.0.3
---------------------------
** Improvement
* Update to latest framework version 2.0.3
Changes from 2.0.1 to 2.0.2
---------------------------
** Improvement
* Update to latest framework version 2.0.2
Changes from 2.0.0 to 2.0.1
---------------------------
** Improvement
* Update to latest framework version 2.0.1
Changes from 1.8.1 to 2.0.0
---------------------------
** Improvement
* Update to latest framework version 2.0.0
Changes form 1.6.1 to 1.8.0
---------------------------
** Improvement
* Update to latest framework version 1.8.0
Changes from 1.6.0 to 1.6.1
---------------------------
** Improvement
* Update to latest framework version 1.6.1
Changes from 1.4.1 to 1.6.0
---------------------------
** Improvement
* Update to latest framework version 1.6.0
Changes from 1.4.0 to 1.4.1
---------------------------
* [2008-12-20] Update to latest framework version 1.4.0
* [2008-11-18] Modified the pom file to export the OSGi packages; this can be
helpful for tools trying to determine what the JAR file provides.
* [2008-11-07] Align log level property name in pom.xml and config.properties
Changes from 1.2.2 to 1.4.0
---------------------------
* [2008-10-31] Fixed a possible NPE when no configuration file is found.
* [2008-10-23] Change the name of the SystemBundle interface to be Framework.
(FELIX-753)
* [2008-10-22] Hide wire messages in felix releases. (FELIX-707)
* [2008-10-16] Modified framework to have default values for the system packages
property. Now it is really possible to start Felix with no configuration
properties. (FELIX-753)
* [2008-10-10] Implements support for flushing the cache on framework
initialization. (FELIX-755)
* [2008-10-09] Modified the bundle cache to no longer have profiles. (FELIX-754)
* [2008-10-08] Modified the Felix API to aligned with the proposed standard OSGi
framework API. (FELIX-753)
* [2008-09-23] Added symbolic names to framework and main.
* [2008-09-12] Added a configuration property to determine whether installing a
fragment that uses unimplemented features throws an exception or logs a
warning. (FELIX-725)
Changes form 1.2.1 to 1.2.2
---------------------------
* [2008-10-14] Update to latest framework version 1.2.2.
Changes from 1.2.0 to 1.2.1
---------------------------
* [2008-09-07] Hide WIRE log messages. (FELIX-707)
* [2008-09-07] Use the new Felix releases obr repository URL.
(FELIX-708)
Changes from 1.0.3 to 1.2.0
---------------------------
* [2008-08-03] Change to the R4.1 version of the spec. (FELIX-514)
* [2008-05-08] Fixed a NPE. (FELIX-525)
Changes from 1.0.3 to 1.0.4
---------------------------
* [2008-04-22] Update to framework version 1.0.4.
Changes from 1.0.1 to 1.0.3
---------------------------
* [2008-01-27] Added launching and embedding docs to main project.
* [2008-01-22] Update to maven-bundle-plugin version 1.2.0.
* [2008-01-07] Modifed default launcher in Main to separate out
auto-property processing so that it is easier to reuse the code in
custom launchers. (FELIX-448)
* [2007-12-14] Removed auto-property processing out of the framework and
into the default launcher. (FELIX-393)
* [2007-10-16] Use variable substitution via BND to define the properties
in default.properties from the properties in config.properties.
(FELIX-380)
* [2007-10-03] Added support to the Main launcher to use a default
embedded resource for setting the framework configuration properties
if the actual config.properties file cannot be loaded. (FELIX-380)
* [2007-09-20] Remove some packages for jre1.3 profile and add/remove a
few for 1.4, 1.5, and 1.6 (javax.crypto.*). (FELIX-371)
Changes from 1.0.0 to 1.0.1
---------------------------
* [2007-09-16] Update to framework version 1.0.1.
Changes from 0.8.0-incubator to 1.0.0
-------------------------------------
* [2007-01-31] Changed how the system packages property is calculated to
make it more robust; previously it was leaving a dangling comma if the
execution platform was not known.
* [2007-02-05] Added system package support for Java 6. (FELIX-201)
* [2007-02-13] Removed support for trusted certificate authorities; this
will be added later as an extension.
* [2007-03-16] Felix configuration properties can now be set as system
properties when using the standard launcher. (FELIX-250)
* [2007-03-28] No longer including config.properties in the JAR file.
* [2007-04-13] The javax.net and javax.net.ssl packages were missing
from the system packages properties.
* [2007-04-13] Fixed a bug where the launcher was not correctly calculating
the installation directory correctly.
* [2007-05-07] Was accidentally including OBR service interface package
in main JAR.
* [2007-05-22] Now includes the Service Tracker package in main JAR.
* [2007-07-04] Modified to use the new Felix embedding API.
felix-main-4.0.1.orig/doc/apache-felix-framework-usage-documentation.html 0000644 0001750 0001750 00000066360 11644652002 026340 0 ustar drazzib drazzib
Apache Felix - Apache Felix Framework Usage Documentation
Go to the downloads page and download the latest Felix framework distribution.
Starting the Framework
Start the framework from the installation directory by typing:
java -jar bin/felix.jar
The framework launcher starts the framework and installs and starts all bundles contained in the bundle
directory of the current directory. By default, the bundle directory
contains shell-related bundles providing a textual user interface to
interact with the framework. Bundles installed into the framework are
copied into a bundle cache directory for subsequent executions. By
default, the framework creates a cache directory, called felix-cache,
in your current working directory. If you want to start the framework
using a different bundle cache directory, you can do so like this:
java -jar bin/felix.jar <cache-path>
Where <cache-path> is the path you want to use as the
bundle cache. If you specify a relative cache path, then it will be
treated as relative to the current working directory.
Useful Information Previous
versions of the framework prompted for a profile name when executed.
The profile name was used to create a directory inside .felix/
in the user home directory. This approach allowed users to have
different sets of bundles for different purposes, e.g., testing,
production, etc. If this behavior is still desired, it is very easy to
mimic. Modify conf/config.properties to include "felix.cache.rootdir=${user.home}/.felix". Now, if you start Felix with something like "java -jar bin/felix.jar foo", it will use "${user.home}/.felix/foo/" as the bundle cache directory, where "${user.home}" is automatically substituted with the appropriate system property by the launcher.
Framework Shell
The main way to interact with the framework is via the supplied Apache Felix Gogo shell. After starting the framework, type help into the shell to see the list of the available commands and help <command-name> to get help for a specific command.
Useful Information In Gogo, command names are made up of two parts: <scope>:<name>. This is similar to a fully qualified class name in Java and is used to avoid naming collisions. If the <name> portion of the command is unique, then you only need to type it. If not, then you must either type the full <scope>:<name> or arrange the scope search path accordingly.
To install bundles, use the felix:install command, which is described in more detail in the next sub-section. To list installed bundles, use the felix:lb command. To stop the framework type stop 0
to stop the System Bundle; any installed bundles will automatically be
reloaded (and potentially restarted) the next time you launch with the
associated cache.
Installing Bundles
A bundle is the OSGi term for a component for the OSGi framework. A
bundle is simply a JAR file containing a manifest and some combination
of Java classes, embedded JAR files, native code, and resources. A
bundle may provide some specific functionality for the user or it may
implement a service that other bundles can use; bundles can only use
functionality from other bundles through shared services and packages.
The Felix framework distribution comes with three bundles, which are located in the bundle/
directory of the framework distribution installation directory. These
bundles include the Gogo Runtime (core command processing
functionality), Gogo Shell (text-based shell user interface), Gogo
Command (basic set of commands), and Bundle Repository (a bundle
repository service). In addition to these bundles, the bundle
repository provides access to other bundles for easy installation. The
bundle repository service provides a set of shell commands in the obr:* scope; refer to the Apache Felix OSGi Bundle Repository for more information.
Before installing any bundles, it is important to understand how
bundles are manually deployed into the framework. Bundles are deployed
in two stages; first they are installed, then they are started. To
install a bundle use the felix:install shell command followed by a bundle URL. For example, to install a bundle.jar bundle you type:
felix:install file:/path/to/bundle/bundle.jar
Once a bundle is installed, it can then be started by using the felix:start command and the bundle identifier of the desired bundle. The felix:lb
command is used to list installed bundles and to obtain the bundle's
identifier. The following Felix shell session illustrates how to start
the bundle.jar bundle:
The felix:stop command is used to stop a bundle and the felix:uninstall command is used to remove a bundle from the bundle cache. As an alternative to using the felix:install and felix:start commands explicitly, it is also possible to install and start a bundle in one step by using the felix:start command with a bundle URL.
Bundles can be updated using the felix:update command. The
update command allows you to specify an URL from which to retrieve the
updated bundle, but if one is not specified it will try to update the
bundle from the bundle's Bundle-UpdateLocation manifest attribute, if present, or the bundle's original location URL.
Useful Information When you use felix:update or felix:uninstall,
the changes appear to take effect immediately, but in reality the
changes are only partially enacted. If a bundle is updated or
uninstalled and it was exporting packages, these packages are not
removed until the framework is refreshed using the PackageAdmin service. The Felix shell offers a convenient refresh command for this purpose. This is the correct behavior as defined by the OSGi specification.
For an introduction to writing bundles and services, refer to the Felix bundle tutorial.
Web Proxy Issues when Installing Bundles
If you use a proxy for Web access, then you may run into difficulty
using the Gogo shell to install bundles from remote URLs. To remedy
this situation, certain system properties must be set to make the
framework work with your proxy. These properties are:
http.proxyHost - the name of the proxy host.
http.proxyPort - the port of the proxy host.
http.proxyAuth
- the user name and password to use when connecting to the proxy; this
string should be the user name and password separated by a colon (e.g.,
rickhall:mypassword).
These system properties can be set directly on the command line when starting the JVM using the standard "-D<prop>=<value>" syntax or you can put them in the lib/system.properties file of your Felix installation; see the next section on configuring Felix for more information.
Bundle Auto-Deploy
To minimize the amount of configuration necessary to install bundles
when you launch the framework, the Felix launcher uses the concept of
an "auto-deploy" directory. The Felix launcher deploys all bundles in
the auto-deploy directory into the framework instance during startup.
By default, the auto-deploy directory is "bundle" in the current directory, but it can be specified on the command line like this:
java -jar bin/felix.jar -b /path/to/dir
Specifying an auto-deploy directory replaces the default directory,
it does not augment it. The framework distribution is configured to
install and start bundles in the auto-deploy directory. Both the
location of the auto-deploy directory and the deployment actions
performed can be controlled by the following configuration properties,
respectively:
felix.auto.deploy.dir - Specifies the auto-deploy directory from which bundles are automatically deploy at framework startup. The default is the bundle/ directory of the current directory.
felix.auto.deploy.action
- Specifies the auto-deploy actions to be performed on the bundle JAR
files found in the auto-deploy directory. The possible actions are install, update, start, and uninstall.
If no actions are specified, then the auto-deploy directory is not
processed (i.e., it is disabled). There is no default value for this
property, but the default config.properties file installed with the Felix framework distribution sets the value to: install, start
The next section describes how to set and use configuration properties.
Configuring the Framework
Both the Felix framework and the launcher use configuration
properties to alter their default behavior. The framework can only be
configured by passing properties into its constructor, but the launcher
provides a mechanism to configure the framework via a property file.
The framework launcher reads configuration properties from conf/config.properties. This file uses standard Java property file syntax.
The launcher also supports setting system properties via the conf/system.properties
file. This file is purely for convenience when you need to repeatedly
set system properties when running the framework. While the framework
itself does not look at system properties, the launcher does copy any
framework configuration properties found in the system properties into
the framework configuration map, also for your convenience.
It is possible to specify different locations for these property files using the felix.config.properties and felix.system.properties system properties when executing the framework. For example:
Configuration and system properties are accessible at run time via BundleContext.getProperty(), but configuration properties override system properties.
The following configuration properties are for the launcher:
felix.auto.deploy.dir - Specifies the auto-deploy directory from which bundles are automatically deploy at framework startup. The default is the bundle/ directory of the current directory.
felix.auto.deploy.action
- Specifies a comma-delimited list of actions to be performed on bundle
JAR files found in the auto-deploy directory. The possible actions are install, update, start, and uninstall. An undefined or blank value is equivalent to disabling auto-deploy processing.
felix.auto.install.<n> - Space-delimited list of bundle URLs to automatically install when Felix is started, where <n> is the start level into which the bundle will be installed (e.g., felix.auto.install.2).
felix.auto.start.<n> - Space-delimited list of bundle URLs to automatically install and start when Felix is started, where <n> is the start level into which the bundle will be installed (e.g., felix.auto.start.2).
felix.shutdown.hook
- Specifies whether the launcher should install a shutdown hook to
cleanly shutdown the framework on process exit. The default value is true.
The following configuration properties are for the framework (properties starting with "felix" are specific to Felix, while those starting with "org.osgi" are standard OSGi properties):
org.osgi.framework.storage - Sets the directory to use as the bundle cache; by default bundle cache directory is felix-cache
in the current working directory. The value should be a valid directory
name. The directory name can be either absolute or relative. Relative
directory names are relative to the current working directory. The
specified directory will be created if it does not exist.
felix.cache.rootdir - Sets the root directory used to calculate the bundle cache directory for relative directory names. If org.osgi.framework.storage
is set to a relative name, by default it is relative to the current
working directory. If this property is set, then it will be calculated
as being relative to the specified root directory.
org.osgi.framework.storage.clean - Determines whether the bundle cache is flushed. The value can either be "none" or "onFirstInit", where "none" does not flush the bundle cache and "onFirstInit" flushes the bundle cache when the framework instance is first initialized. The default value is "none".
felix.cache.bufsize
- Sets the buffer size to be used by the cache; the default value is
4096. The integer value of this string provides control over the size
of the internal buffer of the disk cache for performance reasons.
org.osgi.framework.system.packages
- Specifies a comma-delimited list of packages that should be exported
via the System Bundle from the framework class loader. The framework
will set this to a reasonable default. If the value is specified, it
replaces any default value.
org.osgi.framework.system.packages.extra
- Specifies a comma-delimited list of packages that should be exported
via the System Bundle from the framework class loader in addition to
the packages in org.osgi.framework.system.packages. The default value is empty. If a value is specified, it is appended to the list of default or specified packages in org.osgi.framework.system.packages.
org.osgi.framework.bootdelegation
- Specifies a comma-delimited list of packages that should be made
implicitly available to all bundles from the parent class loader. It is
recommended not to use this property since it breaks modularity. The
default value is empty.
org.osgi.framework.bundle.parent - Specifies which class loader is used for boot delegation. Possible values are: boot for the boot class loader, app for the application class loader, ext for the extension class loader, and framework for the framework's class loader. The default is boot.
felix.bootdelegation.implicit
- Specifies whether the framework should try to guess when to
implicitly boot delegate to ease integration with external code. The
default value is true.
felix.systembundle.activators - A List of BundleActivator
instances that are started/stopped when the System Bundle is
started/stopped. The specified instances will receive the System
Bundle's BundleContext when invoked. (This property cannot be
set in the configuration file since it requires instances; it can only
be passed into Felix' constructor directly.)
felix.log.logger - An instance of Logger
that the framework uses as its default logger. (This property cannot be
set in the configuration file since it requires an instance; it can
only be passed into Felix' constructor directly.)
felix.log.level
- An integer value indicating the degree of logging reported by the
framework; the higher the value the more logging is reported. If zero
('0') is specified, then logging is turned off completely. The log
levels match those specified in the OSGi Log Service (i.e., 1 = error,
2 = warning, 3 = information, and 4 = debug). The default value is 1.
org.osgi.framework.startlevel.beginning - The initial start level of the framework once it starts execution; the default value is 1.
felix.startlevel.bundle - The default start level for newly installed bundles; the default value is 1.
felix.service.urlhandlers - Flag to indicate whether to activate the URL Handlers service for the framework instance; the default value is "true". Activating the URL Handlers service will result in the URL.setURLStreamHandlerFactory() and URLConnection.setContentHandlerFactory() being called.
The Felix framework distribution contains a default conf/config.properties.
Migrating from Earlier Versions
Apache Felix Framework 2.0.0 introduced some configuration property changes. This section describes the differences from older versions of the framework.
Removed
felix.embedded.execution - No longer needed, since the framework now never calls System.exit(); the creator of the framework is now always responsible for exiting the VM.
felix.strict.osgi - No longer needed, since all non-specification features have been removed.
felix.cache.dir - No longer needed, since Felix no longer uses bundle cache profiles for saving sets of bundles.
felix.cache.profile - No longer needed, since the framework no longer uses bundle cache profiles for saving sets of bundles.
felix.fragment.validation - No longer needed, since the framework supports fragments.
Renamed
felix.cache.profiledir - The equivalent of this property is now named org.osgi.framework.storage.
felix.startlevel.framework - The equivalent of this property is now named org.osgi.framework.startlevel.beginning.
Introduced
org.osgi.framework.system.packages.extra - New property, as described above, added to align with standard framework API.
org.osgi.framework.storage.clean - New property, as described above, added to align with standard framework API.
felix.cache.rootdir - Introduced as a result of removing bundle profiles to help resolve relative bundle cache directories.
For the most part, these changes are minor and previous behavior
achieved from older configuration properties is either easily attained
with the new properties or no longer necessary.
System Property Substitution
It is possible to use system properties to specify the values of properties in the conf/config.properties file. This is achieved through system property substitution, which is instigated by using ${<property>} syntax, where <property>
is the name of a system property to substitute. When the properties
file is read, any such property values are substituted as appropriate.
It is possible to have nested system property substitution, in which
case the inner-most property is substituted first, then the next inner
most, until reaching the outer most.
Configuring Bundles
Some bundles use properties to configure certain aspects of their
behavior. It is a good idea, when implementing bundles, to parameterize
them with properties where appropriate. To learn about the
configuration options for specific bundles, refer to the documentation
that accompanies them.
Bundle properties may also be defined in the conf/config.properties property file. Any property placed in this file will be accessible via BundleContext.getProperty()
at run time. The property file uses the standard Java property file
syntax (i.e., attribute-value pairs). For information on changing the
default location of this file, refer to the section on configuring Felix.