You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brian Peterson <di...@verizon.net> on 2009/06/05 02:12:25 UTC
problem with servlet context in grails app as a module
I have a maven project with a module that is a grails application, and I'm getting different servlet contexts during integration tests depending on where I run mvn install. I have this directory structure for my parent project and grails module:
foo-project
foo-grails
grails-app
src
target
test
web-app
I added two printlns to the controller:
println grailsApplication.mainContext.getResource('/').getFile()
println grailsApplicatoin.parentContext.getResource('/').getFile()
When I do a mvn install from the grails project, I get the expected paths:
c:\projects\foo-project\foo-grails\web-app
c:\projects\foo-project\foo-grails\web-app
but when I run mvn install from the parent, I get different resource roots:
c:\projects\foo-project\web-app
c:\projects\foo-project\foo-grails\target\resources
There isn't even a web-app directory under foo-project. How do I configure the pom for the parent or the module to make the two cases consistent?
Brian