3

As far as I understand, it is better to use Spring versionless xsd.

However, when using Intellij the validation is done based on a random xsd file. When adding the version to the xsd file everything works as expected.

enter image description here

As you can see I use Spring 4.2.1 but Intellij chooses 3.1 version.

Is it a bug (or not yet implemented feature) in Intellij? Is there a workaround?

Community
  • 1
  • 1
BobTheBuilder
  • 18,858
  • 6
  • 40
  • 61

1 Answers1

0

If there is no place with version specification, then yes, it is random, you can try the following test: add space in front of line (make some simple change) with xsd specification), after each change it jumps to another random xsd version

If you want to lock it on the latest lib version and don't specify it, you can use gradle build.

//use latest version of library with gradle: compile 'org.springframework:spring-orm:+'

after that idea always points to latest version of xsd for schemaLocation

Vovka
  • 599
  • 3
  • 10
  • I use maven and the build is indeed compiled with the latest version. However Intellij shows some errors when using new version features even after maven build. – BobTheBuilder Sep 29 '15 at 05:57