[英]Add dependency to Maven without editing pom.xml
I'm trying to add a JAR local file as a dependency to a Maven project in Eclipse, but I have the restriction that the client doesn't want me to edit the pom.xml
file. 我试图将JAR本地文件添加为对Eclipse中Maven项目的依赖,但是我有一个限制,即客户端不希望我编辑
pom.xml
文件。
My JAR is located in WEB-INF/lib. 我的JAR位于WEB-INF / lib中。 I tried the solution proposed in Adding Jar File to WEB-INF/lib but it didn't work.
我尝试了将Jar文件添加到WEB-INF / lib中提出的解决方案,但没有成功。
To verify that the project compiles correctly adding the JAR, I added it in the pom.xml
file in my machine and it worked. 为了验证项目是否可以正确添加JAR,我将其添加到了计算机的
pom.xml
文件中,并且可以正常工作。
The official documentation of Maven proposes three solutions, all of them involve editing the pom.xml
file: http://maven.apache.org/pom.html#Dependencies Maven的官方文档提出了三种解决方案,它们全部涉及编辑
pom.xml
文件: http : //maven.apache.org/pom.html#Dependencies
Is it actually possible to include a JAR dependency to a Maven project without editing the pom.xml
file? 实际上是否可以在不编辑
pom.xml
文件的情况下将JAR依赖项包含到Maven项目中?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.