This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10957|Reply: 1

[Source] There are three ways that Java Maven projects reference local jar packages

[Copy link]
Posted on 2/9/2022 10:13:27 AM | | | |
Requirements: Maven projects need to reference third-party jar packages, which are provided by third-party companies and cannot be downloaded through public repositories.

Method 1: build path

Create a new lib folder, copy the jar file into the folder, right-click the jar package, Build Path--Add to Build Path



Method 2: Introduce through systemPath

Method 3: Push to the local repository

Package it into the local repository via maven-install-plugin

Of course, you can push the local repository directly through the command line, please refer to the following:

Maven command pushes third-party jar packages to Nexus private repositories
https://www.itsvse.com/thread-10205-1-1.html
After that, you can directly edit the pom.xml method for references.





Previous:Java dynamically spliced SQL statements prevent database injection
Next:How to rename files in batches in Linux
Posted on 2/13/2022 4:35:43 PM |
Learned。。。。。。。
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com