jmq*_*jmq 5 grails plugins grails-plugin gradle grails-2.0
我正在尝试将 grails-gradle 插件与 grails 版本 2.0 一起使用。这是我的构建脚本:
buildscript {
repositories {
mavenRepo url: "http://repo.grails.org/grails/core/"
}
dependencies {
classpath "org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT",
"org.grails:grails-bootstrap:2.0.0"
}
grailsVersion="2.0.0"
}
apply plugin: "grails"
repositories {
mavenCentral()
mavenRepo url: "http://repo.grails.org/grails/core/"
}
dependencies {
compile "org.grails:grails:2.0.0",
"org.grails:grails-core:2.0.0",
"org.grails:grails-crud:2.0.0",
"org.grails:grails-datastore-core:1.0.2.RELEASE",
"org.grails:grails-datastore-gorm:1.0.2.RELEASE",
"org.grails:grails-hibernate:2.0.0",
"org.grails:grails-logging:2.0.0"
}
Run Code Online (Sandbox Code Playgroud)
脚本底部的依赖项与位于此处的原始“1.3.4”不同。当我使用这个脚本创建一个 grails 项目时,gradle grails-init它可以正常工作,创建项目。当我尝试使用时,gradle grails-run-app我收到以下错误:
~>gradle grails-run-app
:grails-run-app
| Configuring classpath
| Error log4j:WARN No appenders could be found for logger (org.springframework.core.io.support.PathMatchingResourcePatternResolver).
| Error log4j:WARN Please initialize the log4j system properly.
| Error log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
| Compiling 38 source files
| Compiling 8 source files.....
| Error Error: The following plugins failed to load due to missing dependencies: [hibernate]
- Plugin: hibernate
- Dependencies:
! dataSource (Required: 2.0 > *, Found: Not Installed) [INVALID]
- i18n (Required: 2.0 > *, Found: 2.0.0)
- core (Required: 2.0 > *, Found: 2.0.0)
- domainClass (Required: 2.0 > *, Found: 2.0.0)
Run Code Online (Sandbox Code Playgroud)
我假设这意味着我缺少一个依赖项,但我不知道什么依赖项。它看起来像是hibernate罪魁祸首,但我已经在上面添加了 grails hibernate jar。两个版本的 grails 之间的 jar 列表是不同的,所以我不确定应该包含哪一个(或者可能没有一个,这将不起作用)。可以在此处查看依赖项列表。
任何解决这些错误的帮助将不胜感激。
使用:gradle 1.0、milestone-7 和 grails 2.0.0
注意:依赖项是来自github 的"org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT"提示修订版的本地副本。
| 归档时间: |
|
| 查看次数: |
4706 次 |
| 最近记录: |