简体   繁体   English

无法在STS中创建Maven项目

[英]cannot create maven project in STS

I'm new to Java EE development and I heard that If I have to learn the Java EE then the Spring MVC is best choice to learn and get Command of. 我是Java EE开发的新手,听说如果我必须学习Java EE,那么Spring MVC是学习并获得Command的最佳选择。 After downloading STS 3.6 bundle I'm having some troubles/issues in creating Maven Project. 下载STS 3.6捆绑软件后,我在创建Maven Project时遇到了一些麻烦/问题。 My STEPS are 我的步骤是

1- Create new project 1-创建新项目

在此处输入图片说明

2- Error Dialog 2-错误对话框

在此处输入图片说明

It appears that you either don't have Maven installed, or your IDE is not aware of the installation. 似乎您没有安装Maven,或者您的IDE不知道安装情况。 For the former problem, have a look here . 对于前一个问题,请在这里看看。 For the latter problem, view this page for IDE you are using: 对于后一个问题,请查看您正在使用的IDE的页面:

I would also like to recommend to get started with Spring using the Spring Tool Suite by using Spring Boot and the guides at http://spring.io/guides . 我还建议您通过使用Spring Boot和位于http://spring.io/guides的指南来开始使用Spring Tool Suite来使用Spring。 You can import those guides directly into STS and start from there. 您可以将这些指南直接导入STS并从那里开始。

I also face with this thing too, but I found a solution that just update Maven project by right click on project -> Maven-> Update Project... or (Alt+F5) then check on force to update as image below : 我也面临着这个问题,但是我找到了一种解决方案,只需右键单击项目-> Maven->更新项目...或(Alt + F5)即可更新Maven项目,然后检查强制更新,如下图所示:

图1更新Maven项目

It works perfect for me. 它对我来说很完美。

NOTE** internet connection is required 注意**需要互联网连接

I have created project using Spring Tool Suite IDE, with below navigation. 我已经使用Spring Tool Suite IDE通过以下导航创建了项目。

New -> Spring Starter Project 新建-> Spring Starter项目

But outcome was always simple maven M2 project with error symbol. 但是结果总是带有错误符号的简单Maven M2项目。

After project build completion I have updated maven project with option "Force Update of Snapshots/Release". 项目构建完成后,我使用选项“强制更新快照/发布”更新了maven项目。

It turned my project M2 project into M2S Project 我的专案M2专案变成了M2S专案

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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