I am using GRails 2.4.3
Whenever I try to install the Grails MongoDB plugin http://grails.org/plugin/mongodb I get this error:
|Configuring classpath
|Downloading: org/grails/grails-datastore-gorm-plugin-support/3.1.0.RELEASE/grails-datastore-gorm-plugin-support-3.1.0.RELEASE.pom
|Downloading: org/grails/grails-spring/2.3.8/grails-spring-2.3.8.pom
|Downloading: org/grails/grails-datastore-web/3.1.0.RELEASE/grails-datastore-web-3.1.0.RELEASE.pom
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT (Use --stacktrace to see the full trace)
Error |
Failed to read artifact descriptor for org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT
|Run 'grails dependency-report' for further information.
IDEA hook: Grails not found!
Error |
java.lang.NullPointerException
Error |
at org.jetbrains.groovy.grails.rt.Agent$2.run(Agent.java:135)
Error |
at java.lang.Thread.run(Thread.java:744)
These are my buildconfig settings:
dependencies{
...
compile 'org.grails:grails-datastore-gorm-plugin-support:3.1.0.RELEASE'
}
plugins{
..
compile ':mongodb:3.0.2'
}
Even if I add
compile 'org.grails:grails-datastore-gorm:latest.release'
compile 'org.grails:grails-datastore-core:latest.release'
test 'org.grails:grails-datastore-simple:latest.release'
To the dependencies as mentioned in the plugin page (which I shouldn't have to since I am on Grails 2.4), I get the same error.
Also to add, this plugin has never worked for me for months, yet I have not seen anyone else with this issue online. Am I the only one experiencing this?
How do I go about installing this plugin? Thanks.
I don't know exactly why 3.0.2 has those dependencies and if 3.0.2 is ok to use but if you want to get it working then you need to exclude the SNAPSHOT dependencies and use the RELEASE versions.
plugins {
compile (":mongodb:3.0.2") {
excludes 'grails-datastore-gorm-plugin-support'
excludes 'grails-datastore-gorm'
excludes 'grails-datastore-core'
}
}
and then in dependencies, pull the correct ones in:
dependencies {
compile 'org.grails:grails-datastore-gorm-plugin-support:3.1.3.RELEASE'
compile 'org.grails:grails-datastore-gorm:3.1.3.RELEASE'
compile 'org.grails:grails-datastore-core:3.1.3.RELEASE'
}
Edit: actually on closer inspection of the 3.0.2 pom, the dependency should be 3.1.2.RELEASE so the fact that 3.1.3 is being used means something screwy is going on. I cleaned out my ~/.m2 directory and 'grails dependency-report' now shows the correct 3.1.2.RELEASE dependency.
I was facing the same issue. Found out that there is no 3.1.3 Release till now in http://search.maven.org/#browse|1458455185 as mentioned in the plugin. So the download always failed.
Now I downgraded the plugin version to compile ":mongodb:3.0.1". Then it worked fine. Thanks :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With