美文网首页
Maven相关问题总结

Maven相关问题总结

作者: codingJanson | 来源:发表于2018-11-29 11:16 被阅读0次

1、打包时测试类异常

常见error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project product-client: There are test failures. [ERROR] 

解决方案:

使用插件,在相应pom.xml文件里面,修改

<plugin>

         <groupId>org.apache.maven.plugins

        <artifactId>maven-surefire-plugin

        <testFailureIgnore>true

</plugin>

2、打包时找不到mainClass

常见Error:

 [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage (default) on project webapps-api-bid: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.3.RELEASE:repackage failed: Unable to find main class

解决方案:

1、配置主类程序入口,并添加@SpringBootApplication注解。

2、注释掉pom里面的

<plugin>

    <groupId>org.springframework.boot</groupId>

    <artifactId>spring-boot-maven-plugin</artifactld>

</plugin>

相关文章

  • Maven相关问题总结

    1、打包时测试类异常 常见error: Failed to execute goal org.apache.mav...

  • Maven 相关概念总结

    Maven 相关概念总结 构建原理 Maven 构建项目的规则是约定大于配置,约定指 Maven 提倡项目应遵循标...

  • Maven详解(非原创)

    文章大纲 一、maven功能介绍二、maven整合javaweb案例三、私服应用(了解)四、总结五、相关资料下载六...

  • Maven问题总结

    项目拷贝的编码独立性[WARNING] Using platform encoding (UTF-8 actual...

  • maven 问题总结

    发布jar包时,更改maven设置,将proxy删除 401错误,认证失败,需要增加user和password信息

  • maven 问题总结

    1. pom 报错问题1在 http://search.maven.org/ 中明明发现了某一版本的jar包 结果...

  • Maven相关问题及解答

    文章定位 我写该篇文章是为搜集一些Maven使用中的常见问题并尽可能给出解决方案,每个正在学习Maven的同学都可...

  • 本人Maven问题总结

    在导入一个maven项目的过程中遇到的问题。 首先是:No marketplace entries found t...

  • maven 项目路径相关问题配置

    首先看web 最外层的pom 然后看子pom 如果子pom中有路径,会覆盖父类中的路径 然后再看项目配置路径 sh...

  • maven相关

    设置新的版本号mvn versions:set -DnewVersion=1.1.0当新版本号设置不正确时可以撤销...

网友评论

      本文标题:Maven相关问题总结

      本文链接:https://www.haomeiwen.com/subject/zopxcqtx.html