【发布时间】:2012-09-16 00:17:09
【问题描述】:
我正在尝试对使用 build-test-data-2.0.3 的 grails 2.1 应用程序进行 mavenize,由于某种原因它无法导入 grails.test.mixin.support.*。
我认为这与范围有关,所以我尝试了不同的范围,但没有帮助。
我的假设是 grails.test.mixin.support 并且其他要求已经与 grails 核心一起下载,我是否需要为此插件添加任何特定的依赖项?
谢谢
我得到的错误是:
package grails.test.mixin.support does not exist
这是创建问题需要做的事情:
1- 创建应用程序 delme
2- 添加构建测试插件
3- 创建 pom com.company
4- mvn 安装
这是我在 pom 中的依赖:
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>build-test-data</artifactId>
<version>2.0.3</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
构建配置:
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.7.2"
runtime ":resources:1.1.6"
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0"
//runtime ":cached-resources:1.0"
//runtime ":yui-minify-resources:0.1.4"
build ":tomcat:$grailsVersion"
runtime ":database-migration:1.1"
compile ':cache:1.0.0'
}
【问题讨论】:
-
您的 BuildConfig.groovy 看起来如何?我有相同的设置,但我没有看到问题。
-
我没有更改Buidlconfig,因为我使用maven下载依赖项。
-
@allthenutsandbolts 你也在用maven吗?
-
是的,我也在使用 maven。我没有看到错误
-
如果您希望 Grails 从您的 pom 文件中获取依赖项,您需要将
pom true添加到您的grails.project.dependency.resolution闭包中。
标签: grails grails-plugin