Initially want to pour into the local jar package, directly using the import local jar package, found that it is not possible, because it is MAVEN unified management jar package, so direct import is not possible. And then on the Internet to see a lot of ways, including installing the jar package in the terminal, but found that their command did not, to install MAVEN (I am IntelliJ bring maven), for a long time, in fact, I just want to join a local jar package, do a lot of trouble to find it useless.
Finally I joined the Lib folder in the Web-int and put my jar package in the folder. And the following statements are added to the pom.xml:
<!-- Ali greater than jar--> <dependency> <groupId>my-jar</groupId> <!-- Take your own pick-up <artifactId>my-jar</artifactId> <!--yourself- <version>1.0</ version><!--your own pick-up <scope>system</scope> <systempath>${project.basedir}/ Src/main/webapp/web-inf/lib/taobao-sdk-java-auto_1455552377940-20160607.jar</systempath> </ Dependency>
<!--local warehouse add plug-in <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <id>make-assembly</id> <phase>package& Lt;/phase> <goals> <goal>shade</goal> </goals> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> & Lt;/descriptorrefs> <finalName>xxx-jar-with-dependencies</finalName> </configuration> </execution> </executions> < ;/plugin>
Ali larger than jar package import maven