将 gdata jar 复制到根目录:`WEB-INF/lib` 或子目录:`WEB-INF/lib/gdata/blogger/2.0` 等?
我正在使用 Google gdata
库。我将其安装在我的本地 Maven 存储库中,因为无法使用 pom
从 Maven 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在
/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 inlib
), or explicitly add the paths to those new folders to servletcontainer's runtime classpath.