天天看點

MAVEN項目中添加jar包httpclient-4.3.5.jar,commons-logging-1.1.1.jar,httpcore-4.3.2.jar

1.打開maven項目中的pom.xml文檔,點選pom.xml标簽

MAVEN項目中添加jar包httpclient-4.3.5.jar,commons-logging-1.1.1.jar,httpcore-4.3.2.jar

1.

2.到maven官網https://mvnrepository.com/檢視是否有你想要的那個jar包

MAVEN項目中添加jar包httpclient-4.3.5.jar,commons-logging-1.1.1.jar,httpcore-4.3.2.jar

3.點選我們要的jar包名,進入以下界面選擇版本

MAVEN項目中添加jar包httpclient-4.3.5.jar,commons-logging-1.1.1.jar,httpcore-4.3.2.jar

4.點選需要的版本,進入以下界面,添加下面的代碼到pom.xml文檔中的dependencies裡面即可。

<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->

<dependency>

    <groupId>org.apache.httpcomponents</groupId>

    <artifactId>httpclient</artifactId>

    <version>4.3.5</version>

</dependency>

MAVEN項目中添加jar包httpclient-4.3.5.jar,commons-logging-1.1.1.jar,httpcore-4.3.2.jar

5.重新執行mvn指令,項目就會自動包含需要的jar包了。



繼續閱讀