我对intellij想法不熟悉。
我试图添加一个依赖项(例如)jcl-over-slf4:jar但是没有添加,这里是日志中的错误。
017-12-02 14: 40: 41,903 [6473161] INFO - # org.jetbrains.idea.maven - org.apache.maven.project.ProjectBuildingException: some problems occurred while processing POM:
[ERROR] 'dependencies.dependency.groupId' for: jcl-over-slf4: jar is missing. @line 31, column 16
我关闭了Idea并删除了.IntelliJIdea14 \ system \ Maven \ Indices中的所有内容并清除了整个.m2 \ repository目录
重新启动了Idea并在设置中尝试连接到中央maven存储库,但第一次加载缓慢。现在它根本不加载 enter image description here
我打开了自动导入并关闭了防火墙和防病毒软件。允许访问Internet。设置VM选项-Xmx1024m
但问题仍然存在。
enter image description here
但.m2 / repository文件夹的大小只有27兆字节(你需要270个)。
版本14.1.6的想法。
这是我的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>spring</groupId>
<artifactId>spring-test-app</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>spring-test-app Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.11.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.11.RELEASE</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4</artifactId>
</dependency>
</dependencies>
<build>
<finalName>spring-test-app</finalName>
</build>
</project>
我还应该做什么来加载所有依赖项?
答案 0 :(得分:1)
向依赖项添加版本,例如
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>