I'm learning spring, I do my firzt steps. I have a learning project. When I opened a project, it writes: java: package org.springframework.context does not exist
My project - https://github.com/anatoliy19/2.1.4.git
What should I add to my project?
My pom.xml
4.0.0
<groupId>ru.javamentor</groupId>
<artifactId>spring-types-of-wiring</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.14</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.14</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.3.14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatestplus</groupId>
<artifactId>junit-4-12_2.13</artifactId>
<version>3.2.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>
CodePudding user response:
Have you tried to execute
mvn clean install
command in your terminal? Also, sometimes dependencies of maven get corrupted, so it is required to remove the content of your .m2 folder
c:\users\username\.m2
and after that do the
mvn clean install
from your terminal