Maven 在Intellj Idea中构建OSGi项目

Maven 在Intellj Idea中构建OSGi项目,maven,intellij-idea,osgi,osgi-bundle,Maven,Intellij Idea,Osgi,Osgi Bundle,我正在尝试用Intellij Idea创建一个OSGi maven项目。这是一个简单的计算器。当我尝试构建项目时,控制台上会显示以下错误消息。 原因可能是什么 错误消息如下所示: [INFO] Scanning for projects... [INFO] [INFO] -----------------------------------------

我正在尝试用Intellij Idea创建一个OSGi maven项目。这是一个简单的计算器。当我尝试构建项目时,控制台上会显示以下错误消息。 原因可能是什么

错误消息如下所示:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building cal 1.0.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.osgi:org.eclipse.osgi:jar:3.9.1.v20130814-1242 
is     missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.445s
[INFO] Finished at: Fri May 23 09:22:30 IST 2014
[INFO] Final Memory: 6M/146M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project cal: Could not resolve dependencies 
for    project org.wso2.nilash:cal:jar:1.0.0: Failure to find
org.eclipse.osgi:org.eclipse.osgi:jar:3.9.1.v20130814-1242 in
http://repo.maven.apache.org/maven2 was cached in the local repository,
 resolution will not be reattempted until the update interval of central has elapsed   or     updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the     following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN    /DependencyResolutionException
<dependency>
        <groupId>org.eclipse.osgi</groupId>
        <artifactId>org.eclipse.osgi</artifactId>
        <version>3.9.1.v20130814-1242</version>
    </dependency>
我还在pom.xml中添加依赖项,如下所示:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building cal 1.0.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.osgi:org.eclipse.osgi:jar:3.9.1.v20130814-1242 
is     missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.445s
[INFO] Finished at: Fri May 23 09:22:30 IST 2014
[INFO] Final Memory: 6M/146M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project cal: Could not resolve dependencies 
for    project org.wso2.nilash:cal:jar:1.0.0: Failure to find
org.eclipse.osgi:org.eclipse.osgi:jar:3.9.1.v20130814-1242 in
http://repo.maven.apache.org/maven2 was cached in the local repository,
 resolution will not be reattempted until the update interval of central has elapsed   or     updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the     following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN    /DependencyResolutionException
<dependency>
        <groupId>org.eclipse.osgi</groupId>
        <artifactId>org.eclipse.osgi</artifactId>
        <version>3.9.1.v20130814-1242</version>
    </dependency>

org.eclipse.osgi
org.eclipse.osgi
3.9.1.v20130814-1242

我还添加了不同的版本。但它不起作用

控制台输出本身包含一个提示,说明问题的原因

从:

此错误通常发生在Maven无法下载时 依赖关系。此错误的可能原因是:

  • POM遗漏了托管工件的对象的声明
  • 您配置的存储库需要身份验证,Maven无法向服务器提供正确的凭据。在这个 在这种情况下,请确保
    ${user.home}/.m2/settings.xml
    包含
    声明,其
    与遥控器的
    匹配 要使用的存储库。有关更多详细信息,请参阅
  • 有问题的远程存储库使用SSL,运行Maven的JVM不信任服务器的证书
  • 存在阻止Maven访问任何远程存储库的一般网络问题,例如缺少代理配置
  • 您已将Maven配置为执行严格的校验和验证,要下载的文件已损坏
  • Maven未能将文件保存到本地存储库,请参阅以了解更多详细信息

  • 如果在本地Maven存储库中缓存了不兼容版本的JAR,也会出现类似的问题。在这种情况下,您还应该尝试使用
    -U
    命令行参数来构建项目(
    mvn clean install-U
    应该可以做到这一点),或者手动清理本地存储库(位于
    ${user.home}/.m2/repository
    目录,然后触发生成。

    在我看来,错误文本中解释了原因。您是否阅读了它链接到的帮助文档?