2016-12-06 41 views
0

我已經將小應用程序從Grails 2.2升級到Grails 3.2.3。解決編譯問題後,一切看起來都不錯,但bootRun失敗,並沒有明顯的線索爲什麼。Grails 3.x更新 - bootRun失敗

build.gradle

buildscript { 
    repositories { 
     maven { url "https://repo.grails.org/grails/core" } 
     maven { url "http://repository.jboss.com/maven2/" } 
     maven { url "http://repo1.maven.org/maven2/" } 
     maven { url "http://repo.spring.io/milestone/" } 
    } 
    dependencies { 
     classpath "org.grails:grails-gradle-plugin:$grailsVersion" 
     classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.11.6" 
     classpath "org.grails.plugins:hibernate5:6.0.4" 
    } 
} 

version "0.1" 
group "testmonitor" 

apply plugin:"eclipse" 
apply plugin:"idea" 
apply plugin:"war" 
apply plugin:"org.grails.grails-web" 
apply plugin:"org.grails.grails-gsp" 
apply plugin:"asset-pipeline" 

repositories { 
    mavenLocal() 
    maven { url "https://repo.grails.org/grails/core" } 
    maven { url "http://repository.jboss.com/maven2/" } 
    maven { url "http://repo1.maven.org/maven2/" } 
    maven { url "http://repo.spring.io/milestone/" } 
} 

dependencyManagement { 
    imports { 
     mavenBom "org.grails:grails-bom:$grailsVersion" 
    } 
    applyMavenExclusions false 
} 

dependencies { 

    compile "org.springframework.boot:spring-boot-starter-logging" 
    compile "org.springframework.boot:spring-boot-autoconfigure" 
    compile "org.grails:grails-core" 
    compile "org.springframework.boot:spring-boot-starter-actuator" 
    compile "org.springframework.boot:spring-boot-starter-tomcat" 
    compile "org.grails:grails-dependencies" 
    compile "org.grails:grails-web-boot" 
    compile "org.grails.plugins:cache" 
    compile "org.grails.plugins:hibernate5" 
    compile "org.hibernate:hibernate-core:5.1.2.Final" 
    compile "org.hibernate:hibernate-ehcache:5.1.2.Final" 
    compile 'org.grails.plugins:spring-security-core:3.1.1' 
    compile "org.grails.plugins:quartz:2.0.1" 
    compile 'org.grails:grails-datastore-rest-client' 
    profile "org.grails.profiles:web" 
    runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.11.6" 
    runtime "com.h2database:h2" 
    compile 'org.apache.commons:commons-math3:3.6.1' 
    compile group: 'org.codehaus.groovy.modules.http-builder', name: 'http-builder', version: '0.7.1' 
    compile 'net.sf.opencsv:opencsv:2.3' 

    console "org.grails:grails-console" 

    runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.11.6" 
    runtime 'mysql:mysql-connector-java:5.1.29' 

    testCompile "org.grails:grails-plugin-testing" 
    testCompile "org.grails.plugins:geb" 
    testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1" 
    testRuntime "net.sourceforge.htmlunit:htmlunit:2.18" 

} 

bootRun { 
    jvmArgs = ['-Dspring.output.ansi.enabled=always'] 
} 

assets { 
    minifyJs = true 
    minifyCss = true 
} 

gradle --debug日誌(看不到這裏有什麼問題)可以下載from Sharepoint

我使用IntelliJ IDEA 2016.3,當我運行grails run-app時,我得到了相同的結果。我找不到任何選項來記錄/信息grails命令。 [正在運行grails run-app] [1]

更新:現在grails run-app看起來不錯,但返回htpp 404。

+1

你能發佈你得到的錯誤嗎? – pagep

+0

我將你的'build.gradle'複製到你的問題中。我們不應該下載任何文件來了解你所要求的。如果您選擇了一段代碼並單擊'{}'按鈕或按下Ctrl + K,它將縮進四個空格,這將告訴Stack Overflow將其視爲代碼。有關格式化的更多幫助,請參閱https://stackoverflow.com/help/formatting。我也更清楚地表明你的日誌文件是一個下載。 – Chris

+0

非常感謝,我趕緊:( –

回答

0

您還需要清除舊gradle緩存。按照下面的鏈接。我得到幾乎相同的錯誤。 https://stackoverflow.com/a/39462689/3711185

+0

謝謝,我做到了,有很多的下載,但結果是一樣的 –

+0

有你刪除你的C:\ Users \ znevrly \ .gradle文件夾,然後運行gradle clean; grails clean? –

+0

你有哪些gradle版本? –