Home > Testing, Uncategorized, frustration, grails, maven, unit test > Grails, Maven, packaging, and skipTests fun

Grails, Maven, packaging, and skipTests fun

April 22nd, 2010

The grails maven plugin honors the maven.test.skip option (which turns off compiling and executing tests), but not the skipTests option (which only turns off executing tests). This means that you cannot easily create a package with test classes in it without running all of the tests. I finally come up with a close work around:

mvn clean grails:exec install -Dcommand=test-app -Dargs="-unit DoesNotExist" -Dmaven.test.skip=true

By explicitly listing the test-app command but specifying a test that does not exist, I was able to get the unit tests to be compiled. Since I only needed some common testing files in my package, this works for me. If someone wanted to package both the unit and integration tests, I don’t think this would work. I filed a new issue in the Grails Jira to try to get a real resolution.

eric Testing, Uncategorized, frustration, grails, maven, unit test , , ,

  1. No comments yet.
  1. No trackbacks yet.