Software Development

Point to local dependency in Maven using systemPath

[wp_ad_camp_1]

Sometimes you may not have access to a repository and may need to go around it. If your colleagues have local copies of jar files needed to compile a whole Maven project, you may simply replace the content of your .m2 directory with theirs. But what if there was change to your pom.xml and none of you had fetched the updates/dependencies via Maven? Worse, you may not have direct access to their respective repositories.

If those dependencies (e.g., jar files)are found elsewhere, you may download them and modify your pom.xml to point to those local copies. Not really a good practice but something nice-to-know in case you need a short-cut.

Maven Dependency using systemPath

This is how your project structure would look like:

16-3-2016 10-36-09 AM

[wp_ad_camp_5]

Loading

Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.


You Might Also Like