Spring 错误:Maven2RepositoryLayoutFactory:不支持的旧存储库布局
我从maven处收到以下错误消息:Spring 错误:Maven2RepositoryLayoutFactory:不支持的旧存储库布局,spring,maven,log4j,Spring,Maven,Log4j,我从maven处收到以下错误消息: [ERROR] Failed to execute goal on project battleships: Could not resolve dependencies for project com.miteff.travelex:battleships:wa r:2.0.0-BUILD-SNAPSHOT: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, com.s
[ERROR] Failed to execute goal on project battleships: Could not resolve dependencies for project com.miteff.travelex:battleships:wa
r:2.0.0-BUILD-SNAPSHOT: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, com.sun.jdmk:jmxtools:jar:1.2.1, com.s
un.jmx:jmxri:jar:1.2.1: Could not transfer artifact javax.jms:jms:jar:1.1 from/to java.net (https://maven-repository.dev.java.net/no
nav/repository): Cannot access https://maven-repository.dev.java.net/nonav/repository with type legacy using the available connector
factories: BasicRepositoryConnectorFactory: Cannot access https://maven-repository.dev.java.net/nonav/repository with type legacy u
sing the available layout factories: Maven2RepositoryLayoutFactory: Unsupported repository layout legacy -> [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
我有一个几乎空白的带有log4j的Spring项目。Log4j是这样注册的
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
</dependency>
log4j
log4j
1.2.15
我知道有两种解决方案:
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<scope>runtime</scope>
</dependency>
log4j
log4j
1.2.15
运行时
我发现解决这个问题的唯一方法是使用简单的maven 2端项目,将失败的依赖项放入其中。然后我在这个项目上运行maven 2,依赖项下载良好,然后maven 3找到它们
我尝试使用“始终”更新策略,但并不总是有效。在pom.xml中显示您的存储库配置pom.xml中没有添加其他存储库。谢谢@joro您刚刚为我节省了一些时间!;)