Closed chenk1 closed 9 years ago
I checked, all works fine.
plugins {
...
compile ":cookie:0.51"
}
I've added the space because otherwise it would have turn into a cookie emoticon :cookie: :)
I ran it again with --stacktrace and --verbose and here's the full stack trace:
java.lang.NoClassDefFoundError: org/apache/http/client/HttpResponseException
at org.eclipse.aether.transport.http.HttpTransporterFactory.newInstance(HttpTransporterFactory.java:93)
at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:110)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.
You can use apostrophe qoute for syntax highlighting and avoid emoticons https://help.github.com/articles/github-flavored-markdown
You said that using Groovy 2.4.0.
How you do that? Groovy 2.4 is currently in beta testing.
Grails 2.4.3 uses Grails 2.3.6.
Could you show me all contents of BuildConfig.groovy
?
You're right, i'm using grails-2.4.3 with groovy-2.4.0-beta-3. I'm working with GGTS but it fails also when it run "grails compile" using the command line.
The BuildConfig.groovy is preety standard:
grails.servlet.version = "3.0" // 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.work.dir = "target/work"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
grails.project.fork = [
test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]
grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution = {
inherits("global") {
}
log "error"
checksums true
legacyResolve false
repositories {
inherits true
grailsPlugins()
grailsHome()
mavenLocal()
grailsCentral()
mavenCentral()
}
dependencies {
runtime 'mysql:mysql-connector-java:5.1.29'
runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
test "org.grails:grails-datastore-test-support:1.0-grails-2.4"
}
plugins {
// plugins for the build system only
build ":tomcat:7.0.55"
// plugins for the compile step
compile ":scaffolding:2.1.2"
compile ':cache:1.1.7'
compile ":asset-pipeline:1.9.6"
compile ":cookie:0.51"
// plugins needed at runtime but not for compilation
runtime ":hibernate4:4.3.5.5" // or ":hibernate:3.6.10.17"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
}
}```
How you know that your Grails instance uses groovy-2.4.0-beta-3? I tried you configuration - works fine
My $GROOVY_HOME is set to /Users/chenk/Documents/groovy-2.4.0-beta-3. I'm using Mac Mavricks 10.9.4.
It might be related to other jars I have on my .classpath. Here's the list of the jars i'm using:
com.springsource.org.codehaus.jackson-1.4.3.jar google-api-client-1.8.0-beta.jar google-api-services-mirror-v1-rev2-1.14.2-beta.jar google-collections-1.0-rc2.jar google-http-client-1.8.3-beta.jar google-oauth-client-1.8.0-beta.jar json-simple.jar com.fasterxml.jackson.databind.jar com.fasterxml.jackson.core.jar jackson-annotations-2.1.2.jar org.apache.httpcomponents.httpcore_4.2.1.jar joda-time-2.2.jar joda-time-2.2.jar httpclient-4.1.jar
Could you use stable groovy version 2.3.6?
Exceptions says that grails can't find or load class org.apache.http.client.HttpResponseException
from dependency httpclient-4.2.6
You can run dependency-report
command to find problems.
Finally found the issue! I didn't have the httpclient-4.2.6.jar on my grails\lib folder.
Thanks!!!
Great!
Hi everyone,
When i'm adding 'compile ": cookie:0.51" ' to my BuildConfig.groovy file, it causes the following error: Configuring classpath Error Error executing script Compile: org/apache/http/client/HttpResponseException (Use --stacktrace to see the full trace)
If I remove this line from the BuildConfig.groovy, everything works again. I'm using Grails 2.4.3 and Groovy 2.4.0.
Thanks!