そのため、Grailsアプリにインストールしたプラグインのいくつかに少し問題があります。プラグインをインストールした後でも、「シンボルXを解決できません」というエラーが発生しない限り、プラグインを含むパッケージをクラスの1つにインポートできないようです。これはすべてのプラグインに当てはまるわけではなく、一部のプラグインにのみ当てはまります。
特定のプラグインからパッケージをインポートしようとしない場合、問題なくアプリケーションをコンパイルして実行できます。なぜこれが起こっているのか、私はここで本当に途方に暮れています。
健全性チェックとして...
特定のプラグインについて、mavenRepo依存関係またはruntime / build / compileインサートをBuildConfig.groovyに追加し、grailsinstall-pluginXコマンドを使用してプロジェクト内にプラグインをインストールします。次に、アプリケーションをビルドします。
私のbuildconfigファイルの一部は以下のとおりです。どんな助けや洞察もいただければ幸いです。
repositories {
inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
grailsCentral()
mavenLocal()
mavenCentral()
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
//mavenRepo "http://snapshots.repository.codehaus.org"
//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"
//excel import plugin
mavenRepo "http://repo.grails.org/grails/libs-releases/"
mavenRepo "http://m2repo.spockframework.org/ext/"
//joda time
mavenRepo "http://repo.grails.org/grails/libs-releases/"
mavenRepo "http://m2repo.spockframework.org/ext/"
mavenRepo "http://m2repo.spockframework.org/snapshots/"
//execel export plugin
mavenRepo("http://maven.touk.pl/nexus/content/repositories/releases")
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
// runtime 'mysql:mysql-connector-java:5.1.20'
runtime 'mysql:mysql-connector-java:5.1.22'
}
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.8.0"
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 (":excel-export:0.1.4")
runtime ":database-migration:1.1"
compile ':cache:1.0.0'
compile ":searchable:0.6.4"
compile ":spring-security-core:1.2.7.3"
compile ":excel-import:1.0.0"
compile ":excel-export:0.1.4"
compile ":joda-time:1.4"
}
}