MQ消费者报错

我在运行MQ消费者时  报了如下错误

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (default-cli) on project consumer: Command execution failed.

 

解决办法

第一步:

在pom.xml文件上增加这个插件

  <build>
      <plugins>
          <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <version>1.6.0</version>
              <executions>
                  <execution>
                      <goals>
                          <goal>java</goal>
                      </goals>
                  </execution>
              </executions>
              <configuration>
                  <classpathScope>test</classpathScope>
                  <!--<mainClass></mainClass>-->
              </configuration>
          </plugin>
      </plugins>
</build>

第二步:

在setting->maven->Runner->VM Options一栏中填入 -Dfile.encoding=gb2312

原本

修改成

 

运行

以上解决办法来自以下大佬的文章

解决Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli) on project_org.codehaus.mojo报错_刘二火的博客-CSDN博客

猜你喜欢

转载自blog.csdn.net/m0_59281987/article/details/131867796
今日推荐