简体   繁体   中英

"maven dependencies" option missing in package explorer for new spring project in sts

I have created a new fresh Spring project in sts 3.6.3 version. but when I have created the project, "maven dependencies" option is missing in package explorer which is usually present below "JRE System Library". Please help me get rid of this problem or at least let me know where I am going wrong. I am new in spring technology. Thank you in advance..!!

Thanks for your valuable responses. but actually I did something different. What I did is "Right click on project->maven->update project". it took some time but it finally worked for me. It took reference from the pom.xml file and downloaded all the necessary jars and started showing them under the name "maven dependencies"

Right click on project and go to

properties -> Deployment Assembly -> Add -> Java Build Path Entries

select maven dependencies here

You've mentioned that you only created a Spring project. Did you configure your project to use Maven? Try creating an empty Maven project and you will see the Maven Dependencies folder in your Package Explorer view.

You can still convert your non-Maven Spring project to use Maven by configuring it.

Right click on your project > Configure > Convert to Maven Project

This will result in a pom.xml being created on the root of your project where you can add your Maven dependencies for them to show up in the Package Explorer view.

You will also be able to tell a Maven project apart from a non-Maven one. In your Eclipse, on the project icon, you must see a M on the top left. (I believe you only see an S perhaps on the top right since you only configured your project to use Spring.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM