I am trying to add a jar file to the Maven dependency in my project. The settings.xml is configured to set the repository to a public repository. But this particular jar is not present in that repo. As i have the jar in my lib folder, how can i configure the Maven dependency to take this jar?
相关问题
- Dependencies while implementing Mocking in Junit4
- Include pom.xml in Jar with gradle
- What order does maven find its dependencies?
- proguard causing EnumMap NPE on dynamically declar
- Maven: How to read the Parent POM version
相关文章
- IDEA2020 安装maven 插件后,springboot程序 SpringBootApplic
- pom文件中的插件定义
- pom.xml中的project为何报红
- Hibernate Tutorial - Where to put Mapping File?
- Handling ffmpeg library interface change when upgr
- Build errors of missing packages in Visual Studio
- java.lang.NoClassDefFoundError: javax/servlet/http
- Cannot use org.jvnet.jax-ws-commons.jaxws-maven-pl
The best solution is to start using a repository manager like Nexus and put it there. Or you can use the non-maven-jar-plugin.
Have a look at system dependencies.
You basically need to define
<scope>system</scope>
.This is if you don't have your own hosted artifact repository server such as Nexus, Artifactory or Archiva.
If you do, then as Karl-Heinz suggested, you would be better off placing it there, as it's not good practice to commit binary artifacts to version control.
Another option is to set up a repository that is backed by a directory inside your project, per this answer: https://stackoverflow.com/a/2230464/433789