【问题标题】:Maven Build Failure for chat-jc sample of spring security 4.0spring security 4.0 的 chat-jc 示例的 Maven 构建失败
【发布时间】:2015-03-29 08:28:24
【问题描述】:

当我尝试编译 spring security 4.0 的 chat-jc 示例时出现 maven 构建失败

首先,我用这个命令下载了示例代码。

git clone https://github.com/spring-projects/spring-security.git

之后,我将目录更改为 /samples/chat-jc 和“mvn compile”。 我得到了这个结果

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.springframework.security:spring-security-samples-chat-jc:war:4.0.0.CI-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 246, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building spring-security-samples-chat-jc 4.0.0.CI-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/thymeleaf/thymeleaf-spring4/1.2.7.RELEASE/thymeleaf-spring4-1.2.7.RELEASE.pom
[WARNING] The POM for org.thymeleaf:thymeleaf-spring4:jar:1.2.7.RELEASE is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/redis/embedded/embedded-redis/0.2/embedded-redis-0.2.pom
[WARNING] The POM for redis.embedded:embedded-redis:jar:0.2 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/org/thymeleaf/thymeleaf-spring4/1.2.7.RELEASE/thymeleaf-spring4-1.2.7.RELEASE.jar
Downloading: https://repo.maven.apache.org/maven2/redis/embedded/embedded-redis/0.2/embedded-redis-0.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.366 s
[INFO] Finished at: 2015-03-29T07:40:37+08:00
[INFO] Final Memory: 10M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project spring-security-samples-chat-jc: Could not resolve dependencies for project org.springframework.security:spring-security-samples-chat-jc:war:4.0.0.CI-SNAPSHOT: The following artifacts could not be resolved: org.thymeleaf:thymeleaf-spring4:jar:1.2.7.RELEASE, redis.embedded:embedded-redis:jar:0.2: Failure to find org.thymeleaf:thymeleaf-spring4:jar:1.2.7.RELEASE in https://repo.spring.io/snapshot was cached in the local repository, resolution will not be reattempted until the update interval of spring-snasphot 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

我找不到这两个信息

org.thymeleaf:thymeleaf-spring4:jar:1.2.7.RELEASE
redis.embedded:embedded-redis:jar:0.2

http://search.maven.org/

我怎样才能成功编译这个项目?

感谢您的阅读......

【问题讨论】:

  • 我认为 pom 已经过时了;尝试将thymeleaf thymeleaf-spring4都设置为版本2.1.4.RELEASE
  • 我更改了版本,thymeleaf-spring4 问题解决了。但是我仍然有嵌入式redis的问题。谢谢@ᴳᵁᴵᴰᴼ
  • 感谢您的报告。我添加了jira.spring.io/browse/SEC-2927

标签: maven spring-security


【解决方案1】:

我认为 pom 已经过时了;试试:

<dependency>
    <groupId>com.orange.redis-embedded</groupId>
    <artifactId>embedded-redis</artifactId>
    <version>0.6</version>
</dependency>

对于 redis(他们更改了 groupId,0.6 是最新版本;您可能想尝试 0.4,如果无法编译,则可能要尝试 0.3.8)。

对于thymeleafthymeleaf-spring4 也使用版本2.1.4.RELEASE

【讨论】:

    猜你喜欢
    • 2013-11-13
    • 2016-09-30
    • 2013-12-03
    • 2014-08-26
    • 2014-08-15
    • 2011-01-30
    • 2021-07-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多