GoogleCloudPlatform / gradle-appengine-plugin

Gradle plugin that provides tasks for uploading, running and managing Google App Engine projects
Apache License 2.0
236 stars 60 forks source link

exclude jars #277

Closed wmacgyver closed 7 years ago

wmacgyver commented 7 years ago

Is it possible to exclude specific jars from being deployed to app engine?

loosebazooka commented 7 years ago

Can you elaborate?

On Feb 21, 2017 19:52, "Mac" notifications@github.com wrote:

Is it possible to exclude specific jars from being deployed to app engine?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/issues/277, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPo-k06bkQfQThJae0ARZvvSX3hcZ0hks5re4bGgaJpZM4MIEON .

wmacgyver commented 7 years ago

@loosebazooka there have been times that I use framework that pulls in jetty embedded server. so the final deploy to GAE I end up with WEB-INF/lib/jetty-http-9.3.6.v20151106.jar etc etc

which is of course not useful on GAE. I can exclude them in the dep block.

but I wasn't sure if there is another way

loosebazooka commented 7 years ago

If you don't need it at any point during your development, I would probably just put it in the exclude of the dependency.

There are some standard gradle exclusion techniques when generating the war which don't put the jar in the war/lib directory as see in this question : http://stackoverflow.com/questions/20707543/gradle-how-to-exclude-jar-from-a-war

But there's no appengine deployment specific exclusion mechanisms.

wmacgyver commented 7 years ago

oh, I didn't realize the plugin extends the war task. yea, I can just exclude it using war task way.

thank you!

loosebazooka commented 7 years ago

okay, I'm going to close this issue

wmacgyver commented 7 years ago

@loosebazooka thank you very much for your help. I just tried it using war exclude, was able to verify in both build/exploded-app/WEB-INF/lib/

and also the final deployed appengine artifact that the exclusion worked