将一个专用grails插件插入另一个专用grails插件
我正在尝试插入一个核心插件,其行为:将一个专用grails插件插入另一个专用grails插件,grails,grails-plugin,Grails,Grails Plugin,我正在尝试插入一个核心插件,其行为: grails.plugin.location.pluginCore = "../plugin/"; 但一个例外是抛出 但是当我在一个普通的项目中使用它时,没有例外 Compile error during compilation with javac. /home/asapcode/Documents/svn/erede/plugin/src/java/br/com/qreserva/portal/pagamento/payPal/PagamentoPay
grails.plugin.location.pluginCore = "../plugin/";
但一个例外是抛出
但是当我在一个普通的项目中使用它时,没有例外
Compile error during compilation with javac.
/home/asapcode/Documents/svn/erede/plugin/src/java/br/com/qreserva/portal/pagamento/payPal/PagamentoPayPal.java:20: error: package org.hibernate.validator.util.privilegedactions does not exist
import org.hibernate.validator.util.privilegedactions.GetDeclaredField;
有什么想法吗
谢谢回复 我解决了这个问题!但我不明白为什么有必要 这是插件A中的application.properties:
app.grails.version=2.2.3
app.name=PluginA
plugins.acegi=0.5.3.2
plugins.hibernate=2.2.3
plugins.i18n-templates=1.1.0.1
plugins.svn=1.0.1
PluginA的BuildConfig:
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.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'
repositories {
grailsCentral()
// uncomment the below to enable remote dependency resolution
// from public Maven repositories
//mavenCentral()
//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.5'
compile('org.codehaus.groovy.modules.http-builder:http-builder:0.5.2') {
excludes "commons-logging", "xml-apis", "groovy"
}
}
plugins {
build(":tomcat:$grailsVersion",
":release:1.0.0") {
export = false
}
}
}
这是插件B的(旧)application.properties:
app.grails.version=2.2.3
app.name=PluginB
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
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'
legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility
repositories {
grailsCentral()
mavenCentral()
// uncomment the below to enable remote dependency resolution
// from public Maven repositories
//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.21'
}
plugins {
build(":tomcat:$grailsVersion",
":release:2.2.1",
":rest-client-builder:1.0.3") {
export = false
}
}
}
插件B的BuildConfig(旧版):
app.grails.version=2.2.3
app.name=PluginB
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
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'
legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility
repositories {
grailsCentral()
mavenCentral()
// uncomment the below to enable remote dependency resolution
// from public Maven repositories
//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.21'
}
plugins {
build(":tomcat:$grailsVersion",
":release:2.2.1",
":rest-client-builder:1.0.3") {
export = false
}
}
}
当我在PluginB(BuildConfig)和application.properties中列出的插件上插入PluginA的依赖项时,它可以正常工作
我不明白为什么插件B在我插入行时
grails.plugin.location.pluginCore = "../plugin/";
在插件B的BuildConfig中,插件不会自动解析此依赖项
但是,谢谢你的回答