简体   繁体   English

Grails Webflow2.0.0错误

[英]Grails Webflow2.0.0 error

I am using Grails 2.0.0 and I tried to download webflow 2.0.0 but I am getting only webflow 2.0.0-RELEASE as a zip folder or as a jar file.Are both webflow 2.0.0 and webflow 2.0.0-RELEASE the same? 我正在使用Grails 2.0.0,但我尝试下载webflow 2.0.0,但我仅以zip文件夹或jar文件的形式获取webflow 2.0.0-RELEASE.webflow 2.0.0和webflow 2.0.0-RELEASE都是相同?

I even got grails-webflow-2.0.3 jar file also. 我什至也得到了grails-webflow-2.0.3 jar文件。 I also tried with webflow 1.3.8 which I got from grails official website. 我还尝试了从grails官方网站获得的webflow 1.3.8。 I tried changing the name of the plugin in the compile statement in Build.Config each time and ran and am ending up with this kind error each time : 我每次尝试在Build.Config的compile语句中更改插件的名称,然后每次都运行并最终出现此类错误:

Error WARNING: Specified dependency definition compile(:org.springframework.webflow-2.0.0.RELEASE) is invalid! 错误警告:指定的依赖项定义compile(:org.springframework.webflow-2.0.0.RELEASE)无效! Skipping.. 正在跳过..

what shall i do? 我该怎么办?

Given below is my BuildConfig.groovy file : 下面给出的是我的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"
}
}

The right way to add webflow is to put the dependecy in BuildConfig.groovy 添加Webflow的正确方法是将Dependecy放入BuildConfig.groovy

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

Don't download or add it manually 不要手动下载或添加

Or try replace your repositories with this 或者尝试用此替换您的存储库

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"
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM