将 gdata jar 复制到根目录:`WEB-INF/lib` 或子目录:`WEB-INF/lib/gdata/blogger/2.0` 等?

发布于 2024-09-29 13:39:53 字数 712 浏览 1 评论 0原文

我正在使用 Google gdata 库。我将其安装在我的本地 Maven 存储库中,因为无法使用 pomMaven Central 获取它。

我想将其移动到我的 WEB-INF/lib 目录,这样我就不必等待来自 Maven下载”消息strong> 每次我重新启动服务器时。

但是,它们目前的目录结构如下:

~\wiki\.m2\repository\gdata\base\1.0
~\wiki\.m2\repository\gdata\blogger\2.0
~\wiki\.m2\repository\gdata\books\1.0

如果我想将 jar 安装在我的 WEB-INF/lib 文件夹中,以便不需要 pom,我可以将整个 gdata 目录复制到

WEB-INF/lib

或者我应该将每个 jar 文件一一复制到 WEB-INF/lib 目录的根目录中,而不是:

WEB-INF/lib/gdata/base/1.0
WEB-INF/lib/gdata/blogger/2.0
WEB-INF/lib/gdata/books/1.0

I'm using Google's gdata library. I installed it in my local Maven repository because it is not available from Maven Central using a pom.

I want to move it to my WEB-INF/lib directory so that I do not have to wait for the dozens of "Downloading" messages from Maven each time I restart the server.

However, they are currently in a directory structure like this:

~\wiki\.m2\repository\gdata\base\1.0
~\wiki\.m2\repository\gdata\blogger\2.0
~\wiki\.m2\repository\gdata\books\1.0

If I want to install the jars in my WEB-INF/lib folder so that the pom is not needed, can I copy the entire gdata directory to

WEB-INF/lib

Or should I just copy each jar file one-by-one into the base of the WEB-INF/lib directory rather than:

WEB-INF/lib/gdata/base/1.0
WEB-INF/lib/gdata/blogger/2.0
WEB-INF/lib/gdata/books/1.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

贩梦商人 2024-10-06 13:39:53

如果您在 /WEB-INF/lib 中创建额外的文件夹,则默认情况下它们不会出现在 servletcontainer 的运行时类路径中。因此,要么不创建这些文件夹(将整个 JAR 直接放入 lib 中),要么将这些新文件夹的路径显式添加到 servletcontainer 的运行时类路径中。

If you create extra folders inside /WEB-INF/lib, they are by default not taken in the servletcontainer's runtime classpath. So, either just don't create those folders (put whole JAR straight in lib), or explicitly add the paths to those new folders to servletcontainer's runtime classpath.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文