How to set grails.war.exploded=true in a Maven build with fork=true.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set grails.war.exploded=true in a Maven build with fork=true.

Sean Gilligan-4
I'm using Grails 2.1.1 and the latest Grails Maven Plugin to build a
WAR.  I want to be able to build an exploded war by setting the
"grails.war.exploded" property.
I'm using "mvn -Dgrails.war.exploded=true grails:war" but it doesn't
seem to be working.

I am using the <fork>true</fork> to avoid classpath issues, so that
might be a factor.  (If I set fork=false the build fails with a
classpath issue, so it's not easy for me to test it that way.)

How can I set grails.war.exploded=true in this situation?

Thanks,

Sean


P.S. I'd be even happier if there was a way to do an "inplace" build of
the web-app -- if there's a way to do that I'd be ecstatic.  (We are
developing using Resin and the Grails app needs to communicate with
legacy components that are configured in Resin, so an "grails run-app"
isn't an option for us.)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: How to set grails.war.exploded=true in a Maven build with fork=true.

Sean Gilligan-4
SOLVED.

I had deleted my BuildConfig.groovy (because it's not really needed when
doing a Maven build)

I added one that contains:

if (Environment.current == Environment.DEVELOPMENT) {
     println "Environment is ${Environment.current}.  Setting
grails.war.exploded = true"
     grails.war.exploded = true
}

That did the trick.  (I should have known that a system property was not
what I needed.)

I'd still love to be able to do an "in place" build somehow.  Does
anyone know how?

-- Sean


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email