[英]Issue with importing Maven project in STS from Spring Guides
Spec: jdk1.8
, Spring Tool Suit Editor-3.8.2
, Maven 3.3.3
, Windows10 O/s
规格:
jdk1.8
, Spring Tool Suit Editor-3.8.2
, Maven 3.3.3
, Windows10 O/s
Downloaded the ZIP from url : https://spring.io/guides/gs/validating-form-input从url下载ZIP : https : //spring.io/guides/gs/validating-form-input
Error on MAVEN as follows MAVEN上的错误如下
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building gs-validating-form-input 0.1.0
[INFO] ------------------------------------------------------------------------
[DEBUG] The POM for org.springframework.boot:spring-boot-starter-thymeleaf-1.4.3.RELEASE:jar:1.4.3.RELEASE is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Question : Why is this Error shown ?问题:为什么会显示此错误?
Just follow these steps (in Eclipse or in Spring Tool Suite) after you download and unzip this project Validating Form Input :下载并解压缩此项目Validating Form Input后,只需按照以下步骤(在 Eclipse 或 Spring Tool Suite 中):
File → Import...
.File → Import...
。 In the Import window choose Maven → Existing Maven Projects
.Maven → Existing Maven Projects
。C:\\gs-validating-form-input\\complete
.C:\\gs-validating-form-input\\complete
。 Click OK
and Finish
.OK
和“ Finish
。complete
folder if you want to see the final result or initial
if you want to follow this guide step-by-step .complete
文件夹,如果要按照本指南逐步操作,请选择initial
文件夹。src/main/java/hello
package in Project Explorer or Navigator.src/main/java/hello
包。 Right click on the Application.java
class Run as →
then either Java Application
or Spring Boot App
(or just press Alt + Shift + x and then press j or b correspondingly).Application.java
类Run as →
然后选择Java Application
或Spring Boot App
(或者只需按Alt + Shift + x ,然后相应地按j或b )。http://localhost:8080/
in the address bar.http://localhost:8080/
。The project is OK, i downloaded, imported as Maven project in eclipse and i run it as a Spring boot app .项目没问题,我下载了,在 Eclipse 中作为Maven 项目导入,我将它作为Spring Boot 应用程序运行。
I am using M2Eclipse 1.7我正在使用 M2Eclipse 1.7
Try cleaning your project.尝试清理您的项目。
Try to Right click -> Maven -> Update project.尝试右键单击 -> Maven -> 更新项目。
Try right click -> Run us -> Spring Boot app.尝试右键单击 -> 运行我们 -> Spring Boot 应用程序。
I download this project and right click complete
open command line then mvn install , everything is ok.我下载这个项目并右键单击
complete
打开命令行然后mvn install ,一切正常。
The POM for org.springframework.boot:spring-boot-starter-thymeleaf-1.4.3.RELEASE:jar:1.4.3.RELEASE is missing, no dependency information available
缺少 org.springframework.boot:spring-boot-starter-thymeleaf-1.4.3.RELEASE:jar:1.4.3.RELEASE 的 POM,没有可用的依赖信息
it seemd you cant download this jar from maven repository so Check your setting.xml and repository path.您似乎无法从Maven 存储库下载此 jar,因此请检查您的 setting.xml 和存储库路径。
And if you use eclipse Check your windows > preferences > maven > setting.如果您使用 eclipse 检查您的 windows > 首选项 > maven > 设置。
Unzip recently imported folder from https://start.spring.io/ Use Import option pointing at unzipped folder, you could see project got selected.从https://start.spring.io/解压最近导入的文件夹 使用指向解压文件夹的导入选项,您可以看到项目被选中。 This way you can import Maven project in to STS IDE
这样您就可以将 Maven 项目导入到 STS IDE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.