pax construct

本文介绍如何使用Pax-Construct快速创建并部署OSGi项目。首先需要安装Java运行环境及Maven2,并将Pax-Construct脚本添加到环境变量中。接着通过命令创建OSGi项目及示例bundle,最后利用Maven进行构建并部署到Felix容器。

 http://www.ops4j.org/projects/pax/construct/  pax construct

 

To use Pax-Construct you need a Java runtime (preferably 1.4 or above) and Maven2 installed and on your path.
NOTE: if you have an old copy of the scripts installed, you can update them using the pax-update command.

http://repo1.maven.org/maven2/org/ops4j/pax/construct/scripts/1.4/scripts-1.4.zip

  1. Unzip the Pax-Construct scripts
  2. Add the scripts to your path

    Linux / UNIX / Mac

    PATH=/tmp/pax-construct-1.4/bin:$PATH; export PATH

    Windows

    set PATH=C:/Temp/pax-construct-1.4/bin;%PATH%
  3. Create a new OSGi project
    pax-create-project -g examples -a test
  4. Create an example bundle in your new project
    cd test

    pax-create-bundle -p org.example.pkg -n test.bundle
  5. Build and deploy to Felix
    mvn clean install pax:provision
  6. Create Eclipse project files (with source where available)
    mvn pax:eclipse -DdownloadSources
  7. Import project into Eclipse ( File -> Import -> Existing project... )
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值