【发布时间】:2019-03-29 10:43:16
【问题描述】:
我能够在一个新模块中组装一个具有标准和 webconsole 功能的 karaf 容器:
<dependencies>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<type>kar</type>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>standard</artifactId>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${org.apache.karaf.features.framework.version}</version>
<extensions>true</extensions>
<configuration>
<bootFeatures>
<feature>standard</feature>
<feature>webconsole</feature>
</bootFeatures>
</configuration>
</plugin>
</plugins>
</build>
现在,我想做更多的事情,我想将我的其他模块/代码添加到这个容器中以一起启动它并测试我的代码、我的 REST 调用等等......
我的一个模块是这样的:
<artifactId>config-testutils</artifactId>
<properties>
<bundle.symbolicName>${project.groupId}.${project.artifactId}</bundle.symbolicName>
<bundle.namespace>${project.groupId}.${project.artifactId}</bundle.namespace>
</properties>
<name>${project.groupId}.${project.artifactId}</name>
<packaging>jar</packaging>
如何添加这些模块以查看它们在我正在组装的这个 Karaf 中是否正常工作?除了手动放入部署文件夹之外,还有其他方法吗?
【问题讨论】: