Maven: Adding a Custom Jar to Build Path

How to add a custom jar to maven build path?

<dependency>
	<groupId>group</groupId>
	<artifactId>artifact</artifactId>
	<version>anything</version>
	<scope>system</scope>
	<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/myjar.jar</systemPath>
</dependency>

2 thoughts on “Maven: Adding a Custom Jar to Build Path

  1. The solution works, but it seems maven does not like the approach, which seems to be perfectly sensible. So does that mean we have different way for this??

  2. bhanu, what do you mean by “does not like the approach”?

    I wish I had a private Maven repository for such artifacts, but unfortunately that’s still not possible in our old environment.

Leave a Reply

Your email address will not be published. Required fields are marked *

Spam protection by WP Captcha-Free