0

How to Add JAR Local from POM

asked 2019-10-23 17:11:39 +0800

Naufal123Seropo gravatar image Naufal123Seropo
3 1

updated 2019-10-23 17:11:58 +0800

Hello i want to ask i have jar in local drive i already import jar using buldpath add external jar but still doesn't work so i want to try to add jar local using from pom can someone helpme how to add jar local drive using pom thanks in advances

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-11-14 14:28:21 +0800

cor3000 gravatar image cor3000
5384 2 7
ZK Team

updated 2019-11-14 14:33:01 +0800

in such cases I use a system scoped dependency, even though it's deprecated it often helps during local development. I usually create a folder /lib-ext below my project. And place local jars there, then I add a system dependency like this:

<dependency>
    <groupId>some.group</groupId>
    <artifactId>any-artifact</artifactId>
    <version>0.0.0</version>
    <systemPath>${project.basedir}/lib-ext/any.jar</systemPath>
    <scope>system</scope>
</dependency>

An not deprecated alternative is to place the jar into a local repository:

https://stackoverflow.com/questions/3765903/how-to-include-local-jar-files-in-maven-project/19226672#19226672

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2019-10-23 17:11:39 +0800

Seen: 7 times

Last updated: Nov 14 '19

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More