在使用STS时,发现从eclipse marketplace中安装的gradle插件并未生效。
查看STS的说明文档和gradle插件说明后,发现需要使用特定版本的gradle插件。
STS说明文档可参见:
https://docs.spring.io/sts/docs/2.9.0.old/reference/html/gradle/installation.html
gradle插件说明可参见:
https://github.com/spring-projects/eclipse-integration-gradle/blob/master/README.md
插件说明节选:
Installing from the STS dashboard:
The easiest way to install is from the STS Dashboard "Extensions" page.
First download and install a recent release of STS or Groovy and Grails Toolsuite (GGTS) version 3.0.0 or later.
Open the Dashboard and select the 'Extensions' Tab.
Search for "Gradle" or "Groovy" depending on what you are installing, select it and click "Install".
Review the list of software that will be installed and click "Next".
Review and accept licence agreements and click "Finish".
现记录安装过程如下:
(1)点击dashboard
(2)进入Extensions
(3)查找Gradle并安装
(4)重启STS
至此,gradle插件生效。