开发者

how to configure maven to use jar files present on the system to satisfy dependency?

I need to 开发者_高级运维configure the jars in my pom.xml file in my web application in such a way that I need not use the lib folder to store all the jar files. Please help.


If you really have dependencies which are stored in a lib folder (I assume those jar's don't exist in Central) you can use the system dependency

   <dependency>
     <groupId>...</groupId>
     <artifactId>..</artifactId>
     <scope>system</scope>
     <systemPath>PathOnYourSystem</systemPath>
   </dependency>

But i assume you mean something different, cause the above will procuce a warning on Maven 3. If you have a dependency which is provided by the Container (for example Tocmat) you can define a dependency as provided. But the best is to put such dependencies into a local repository manager which i hope you are using (Artifactory, Nexus, Archiva).


You can mannually add them to your local repository (since it seems that they are not at central).

But the best would be to set up your own (or company) repository to hold them for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜