免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1534 | 回复: 0
打印 上一主题 下一主题

Building Felix [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-20 16:18 |只看该作者 |倒序浏览

A based start to checking-out and building felix. (
http://felix.apache.org/site/building-felix.html
)
1.       Introduction
1.1   What is OSGi?    (
http://en.wikipedia.org/wiki/OSGi
)
The OSGi Alliance (formerly known as the Open Services Gateway initiative, now an obsolete name) is an open
standards organization
founded in March 1999. The Alliance and its members have specified a
Java
-based
service
platform that can be remotely managed. The core part of the specifications is a
framework
that defines an
application life cycle management
model, a
service registry
, an Execution environment and Modules. Based on this framework, a large number of OSGi Layers,
APIs
, and Services have been defined.
The term OSGi generally refers to either the OSGi Alliance organization or the OSGi Service Platform technology. The OSGi Alliance is an independent corporation whose purpose is to define a specification to deliver services over wide-area networks to local-area networks and devices. The OSGi Alliance has numerous corporate and individual participants who are ultimately responsible for defining the features of the OSGi Service Platform. The OSGi Alliance releases a detailed specification describing the features and capabilities of its OSGi Service Platform, which can then be freely implemented by anyone. For more more information on OSGi or to retrieve the specification, refer to the OSGi Alliance web site.
1.2   What is Felix?    (
http://felix.apache.org/site/index.html
)
Felix is a community effort to implement the OSGi R4 Service Platform, which includes the OSGi framework and standard services, as well as providing and supporting other interesting OSGi-related technologies. The ultimate goal is to provide a completely compliant implementation of the OSGi framework and standard services and to support a community around this technology. Felix currently implements a large portion of the OSGi release 4 specification, but additional work is necessary for full compliance. Despite this fact, the OSGi framework functionality provided by Felix is very stable.
OSGi technology originally targeted embedded devices and home services gateways, but it is ideally suited for any project that is interested in principles of modularity, component-oriented, and/or service-orientation. OSGi technology combines aspects of these aforementioned principles to define a dynamic service deployment framework that is amenable to remote management. As an example of a simple use case, Felix can be easily embedded into other projects and used as a plugin or dynamic extension mechanism; it serves this purpose much better than other systems that are used for similar purposes, such as Java Management Extensions (JMX).
2.       Install JDK(Java Development Kit)
2.1   download Java
you want to be able to write your own Java programs that you can compile and run, then you must download the SDK (Software Developers Kit). If you just want to be able to run a Java program that has already been compiled, then you can get away with just downloading the JRE (Java Runtime Environment). Once you have decided which you need, download either the SDK or the JRE. Choose the download that is most suitable for your operating system.
Download jdk-1_5_0-windows-i586.exe
2.2   Setting up your Java environment
You need to set your PATH environment variable so the JVM and Java™ applications run correctly. This is extremely important for the success of your installation because the PATH variable enables your operating system to find the appropriate programs from any directory. If you have more than one JVM installed, the JVM you want to use must appear before any of the others in the PATH variable.
To check the PATH environment variable:
l         In a command window, type the following:
java -version
If the path is set correctly, you will see a printout telling you the version of your JVM.
l         If the command does not return the correct version of your JVM, set the PATH variable by adding the bin subdirectory of the JVM directory to the beginning of the path. For example, if the directory is C:\JDK1.5, add C:\JDK1.5\bin to the beginning of the path.
l         Repeat step 1 to make sure the PATH environment variable is set correctly.

3.       Maven    (
http://en.wikipedia.org/wiki/Apache_Maven
)
Maven is a software tool for Java project management and build automation created by Sonatype's Jason van Zyl in 2002. It is similar in functionality to the Apache Ant tool, but is based on different concepts. Maven is hosted by the Apache Software Foundation, where it was formerly part of the Jakarta Project.
Maven uses a construct known as a
Project Object Mode
l (POM) to describe the software project being built, its dependencies on other external modules and components, and the build order. It comes with pre-defined targets for performing certain well defined tasks such as compilation of code and its packaging.
Download and install the latest Maven 2 release. (
http://maven.apache.org/download.html
)
Download binary package:  apache-maven-2.2.1-bin.tar.bz2
Download source package:  apache-maven-2.2.1-src.tar.gz
Install Maven: Run the bin\mvn.bat, the directory “C:\Program Files\apache-maven-2.2.1” and “C:\Documents and Settings\hz\.m2\repository” will be created.
Building a Project: mvn clean install
4.       Check Out The Felix Trunk
svn checkout http://svn.apache.org/repos/asf/felix/trunk
5.       Build and Install
Go to the top of the project and type: "mvn -Dpackaging=plugins install" and then "mvn -Dpackaging=bundle install" to build the project.
6.       Run Felix Framework
To run the newly built framework, cd into main and type "java -jar bin/felix.jar".
Run ps command, error info “no impl service available”.
Download felix.jar from
http://felix.apache.org
website, replace main\bin\felix.jar.









本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/100479/showart_2074175.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP