We Are Going To Discuss About Maven: missing artifact org.springframework:spring:jar:4.2.6. So lets Start this Java Article.
Maven: missing artifact org.springframework:spring:jar:4.2.6
- Maven: missing artifact org.springframework:spring:jar:4.2.6
What worked for me is that I deleted
/Users/username/.m2/repository/org/springframework/spring/
directory
and then runmvn clean install
command in my project.
That way Maven downloaded the real .jar file that was previously I guees not recognized. - Maven: missing artifact org.springframework:spring:jar:4.2.6
What worked for me is that I deleted
/Users/username/.m2/repository/org/springframework/spring/
directory
and then runmvn clean install
command in my project.
That way Maven downloaded the real .jar file that was previously I guees not recognized.
Solution 1
I’m quite sure there is no artifact called “spring”
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId> <!-- *** spring doesn't *** exist -->
<version>4.2.6</version>
</dependency>
Depending on the Spring components you need, you should basically include these dependencies:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.2.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.2.6.RELEASE</version>
</dependency>
In my Spring project, I include the Spring artifacts via a BOM (Bill of Materials):
<properties>
<spring.version>4.2.6.RELEASE</spring.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</dependency>
<!-- more -->
</dependencies>
Original Author JimHawkins Of This Content
Solution 2
What worked for me is that I deleted
/Users/username/.m2/repository/org/springframework/spring/
directory
and then run mvn clean install
command in my project.
That way Maven downloaded the real .jar file that was previously I guees not recognized.
Original Author user9347049 Of This Content
Solution 3
Maven by default downloads the required dependencies to your local repository so they can be accesses faster next time. Maybe the dependency is either corrupted, or removed from your local disk? Did you check that C:\Users\jublikon.m2\repository\org\springframework\spring\4.2.6\spring-4.2.6.jar actually exists and is a valid spring jar file?
Original Author Nadir Of This Content
Solution 4
What worked for me was I downloaded the jar files from mvnrepository I added them from build path and then I did clean compile install in Maven build and then validate the project and then update the project and the errors are gone.
Original Author Utkarsh Singh Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.