maven项目发布到tomcat时报错如下:
使用的tomcat7-maven-plugin插件:
百度很久也没解决,求大神指导
缺少 org.apache.http 包中的 HttpEntity.class 这个类,这个类包含在httpcore-4.2.4.jar 中,版本根据自己需要适配
在pom.xml中加入
org.apache.httpcomponents
httpcore
4.2.4
刚才发的"<" 被编译了,pom.xml中加入下面的jar
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.4</version>
</dependency>
有一个类没有找到,加入jar包
pom文件中加入了这个jar 还是依然报错
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
<!-- true:跳过测试 -->
<skip>true</skip>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/</path>
<charset>UTF-8</charset>
<port>8090</port>
<uriEncoding>UTF-8</uriEncoding>
<url>http://106.14.182.46:8080/manager/text</url>
<server>tomcat</server>
<username>tomcat</username>
<password>shby8888</password>
<path>/</path>
<update>true</update>
</configuration>
</plugin>
</plugins>
你看下我的