2012-07-13 62 views
0

我使用的是Grails 2.0.0,我嘗試下載webflow 2.0.0,但我只獲得了webflow 2.0.0-RELEASE作爲zip文件夾或jar文件。都是webflow 2.0。 0和webflow 2.0.0-RELEASE相同嗎?Grails Webflow2.0.0錯誤

我甚至還得到了grails-webflow-2.0.3 jar文件。我也嘗試過從grails官方網站上獲得的webflow 1.3.8。我試圖每次更改Build.Config中的編譯語句中的插件的名稱,並且每次都運行並結束於此類錯誤:

錯誤警告:指定的依賴關係定義編譯(:org.springframework.webflow- 2.0.0.RELEASE)無效!正在跳過...

我該怎麼辦?

下面給出的是我的BuildConfig.groovy文件:

grails.servlet.version = "2.5" // Change depending on target container 
compliance (2.5 or 3.0) 
grails.project.class.dir = "target/classes" 
grails.project.test.class.dir = "target/test-classes" 
grails.project.test.reports.dir = "target/test-reports" 
grails.project.target.level = 1.6 
grails.project.source.level = 1.6 
//grails.project.war.file = "target/${appName}-${appVersion}.war" 
grails.project.dependency.resolution = { 
// inherit Grails' default dependencies 
inherits("global") { 
    // uncomment to disable ehcache 
    // excludes 'ehcache' 
} 
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 
'debug' or 'verbose' 
checksums true // Whether to verify checksums on resolve 
repositories { 
inherits true // Whether to inherit repository definitions from 
plugins 
    grailsPlugins() 
    grailsHome() 
    grailsCentral() 
    mavenCentral() 
    // uncomment these to enable remote dependency resolution 
from public Maven repositories 
    mavenCentral() 
    mavenRepo 
"http://repository.springsource.com/maven/bundles/release" 
    mavenRepo 
"http://repository.springsource.com/maven/bundles/external" 
    mavenRepo 
"http://repository.springsource.com/maven/libraries/release" 
    mavenRepo 
"http://repository.springsource.com/maven/libraries/external" 
    mavenLocal() 
    mavenRepo "http://snapshots.repository.codehaus.org" 
    mavenRepo "http://repository.codehaus.org" 
    mavenRepo "http://download.java.net/maven/2/" 
    mavenRepo "http://repository.jboss.com/maven2/" 
} 
dependencies { 
    // specify dependencies here under either 'build', 'compile', 
'runtime', 'test' or 'provided' scopes eg. 
    // runtime 'mysql:mysql-connector-java:5.1.16' 
} 
plugins { 
    runtime ":hibernate:$grailsVersion" 
    runtime ":jquery:1.7.1" 
    runtime ":resources:1.1.5" 
    compile ":webflow:2.0.0" 
// compile ":spring-security-core:1.2.7.3" 
    build ":tomcat:$grailsVersion" 
} 
} 

回答

1

添加一個Webflow正確的做法是把的關係是不以BuildConfig.groovy

... 
plugins { 
    ... 
    compile ":webflow:2.0.0" 
    ... 
} 
... 

不要下載或手動添加

或嘗試用此代替您的存儲庫

repositories { 
     inherits true 
     grailsPlugins() 
     grailsHome() 
     grailsCentral() 
     mavenLocal() 
     mavenCentral() 
     mavenRepo name: "Grails Snapshots", root:"http://snapshots.repository.codehaus.org/" 
     mavenRepo name: "Spring Milestone", root:"http://maven.springframework.org/milestone/" 
     mavenRepo name: "Spring Milestone", root:"http://maven.springframework.org/milestone/" 
     ebr()  
     mavenRepo "http://repository.codehaus.org" 
     mavenRepo "http://download.java.net/maven/2/" 
     mavenRepo "http://repository.jboss.com/maven2/" 
     mavenRepo "http://repository.springsource.com/maven/bundles/release" 
     mavenRepo "http://repository.springsource.com/maven/bundles/external" 
     mavenRepo "http://repository.springsource.com/maven/libraries/release" 
     mavenRepo "http://repository.springsource.com/maven/libraries/external" 
    } 
+0

我做了同樣的...仍然我得到錯誤 - 錯誤警告:指定的依賴定義編譯(:webflow-2.0.0)是無效的!跳過.. – user22 2012-07-17 12:06:28

+0

你可以發佈你的BuildConfig.groovy嗎? – 2012-07-17 13:21:43

+0

我在這個問題中包含了我的BuildConfig.groovy – user22 2012-07-24 05:04:04