我的 Grails 项目虽然在 IntelliJ 中运行良好,但无法通过命令行或 Jenkins 进行构建,报告了我的 BuildConfig.groovy 中列出的依赖项 not 的依赖问题。
问题:
Error Plugin release-3.0.0 requires version [2.3 > *] of Grails which your current Grails installation does not meet. Please try install a different version of the plugin or Grails.
BuildConfig.xml 中的依赖项:
plugins {
compile(":csv:0.3.1")
compile ":executor:0.3"
compile ":audit-logging:0.5.4"
compile ':ckeditor:3.6.2.1'
build ':codenarc:0.17'
runtime ":database-migration:1.1"
compile ":famfamfam:1.0.1"
compile ":filterpane:2.0.1.1"
compile ":hibernate:$grailsVersion"
compile ":jquery:1.7.2"
compile ":jquery-ui:1.8.15"
compile ":jquery-ui-timepicker:0.9.8.1"
compile ":mail:1.0"
compile ":resources:1.1.6"
compile ":rest:0.7"
test ":spock:0.6"
test ':code-coverage:1.2.5'
compile ':spring-security-core:1.2.7.3'
compile ':spring-security-ui:0.2'
compile ":taggable:1.0.1"
compile ":tomcat:$grailsVersion"
compile ':enhanced-scaffolding:1.0.RC2'
compile ':build-test-data:2.0.2'
compile ':jslint:0.5'
}
dependencies {
runtime 'postgresql:postgresql:9.0-801.jdbc3'
compile 'net.sourceforge.jexcelapi:jxl:2.6.10'
compile 'org.apache.poi:poi:3.7'
compile 'org.jsoup:jsoup:1.5.2'
compile 'org.codehaus.gpars:gpars:0.12'
compile 'commons-io:commons-io:2.0.1'
runtime 'owasp-java-html-sanitizer:owasp-java-html-sanitizer:r99'
compile 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3'
test 'org.objenesis:objenesis:1.2'
}
任何人都可以推荐一种方法来跟踪哪个插件或依赖项导致丢失的错误吗?
TIA,
坑
尝试查看依赖性报告:
grails dependency-report
许多
grails
命令已在 Grails 6 中删除(请参阅 https://docs.grails.org/6.1.2/guide/commandLine.html)。其中很多都被相应的 gradle
命令取代。其中之一是dependency-report
。
为了在 Linux 下输出 Grails 6 的依赖关系报告,你必须运行
./gradlew -q dependencies
或
gradlew.bat -q dependencies
Windows 下。