ServiceMix(五) bundles in ServiceMix
来源:互联网 发布:香港恒生指数年度数据 编辑:程序博客网 时间:2024/03/29 16:24
距离上一次写ServiceMix相关内容已经有一个月的时间了,在这段时间里为一个ServiceMix下的项目进行了测试,同时也学习了一些ServiceMix的相关内容。相比之下,比较重要的内容还有configurationadmin,spring dm等,但是这里先解决前面留下的一个问题,就是在ServiceMix下的包需要遵循什么样的条件。
首先,取项目中的pom.xml的一段内容:
<build>
<plugins>
<plugin>
<groupId>*</groupId>
<artifactId>*</artifactId>
<version>2.3.4</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Description>${project.description}</Bundle-Description>
<Import-Package>
*
</Import-Package>
<Private-Package>*</Private-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>*</groupId>
<artifactId>*</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<goals>
<goal>generate-features-xml</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
这里有部分内容用*代替了,作为一个实习生,不知道哪些内容是可以透露的。项目是使用Maven来生成的,可以看出是作为一个Plugin存在,所以应该也可以通过Eclpise建立plugin来完成包的创建。
首先,取项目中的pom.xml的一段内容:
<build>
<plugins>
<plugin>
<groupId>*</groupId>
<artifactId>*</artifactId>
<version>2.3.4</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Description>${project.description}</Bundle-Description>
<Import-Package>
*
</Import-Package>
<Private-Package>*</Private-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>*</groupId>
<artifactId>*</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<goals>
<goal>generate-features-xml</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
这里有部分内容用*代替了,作为一个实习生,不知道哪些内容是可以透露的。项目是使用Maven来生成的,可以看出是作为一个Plugin存在,所以应该也可以通过Eclpise建立plugin来完成包的创建。
这是一个bundle的结构,最上层是包的名字。META-INF下的maven目录内有pom文件。最重要的内容在spring目录下的Manifest.mf文件中。
以下是一个完整的manifest.mf文件:
Manifest-Version: 1.0
Export-Package: 。。。。。。
Export-Package: 。。。。。。
Implementation-Title:
Implementation-Version: 0.0.1
Built-By:
Built-By:
Tool: Bnd-0.0.357
Bundle-Name:
Created-By: Apache Maven Bundle Plugin
DynamicImport-Package: *
Build-Jdk: 1.6.0_22
Bundle-Version: 0.0.1
Bnd-LastModified: 1312945778209
Bundle-ManifestVersion: 2
Bundle-Description:
Bundle-Name:
Created-By: Apache Maven Bundle Plugin
DynamicImport-Package: *
Build-Jdk: 1.6.0_22
Bundle-Version: 0.0.1
Bnd-LastModified: 1312945778209
Bundle-ManifestVersion: 2
Bundle-Description:
Bundle-SymbolicName:
Import-Package: 。。。。
其中最重要的两个内容是Export-Package和Import-Package,主要目的是指出这个bundle对外开放了哪些包和需要引用到哪些包。
bundles之间的引用主要就是通过这种方法来完成。当然,也有更高级的方式来完成这些功能,比如说使用springdm,由于学习不精,所以目前还没有能力对其进行说明。
- ServiceMix(五) bundles in ServiceMix
- ServiceMix
- ServiceMix(四) bundles之间的简单沟通
- ServiceMix(一)
- ServiceMix(二) 控制台简介
- Aggregate Services in ServiceMix JBI ESB
- servicemix-bean
- ServiceMix 初试
- serviceMix https
- serviceMix监听
- Apache ServiceMix-002-ServiceMix是什么
- ServiceMix(一) 基础知识和安装
- ServiceMix(三) 部署简单的项目
- Apache ServiceMix 介绍
- ServiceMix教程2.0.2
- Apache ServiceMix 介绍
- ServiceMix与Camel区别
- camel servicemix 重要命令
- 在.net执行sql脚本的简单实现
- ServiceMix(二) 控制台简介
- ServiceMix(三) 部署简单的项目
- ServiceMix(四) bundles之间的简单沟通
- 西安停车场将设立城市一卡通结算平台
- ServiceMix(五) bundles in ServiceMix
- 衡水年内计划发放万张农民工“一卡通” 防止拖欠工资
- 金融社保IC卡将逐步拓展到民政计生等领域
- 发力城市一卡通,创建物联网信息化城市
- 湖北荆州农民用IC卡配肥种田
- jQuery学习笔记
- CollectGarbage函数--JS清理垃圾,内存释放
- 模板替换与系统常量
- 基于注解的SpringMVC配置的详解