0
思想以下信息共享建設爲我花了幾個小時找到這個:春天開機1.3.3不與gradle這個3.0
春季啓動1.3.3項目沒有與gradle這個3彈簧引導gradle這個插件是建立內置的gradle爲2。因此,構建這個項目只用2的gradle但不與gradle這個3.
$ gradle build
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_2yz3q0eod1vuhee49o6tow8db.run(C:\Users\nm_su\Projects\provisioning\mobipm\build.gradle:23)
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\nm_su\Projects\provisioning\mobipm\build.gradle' line: 26
* What went wrong:
A problem occurred evaluating root project 'mobipm'.
> Failed to apply plugin [class 'io.spring.gradle.dependencymanagement.DependencyManagementPlugin']
> Could not create task of type 'DependencyManagementReportTask'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 11.67 secs
$ gradle --version
------------------------------------------------------------
Gradle 3.2.1
------------------------------------------------------------
Build time: 2016-11-22 15:19:54 UTC
Revision: 83b485b914fd4f335ad0e66af9d14aad458d2cc5
Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_111 (Oracle Corporation 25.111-b14)
OS: Windows 10 10.0 amd64
現在讓我們嘗試用gradle這個2.14.1建設,
$ gradle build
:framework:compileJava
:framework:processResources UP-TO-DATE
:framework:classes
:framework:jar
:compileJava
:processResources UP-TO-DATE
:classes
:findMainClass
:jar
:bootRepackage
:assemble
:compileTestJava
:processTestResources UP-TO-DATE
:testClasses
:test
:check
:build
:framework:findMainClass
:framework:bootRepackage
:framework:assemble
:framework:compileTestJava
:framework:processTestResources UP-TO-DATE
:framework:testClasses
:framework:test
:framework:check
:framework:build
BUILD SUCCESSFUL
Total time: 31.104 secs
$ gradle --version
------------------------------------------------------------
Gradle 2.14.1
------------------------------------------------------------
Build time: 2016-07-18 06:38:37 UTC
Revision: d9e2113d9fb05a5caabba61798bdb8dfdca83719
Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_111 (Oracle Corporation 25.111-b14)
OS: Windows 10 10.0 amd64
如果您正在使用文摘外掛程序「Buildship搖籃集成2.0」,然後在導入春天開機1.3.3項目,明確的gradle選擇的olderversion如下
我有類似的問題。從gradle站點下載gradle zip並使用本地安裝目錄作爲解決方案。 –
您應該在任何Gradle構建的項目中使用Gradle包裝,並且是最小的。然後,構建總是按照設計正確工作,因爲包裝將運行構建與構建專門用於測試的確切版本的Gradle,並且運行構建所需的唯一東西是兼容的已安裝Java,沒有Gradle安裝必要。您甚至可以使用另一個Gradle項目的包裝引導新的Gradle項目,而無需手動在本地安裝Gradle。 – Vampire