Over a million developers have joined DZone.

The Maven Way to Add Non-Maven JARs to a Maven Project [Snippets]

DZone's Guide to

The Maven Way to Add Non-Maven JARs to a Maven Project [Snippets]

Sometimes we need to add non-Maven controlled JARs into our projects. In this post, we take a quick look at a Maven-based solution for doing this!

· Java Zone
Free Resource

Try Okta to add social login, MFA, and OpenID Connect support to your Java app in minutes. Create a free developer account today and never build auth again.

Have you ever asked, "How do I add custom (non-maven) JARs as dependencies to maven projects, in a maven way?"


Answer: Easy. Use the maven-install-plugin maven plugin,


Add the maven JAR plugin with as shown below:


Add the dependency:


Refer this gist for the complete example.

Build and launch faster with Okta’s user management API. Register today for the free forever developer edition!

plugin ,dependency ,maven ,java ,tutorial

Published at DZone with permission of Mohammad Nadeem, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}