java war/web-inf/lib arborescence.

56 views
Skip to first unread message

Trez Ertzzer

unread,
Dec 15, 2015, 10:27:15 AM12/15/15
to Google App Engine
Hello.
I would like to know if it is possible to have subdirectories in war/web-inf/lib that would include some jar files.

for exemple
war/web-inf/lib/twilio would be a folder that contains twilio and all its dependencies....

thank you.

Nick

unread,
Dec 15, 2015, 3:43:45 PM12/15/15
to Google App Engine
Your best bet is to use a dependency manager in your build tool and ignore the lib folder entirely. Dependencies in Java are not isolated in any way, so even if you achieve this it won't reflect reality (i.e. Shared dependencies such as asm, cglib, commons etc)

🌲🌳🌲🌳🌲🌳🌲🌳🌲🌳🌲

Trez Ertzzer

unread,
Dec 17, 2015, 11:32:27 AM12/17/15
to Google App Engine
Hello.
Thanks for your answer.
maybe my question was not clear enough:
I am using eclipse and GPE (I do not want to use any other tool).

imagine I have created a JAR (by myself) called myPersonalLibrary.jar
my question is:
can I put this jar in

war/web-inf/lib/others/myPersonalLibrary.jar?

or do I have to put it in
war/web-inf/lib/myPersonalLibrary.jar?

This is a yes/no question...

if it's a no then thank you for your suggestions.

Nick (Cloud Platform Support)

unread,
Dec 21, 2015, 3:04:56 PM12/21/15
to Google App Engine
Hey Trez,

We here in the Community Support branch of Cloud Platform Support usually monitor threads like these to see if there are unresolved questions from community members. I just wanted to jump in here to clarify that yes, for J2EE structured applications in WAR format, the deployment format for Java App Engine, WEB-INF/lib is where your jar files should be, and subdirectories will not be scanned for jars. There are numerous threads around the internet discussing this, such as this excellent Stack Overflow Q&A. If you'd like to have a more custom deployment environment than App Engine, consider Compute Engine or Managed VM Custom Runtimes
Reply all
Reply to author
Forward
0 new messages