The combined plurality jar package, and PW by reliance

 

Background: Many maven jar wrapped in a warehouse not, if you add a number of items of local jar package, others can not get the code to compile

Requirements: The local jar package uploaded to rely on private servers and set up, more if the jar package, but they all belong to the same function, need to be merged into a jar package

method:

  A combined package jar

    1, will be merged into the same JAR file folder;

         2, enter the command line;

         3, navigate to the current folder;

    4, extract the jar by jar command will extract all packages, command> jar -xvf xx.jar; Note: where there is much you want to jar the merger would need to extract many times.

    5, delete the .jar files in the directory, the command is> del * .jar;

    6, combine all .class files to jar, command> jar -cvfM name.jar, pay attention to:.. Jar (jar behind there is space, there is a space behind point)

 

  Second, upload PW

    

    

 

 

  Third, the introduction of dependency (address shown in the figure ⑥)

    E.g:

      

 

 

 

Guess you like

Origin www.cnblogs.com/java-bhp/p/11401864.html