Class<SpringExtension> cannot be resolved - spring

I am trying to migrate a JUnit 4 test to JUnit 5. Eclipse does not recognize SpringExtension.class : Class cannot be resolved. I use Spring 5.2.2 and Maven in the project.
How can I resolve this error?

Go to project > Maven > Update project... > Force Update of Snapshots / Releases .

Related

Packaging issue with Maven project in STS

I have set up one spring boot project at STS IDE .
Getting issue with maven read with JDK 1.8 java version
I have restart the IDE
Error - Project build error: Invalid packaging for parent POM
org.springframework.boot:spring-boot-starter:1.5.9.RELEASE, must be
"pom" but is "jar".

"unable to resolve class" error after upgrading gradle 3 to gradle 4

Grails version: 3.2.9
Gradle initial version: 3.4.1 (everything works fine with this version)
Gradle upgraded version:4.10.3
Plugin: org.grails.grails-gsp
When I run gradlew war after upgrading gradle version to 4.10.3 I start to get the following error during execution of compileGroovyPages task:
dashboard_gsp.groovy: 2: unable to resolve class com.abnd.CarStatusEnum
# line 2, column 1.
import com.abnd.CarStatusEnum
^
Location of class com.abnd.CarStatusEnum is src/main/groovy/com/abnd/CarStatusEnum in the same project where the build is being run and gradlew war task completes successfully with gradle version 3.4.1. However when I upgrade gradle version to 4.10.3 then I start to get this error. Same happens with gradle version 4.1.
1) Any clue what can be the problem ?
2) Is that a good idea to use gradle version 4.x.x or 5.x.x with grails version 3.x.x as with gradle 5.x.x I start to get even more issues as some grails plugins(like grails-gsp v3.3.2 which is latest stable version) use some features that have been deprecated in gradle 4.x.x and removed from gradle 5.x.x (see the error bellow)?
Failed to apply plugin [id 'org.grails.grails-gsp']
Could not get unknown property 'classesDir' for main classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.
1) Any clue what can be the problem ?
Yes. The error message is a clue that the GSP compiler can't find the enum class. This is because our plugin isn't compatible with Gradle 4.10.3.
2) Is that a good idea to use gradle version 4.x.x or 5.x.x with
grails version 3.x.x
No. Those Gradle versions are not supported with the version of Grails you are using.
I hope that helps.

Grails 4 Spring Security Plugin

After upgrading from Grails 3.3.9 to 4 there are several packages missing. E.g. unable to resolve class org.springframework.security.provisioning.JdbcUserDetailsManager. Has anyone any ideas? I've done all the steps from here: https://docs.grails.org/4.0.0.M1/guide/upgrading.html.
It seems that Gradle 5 can not load all the dependencies in the plugin. With Grails 3.3.9 and Gradle Wrapper 3.5 everything worked fine.
Thanks for any advices.

Creating Vaadin 6 maven project

I am trying to create vaadin 6 maven project using the following cmd :
mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=6.8.11 -Darchetype.properties=generate.properties -DgroupId=com.example.cem -DartifactId=test
But it fails with :
Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project cem: The defined artifact is not an archetype
when I try to change archetypeVersion to 7.6.4 a vaadin project created correctly .
what is the wrong with vaadin 6 here?
First thing that pops into my mind is that we probably never have defined maven archetype for Vaadin 6. Maven support was introduced in later Vaadin 7 versions (ref https://vaadin.com/blog/vaadin-7-3-7-and-new-maven-archetypes).
But probably you can do it by creating Vaadin 7 project first and then change dependencies to Vaadin 6.

Spring MVC + eclipse + STS

I have installed Spring MVC tools and when I create spring mvc project, I have few errors in my pom.xml. There are three errors:
You have some Jars that are not correctly downloaded on your local repository by Maven due to a connection issue, try to do mvn -U install or delete your local repository ${username_directory}/.m2 and do maven update.

Resources