Fork me on GitHub

LD.

Music, software, life… and stuff.

[ Twitter ] [ GitHub ] [ Linked In ]

Grails, WebTest and JQuery.

The recently released grails-webtest 2.0.2 now installs WebTest via dependency resolution.

This allows you to work around the HTMLUnit 2.4 incompatibility with JQuery. WebTest 3.0 depends on HTMLUnit 2.4, but we can force the use of HTMLUnit 2.5 which works with JQuery.

Simply add it as a dependency in your app.

grails.project.dependency.resolution = {
    inherits "global"
    log "warn"

    repositories {
        grailsHome()
        mavenCentral()
    }
  
    dependencies {
        test('net.sourceforge.htmlunit:htmlunit:2.5') {
            excludes 'xalan' // IVY-1006 - use xalan 2.7.0 to avoid (see below)
            excludes 'xml-apis' // GROOVY-3356
        }
        test('xalan:xalan:2.7.0') {
            excludes 'xml-apis' // GROOVY-3356
        }
    }
}    

Posted: Mar 11th, 2010 @ 3:16 pm

Tags: #software  #grails  

Comments

Archive · RSS · Theme by Autumn