Eclipse throws error when adding springframework dependency to maven.pom

I created a Maven project in Eclipse using the webapp artifact and placed the following lines in a .pom file after reading an online tutorial.

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring</artifactId>
  <version>3.0.5.RELEASE</version>
</dependency>

However, the textbook version 2.5.6. I replaced it with 3.0.5.RELEASE, given its latest version.

But for this version, eclipse throws an error

Missing artifact org.springframework:spring:jar:3.0.5.RELEASE:compile

What does it mean? Can I add the necessary jar files to the lib folder and ask the .pom file to get it from there, as is done in another tutorial on the spring website that uses Ant?

In addition, Maven projects have a different directory structure and seem to do much more than Ant in the original spring tutorial.

maven. - java. spring w260 mvc hello world apache tomcat. Ant . spring , , Maven , Ant. , .

+3
2

3 Spring Spring all-in-one.

: spring.jar, .

:


<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>${artifactId}</artifactId>
    <version>3.0.5.RELEASE</version>
</dependency> 

${artifactId} , ,

  • spring-context ( IOC, ApplicationContext)
  • spring-orm ( ORM: Hibernate, JPA, (I | My) Batis)
  • spring-webmvc ( Spring Web MVC)
  • spring-aop ( )

.

, " ". . Spring MVC Spring ORM, AOP, TX, Context, Web ..

:

+4

Spring 3.x , . Spring,

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>3.0.5.RELEASE</version>
</dependency> 

..

. spring 3.0.5 jars .

0

Source: https://habr.com/ru/post/1791500/


All Articles