【问题标题】:Spring Framework: catalina.start.osgiSpring框架:catalina.start.osgi
【发布时间】:2012-01-12 23:36:19
【问题描述】:

我正在阅读本教程以在实践中了解一些有关 OSGI 的知识https://sites.google.com/site/springosgi/ch01.html

我被困在 1.3 上,当我转到“应用 > 运行”时,我得到构建失败

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.741s
[INFO] Finished at: Tue Nov 22 23:16:54 EST 2011
[INFO] Final Memory: 3M/54M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project spring-osgi-tp: Could not resolve dependencies for project org.springframework.osgi:spring-osgi-tp:pom:1.1.3: Could not find artifact org.springframework.osgi:catalina.start.osgi:jar:SNAPSHOT-1.0 in eclipse-repository (http://repo1.maven.org/eclipse/) -> [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

下载时我收到此警告

[WARNING] The POM for org.springframework.osgi:catalina.start.osgi:jar:SNAPSHOT-1.0 is missing, no dependency information available

我进行了一些搜索,发现一个线程似乎在说人工制品在以下 repo 中

    <repository>
        <id>i21-s3-osgi-repo</id>
        <name>i21 osgi artifacts repo</name>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <url>http://maven.springframework.org/osgi</url>
    </repository>

如果我注释掉有问题的依赖关系,那么它会正确构建,尽管我想随着教程的深入,我将需要这个包来启动 Tomcat,有没有人能在这个领域给我一些指示,因为我比较新到 Spring 和 OSGi?

【问题讨论】:

  • 嗨,您找到解决方案了吗?

标签: java spring maven osgi catalina


【解决方案1】:

您应该注释掉有问题的依赖项。而是将上面指定的repository 添加到您的settings.xml 中,以便在下载依赖项时也会引用它。

此外,不确定它们是否是复制/粘贴错误,但这些行看起来很可疑。

... 存储库 (http://repo1.maven.org/eclipse/) -> [帮助 1]

这是一个无效的存储库

... start.osgi:jar:SNAPSHOT-1.0 丢失

版本号看起来不对...

【讨论】:

  • 对不起,我忘了提到这个存储库已经包含在 pom.xml 文件中,它似乎没有做任何事情。我不知道如何验证 repo 是否有效。
【解决方案2】:

尝试改变

<dependency>
        <groupId>org.springframework.osgi</groupId>
        <artifactId>catalina.start.osgi</artifactId>
        <version>1.0-SNAPSHOT</version>
</dependency>

<dependency>
        <groupId>org.springframework.osgi</groupId>
        <artifactId>catalina.start.osgi</artifactId>
        <version>1.0.0</version>
</dependency>

在 SpringDM 教程下载中找到依赖项 在文件夹 lib 中

复制文件 catalina.start.osgi.x.x.x.jar 给你 maven 仓库\org\springframework\catalina.start.osgi\1.0.0

【讨论】:

  • repo 下没有 catalina.start.osgi apth。 1.0.0 也不起作用
【解决方案3】:

同样的问题; 我下载了catalina.start.osgi_1.0.0.jar 并从本地仓库获取。

【讨论】:

    猜你喜欢
    • 2015-04-01
    • 2023-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-31
    • 2015-10-23
    相关资源
    最近更新 更多