Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

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

maven-project-custom-libs


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

Approach

Add the maven JAR plugin with as shown below:

manve-jar-plugin1

Add the dependency:

manve-jar-plugin2

Refer this gist for the complete example.

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. 

Topics:
plugin ,dependency ,maven ,java ,tutorial

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}