Ign*_*las 4 eclipse-plugin tycho maven
我正在尝试创建一个Eclipse插件,它依赖于普通的Maven工件.我创建了以下项目结构:
Parent POM
|- Dependencies (Third Party)
\- My Code
|- Bundle
\- Bundle Tests
Run Code Online (Sandbox Code Playgroud)
我已经关注了Tycho示例itp02,但只使用了第三方依赖项.据我所知,这个想法是将所有依赖项包装在一个包中,并将其用作我的包的输入.我设法正确构建和安装Dependencies包:创建一个jar,它包含从Maven存储库获取的所有JAR文件.但是当我尝试编译我的软件包时,我收到一条错误消息,说我的软件包清单中的软件包无法导入.
[ERROR] Missing requirement: MyPlugin 0.0.1.qualifier requires 'package org.apache.commons.lang.StringEscapeUtils 0.0.0' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from MyPlugin 0.0.1.qualifier to package org.apache.commons.lang.StringEscapeUtils 0.0.0.", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from MyPlugin 0.0.1.qualifier to package org.apache.commons.lang.StringEscapeUtils 0.0.0.", "No solution found because the problem is unsatisfiable."]
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
从您的描述中不清楚您的项目是如何设置的,或者是您用于构建项目的命令.然而,你的"POM父母"似乎暗示你试图一次性建立它.如果是这种情况,你不能在同一个构建中混合使用pom-first(maven-bundle-plugin)项目和manifest-first(eclispe-plugin)项目[1].您需要先将pom-first项目构建并安装到本地maven存储库中,然后才能构建清单优先项目.
要检查的第二件事是你已经配置了正确的依赖项,并且你已经设置了pomDependencies =如[2]中所述.
最后,如果这没有帮助,请检查本地maven存储库中的jar文件是否具有带有正确"Export-Package"语句的META-INF/MANIFEST.MF - 特别是org.apache.commons应该有一行. lang.StringEscapeUtils.
[2] http://git.eclipse.org/c/tycho/org.eclipse.tycho-demo.git/tree/itp02/build02/pom.xml
| 归档时间: |
|
| 查看次数: |
3712 次 |
| 最近记录: |