DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Private Remote Maven Repository With Artipie
  • OpenAPI From Code With Spring and Java: A Recipe for Your CI
  • Tracking Dependencies Beyond the Build Stage
  • Automating Maven Dependency Upgrades Using AI

Trending

  • AI Paradigm Shift: Analytics Without SQL
  • Dear Micromanager: Your Distrust Has a Job; It’s Just Not the One You’re Doing
  • Run Gemma 4 on Your Laptop: A Hands-On Guide to Google's Latest Open Multimodal LLM
  • Zero-Downtime Deployments for Java Apps on Kubernetes
  1. DZone
  2. Coding
  3. Java
  4. The Maven Way to Add Non-Maven JARs to a Maven Project [Snippets]

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!

By 
Mohammad Nadeem user avatar
Mohammad Nadeem
·
Jul. 18, 17 · Code Snippet
Likes (13)
Comment
Save
Tweet
Share
27.8K Views

Join the DZone community and get the full member experience.

Join For Free

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.

Apache Maven JAR (file format)

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

Opinions expressed by DZone contributors are their own.

Related

  • Private Remote Maven Repository With Artipie
  • OpenAPI From Code With Spring and Java: A Recipe for Your CI
  • Tracking Dependencies Beyond the Build Stage
  • Automating Maven Dependency Upgrades Using AI

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook