Search code examples
gitmavensetup-projectspring-tool-suiteeclipse-luna

Setting up SpringToolSuite with Maven/Java/GIT combo


I am trying to set up Spring Tool Suite v3.6.3.SR1 (Eclipse Luna 4.4.1) with my project. STS comes with Maven which I have replaced with my version (3.1) and Java is v1.7.

When I do: Package Explorer > Import... > Maven > Existing Maven Projects I get the project imported and it has a little M for Maven but it does not set up as a Java project with package directories, etc. In fact the projects have no .classpath file and their .project file contains only a Maven (no Java or Spring) nature. Hence, when I right-click > Properties on them, I see no reference to Java or Java Build Path as I expect.

I have copied over an old .project file and made it work but I have several hundred to do so wondered if there was a better/correct/etc. way of doing this?

This happened last time I set up these same projects in an older version of STS also, then I was using SVN so I don't think GIT is the issue.

Thanks in advance for any help.


Solution

  • Try right-clicking on the project(s) in Project Explorer once it's imported and then in the context menu go to Maven -> Update Project... Make sure the bottom 3 check-boxes on the dialog are checked and press OK on the dialog.

    Ideally the project must be "maven refreshed" once it's imported... Not sure why it isn't for you. See if there is anything related to that in the error log.