我需要在没有直接连接到互联网的服务器上运行Apache ServiceMix。我找不到适用于Apache ServiceMix 5.1.4的“完整”程序集。较旧版本的ServiceMix(4.5.3)具有完整版本可供下载。
是否有5.1.4的完整版本,如果可以,在哪里?
http://servicemix.apache.org/downloads/servicemix-5.1.4.html http://servicemix.apache.org/downloads/servicemix-4.5.3.html
多亏KSobkowiak的回答为我指明了正确的方向。我发布了我用来启动和运行自定义ServiceMix 5.x的步骤,以防其他人需要这样做。这些说明假定使用Linux,但Windows步骤应相似。
1)下载并解压缩ServiceMix和Maven
cd /opt
unzip apache-servicemix-5.1.4.zip
unzip apache-maven-3.0.3.zip
2)配置Maven代理,如果需要的话:
3)创建一个maven项目目录
mkdir serviceMix_features
cd serviceMix_features
4)使用以下xml创建一个maven pom文件。我通过features:listurl
在servicemix控制台中运行命令来获取描述符列表。这些功能将是您自定义servicemix发行版中所需的功能,在这种情况下,我将添加webconsole和几个骆驼组件。
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>my.group</groupId>
<artifactId>custom-servicemix</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>My custom service mix repository</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>features-maven-plugin</artifactId>
<version>2.3.9</version>
<executions>
<execution>
<id>add-features-to-repo</id>
<phase>generate-resources</phase>
<goals>
<goal>add-features-to-repo</goal>
</goals>
<configuration>
<descriptors>
<descriptor>mvn:org.apache.camel.karaf/apache-camel/2.13.3/xml/features</descriptor>
<descriptor>mvn:org.apache.servicemix/apache-servicemix/5.1.4/xml/internal</descriptor>
<descriptor>mvn:org.apache.activemq/activemq-karaf/5.10.0/xml/features</descriptor>
<descriptor>mvn:org.apache.karaf.assemblies.features/standard/2.3.9/xml/features</descriptor>
<descriptor>mvn:org.apache.karaf.assemblies.features/enterprise/2.3.9/xml/features</descriptor>
<descriptor>mvn:org.apache.jclouds.karaf/jclouds-karaf/1.7.2/xml/features</descriptor>
<descriptor>mvn:org.apache.cxf.karaf/apache-cxf/2.7.13/xml/features</descriptor>
<descriptor>mvn:org.apache.servicemix/apache-servicemix/5.1.4/xml/features</descriptor>
<descriptor>mvn:org.apache.servicemix/apache-servicemix/5.1.4/xml/examples</descriptor>
<descriptor>mvn:org.ops4j.pax.cdi/pax-cdi-features/0.8.0/xml/features</descriptor>
<descriptor>mvn:org.apache.activemq/activemq-karaf/5.10.0/xml/features-core</descriptor>
</descriptors>
<features>
<feature>webconsole</feature>
<feature>camel-restlet</feature>
<feature>camel-jackson</feature>
</features>
<repository>target/features-repo</repository>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
5)执行Maven项目。我注意到,有时行家会通过一部分而失败。重试后,我注意到它每次运行都拉入了其他的广口瓶,最后在第四次尝试中成功了。
/opt/apache-maven-3.0.3/bin/mvn install
6)将Maven文件覆盖在默认服务组合发行版上。
cp -Rvn target/features_repo/* /opt/apache-servicemix-5.1.4/system/
7)将您的自定义服务组合发行版压缩或压缩,然后将其移动到需要的位置。如果您使用的是代理,则可以取消配置Maven代理并清除Maven存储库,以验证是否已从服务组合控制台更新了服务组合。
features:install webconsole
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句