Intellij maven options - What are differences between them
Asked Answered
D

1

6

Im a bit confused with maven options in intellij.

What are the differences between and when would you use them?

  • Reimport
  • Generate Sources and Update Folders
  • Download Sources
  • Download Documentation

enter image description here

Doubletalk answered 4/9, 2014 at 12:47 Comment(1)
The "Download XXX" does exactly what you'd expect.Cess
T
10
  • Reimport forces a reload of the POM. This should only be necessary if you have any major changes.
  • Generate Sources generates code. Think WSDL to Java, etc.
  • Downoad ... downloads the source or documentation packages for dependencies. Generally not required, but it can help if you try to debug your code and you want to jump into (nicely formatted and documented) dependencies or with writing proper JavaDocs.

PS: In rare cases when your project is really messed up and Reimport does not help, use File -> Invalidate Caches / Restart...

Twobit answered 4/9, 2014 at 21:18 Comment(3)
Actually, downloading the source helps with javadocs when using third-party libraries. I use it every day.Hube
I get that Reimport pulls/refreshes down all dependencies in the POM and Download sources/docs makes sense as well (not needed for build, but useful in IDE for debuging). I'm still a little uncertain of what code is generated by Generate Sources can you elaborate?Innes
There might be better examples, but the first one that comes to my mind are WSDL files (for SOAP web services) where you can either go the code first (generate the WSDL file from the code) or contract first (generate the stub classes from the WSDL file).Twobit

© 2022 - 2024 — McMap. All rights reserved.