Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What happens when there is jar in the local library of maven, but the project goes to the central repository to fetch it?

Shulou Source: shulou.com Published: 2022-06-02 07:51:25 10月08日 Update

This article mainly introduces "what happens when there is jar in the local library of maven, but the project goes to the central library to fetch it". In the daily operation, it is believed that many people have jar in the local library of maven, but the project has doubts about what it is to fetch from the central library. The editor has consulted all kinds of materials and sorted out a simple and useful method of operation, hoping to answer "there is jar in the local library of maven." It is helpful to wonder what it is like for the project to go to the central treasury. Next, please follow the editor to study!

Just delete _ remote.repositories

Delete code

Static int iTunes 0; public static void main (String [] args) {FileUtil.removeFiles (new File ("C:\\ Program Files\\ apache-maven-3.5.3-bin\\ repository");} private static void removeFiles (File ff) {/ / iPreventive if (I > 4) return If (ff.isFile ()) {if ("_ remote.repositories" .equals (ff.getName () {ff.delete (); System.err.println ("File remove > >" + ff.getAbsoluteFile ());} else if (ff.isDirectory ()) {File [] fileList = ff.listFiles () If (fileListered null & & fileList.length > 0) {for (File file:fileList) {removeFiles (file);} else {System.err.println ("= Unknow=") }} at this point, the study of "what is the situation when there is jar in the local library of maven, but the project goes to the central library" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Central situation project learning more help practical next code article method theory knowledge article website material follow problem easy to use practice Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS MySQL Huawei Linux Docker