有问题的行是这个特性片段中的第一个包。
<feature name="stuff-common-security">
<bundle>wrap:mvn:org.springframework/ldap/1.3.0.RELEASE,mvn:com.mycompany.stuff/stuff-common-security/1.0-SNAPSHOT/bnd/spring-ldap</bundle>
<bundle>mvn:org.springframework.security/spring-security-core/3.1.0.RELEASE</bundle>
<bundle>mvn:org.springframework.security/spring-security-ldap/3.1.0.RELEASE</bundle>
<bundle>mvn:com.mycompany.stuff/stuff-common-security/1.0-SNAPSHOT</bundle>
</feature>创建-kar目标在以下错误中失败:
[ERROR] Failed to execute goal org.apache.karaf.tooling:features-maven-plugin:2.2.9:create-kar (create-kar) on project stuff-demo:
Failed to create kar archive:
Could not find artifact org.springframework:ldap:stuff-common-security:1.0-SNAPSHOT:1.3.0.RELEASE,mvn:com.mycompany.stuff
in maven.mycompany.com (http://maven.mycompany.com/artifactory/libs-release-local)
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.springframework -DartifactId=ldap
-Dversion=1.3.0.RELEASE,mvn:com.mycompany.stuff -Dclassifier=1.0-SNAPSHOT
-Dpackaging=stuff-common-security -Dfile=/path/to/file这似乎是错误地解析了包元素文本,并将包装器作为版本号的一部分。
<bundle>wrap:mvn:org.springframework/ldap/1.3.0.RELEASE,mvn:com.mycompany.stuff/stuff-common-security/1.0-SNAPSHOT/bnd/spring-ldap</bundle>Karaf本身就像蛤蜊一样,对这个包语法很满意,所以我不认为我犯了错误。
有其他方法可以表达这一点吗?这样我就不会从create中得到这个错误了?
发布于 2013-03-27 00:29:20
尝试用'\‘或使用CDATA部分转义逗号(我在邮寄名单上注意到了一些转义问题):
<bundle><![CDATA[
wrap:mvn:org.springframework/ldap/1.3.0.RELEASE,mvn:com.mycompany.stuff/stuff-common-security/1.0-SNAPSHOT/bnd/spring-ldap
]]></bundle>如果这不起作用的话--我怀疑插件没有使用实际的URL处理程序,只是去掉了wrap协议,所以建议将错误归档
在使用分类器时,您可能只想在stuff-common-security的pom中进行嵌入,但这可能会使您的构建过于毛茸茸的]。
如果是这样,则创建一个仅以这两个模块为依赖项的maven模块,然后使用BND/maven-bundle-plugin的嵌入依赖关系将它们合并。
https://stackoverflow.com/questions/15375077
复制相似问题