gretty icon indicating copy to clipboard operation
gretty copied to clipboard

gretty webAppCopy also affects the war task

Open levsa opened this issue 9 years ago • 5 comments

I've added test resources to the webapp using gretty's webAppCopy:

    webappCopy {
        from "$projectDir/src/test/resources"
        include "**/*"
    }

But this affects the war task from the war plugin as well, i.e., I get the test resources in the production webapp. Is this by design? It would be nice and make testing easier if this only affected the gretty tasks.

levsa avatar Jun 12 '15 08:06 levsa

yes, this was specifically requested by other Gretty users. I'll try to introduce control over it, maybe some property.

akhikhl avatar Jun 17 '15 09:06 akhikhl

That would be great, thanks! My current, not so nice solution is an if-statement around webappCopy that checks the tasks given on the command line :-/

levsa avatar Jun 20 '15 11:06 levsa

Hey, there— if I could ask, have you found a better workaround— or could I see your solution? I seem to be having the same problem.

Dispader avatar Sep 02 '15 17:09 Dispader

Any news on this? It really breaks the plugin for us.

We want to build normal war files for deployment on jboss, but want to test locally on jetty, To do this, we need to change our spring contextConfigLocation to a jetty-specific one.

NielsUll avatar Jun 17 '16 12:06 NielsUll

Still nothing on this? I have some filtering that I only want to apply when running locally withing gretty, but not when deploying to production. With my limited gradle knowledge I can't find any workaround for this, like disabling gretty when building for production.

baldervanx avatar Nov 21 '17 12:11 baldervanx