I've developed my Grails project in a machine that has Idea 13 installed. Now I've moved in another machine and I've installed the latest version of the IDE.
I've installed Grails (ver. 2.2.1) and Groovy (ver. 2.4.6) giving the path variables as described in their installation instructions. I've created a new project from existing source but when I try to run it, it gives me errors about plugins.
Plugins are missing and I cannot install in the project because the tab in the menu Tools -> Grails -> Plugins (or right click on the root of the project -> Grails -> Plugins) does not exists. I've tried with creating a brand new Grails project and the tab exists, so maybe it depends on the way I've imported the project.
Here it is the BuildConfig.groovy content:
grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
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.source.level = 1.6
grails.project.war.file = "target/${appName}.war"
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// specify dependency exclusions here; for example, uncomment this to disable ehcache:
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
checksums true // Whether to verify checksums on resolve
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/"
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
runtime 'mysql:mysql-connector-java:5.1.20'
}
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 ":database-migration:1.1"
compile ':cache:1.0.0'
compile ":ckeditor:4.4.1.0"
}
}
Here it is the error in Grails console:
Error |
Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:cache:1.0.0
- org.grails.plugins:ckeditor:4.4.1.0
How can I import it without receiving errors in building code?
EDIT: I've created a brand new project. It installs default plugins but does not allow to add new plugins via Tools->Grails->Plugins
The error is (i.e. log4j plugin installation):
|Resolving plugin log4j-xml. Please wait...
|Error resolving plugin [name:log4j-xml, group:org.grails.plugins, version:0.2]. Plugin not found.
Error |
Plugin not found for name [log4j-xml] and version [0.2]