0

I have:

Windows 10, openjdk 11, spring tool suite 4.1.1, gradle 6.5, springboot 2.1 or 2.3

With this, when I import gradle project, I start seeing errors in STS like:

Evaluates project setup fixes to resolve the reference to the missing 
 element 'Autowired'

Evaluates project setup fixes to resolve the reference to the missing 
 element 'RestController'

I have tried commands like :

./gradlew --build-cache clean
./gradlew assemble
./gradlew --refresh-dependencies

Still I see the same error.

If I go to project, right click and go to Gradle - Refresh Gradle Project I see below errors in Console:

> Task :nothing UP-TO-DATE
Could not resolve: org.springframework.boot:spring-boot-starter-web
Could not resolve: org.springframework.boot:spring-boot-starter-jdbc
Could not resolve: org.springframework.cloud:spring-cloud-starter-config:2.2.3.RELEASE
Could not resolve: org.springframework.boot:spring-boot-starter-hateoas
Could not resolve: com.oracle:ojdbc8:12.2.0.1
Could not resolve: org.springframework.boot:spring-boot-starter-actuator
Could not resolve: org.mockito:mockito-junit-jupiter:2.18.3
Could not resolve: org.springframework:spring-test:5.1.4.RELEASE
Could not resolve: org.junit.jupiter:junit-jupiter-engine:5.2.0

BUILD SUCCESSFUL in 775ms

How to fix such errors?

Shivraj
  • 462
  • 2
  • 9
  • 27
  • https://start.spring.io/ is still using gradle v6.4.1, is your project working with 6.4.1? – jumping_monkey Jun 11 '20 at 01:24
  • @jumping_monkey yes, wen to start.spring.io and tried with springboot 2.3.0 with gradle 6.4.1 still the same error. Does it has to do anything with STS version 4 ? – Shivraj Jun 11 '20 at 02:50
  • Hi @Shivraj, i am running Gradle v6.4.1 without any issue on STS `4.5.1.RELEASE`, if that helps. I am not using `4.6.1.RELEASE` as i have an issue running JUnit 5 tests, but that's another thing. – jumping_monkey Jun 11 '20 at 03:04
  • Does it work on the command line? What is the actual error here, build issues in the IDE? – thokuest Jun 11 '20 at 08:10
  • @thokuest it compiles fine in command line when run command like "gradlew clean assemble" however, when looked into IDE, I see errors as stated above. so something is going on between IDE , gradle and java – Shivraj Jun 11 '20 at 12:45

0 Answers0