当前位置: 首页 > article >正文

Maven终端打包时报Unknown lifecycle phase “.test.skip=true“

错误实例代码

mvn clean package -Dmaven.test.skip=true  

再windows的cmd窗口进行项目打包,需要将参数用英文符号包裹起来“ ' ”

【正确的实例】:mvn clean package ’-Dmaven.test.skip=true‘

PS D:\BaiduNetdiskDownload\qian\Springboot-Vue\big-event> mvn clean package -Dmaven.test.skip=true
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.itpuddy:big-event >------------------------
[INFO] Building big-event 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.284 s
[INFO] Finished at: 2023-12-02T15:45:45+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase ".test.skip=true". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException

正确演示

mvn clean package ’-Dmaven.test.skip=true‘

PS D:\BaiduNetdiskDownload\qian\Springboot-Vue\big-event> mvn clean package '-Dmaven.test.skip=true'
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.itpuddy:big-event >------------------------
[INFO] Building big-event 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ big-event ---
[INFO] Deleting D:\BaiduNetdiskDownload\qianzixiang\Springboot-Vue\big-event\target
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ big-event ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ big-event ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 28 source files to D:\BaiduNetdiskDownload\qianzixiang\Springboot-Vue\big-event\target\classes
[INFO] /D:/BaiduNetdiskDownload/qianzixiang/Springboot-Vue/big-event/src/main/java/org/itpuddy/pojo/Result.java: 某些输 入文件使用了未经检查或不安全的操作。
[INFO] /D:/BaiduNetdiskDownload/qianzixiang/Springboot-Vue/big-event/src/main/java/org/itpuddy/pojo/Result.java: 有关详 细信息, 请使用 -Xlint:unchecked 重新编译。
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ big-event ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ big-event ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ big-event ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.2.2:jar (default-jar) @ big-event ---
[INFO] Building jar: D:\BaiduNetdiskDownload\qian\Springboot-Vue\big-event\target\big-event-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.7.14:repackage (repackage) @ big-event ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.883 s
[INFO] Finished at: 2023-12-02T15:51:20+08:00
[INFO] ------------------------------------------------------------------------


http://www.kler.cn/a/153984.html

相关文章:

  • 算法 二分法查找的利弊
  • 网络爬虫 Python 第二课
  • C++内存管理 - new/delete
  • 如何轻松导出所有 WordPress URL 为纯文本格式
  • WebRTC视频 02 - 视频采集类 VideoCaptureModule
  • gitlab 服务器集群配置及 存储扩展配置
  • Java Servlet
  • MySQL安全相关——TDE和数据脱敏功能介绍
  • C++的类和对象(一)
  • 分享88个节日PPT,总有一款适合您
  • 【slab/0x40 UAF】TPCTF2023 - core 一题多解
  • 微信小程序实现打分效果代码整理
  • Golang分布式事务
  • 尝试修改vim光标的思路
  • 文件搜索工具HoudahSpot mac中文版特点
  • 网站更换IP的四大注意事项
  • MagicPipe3D地下管网三维建模数据规格
  • 医疗器械设备模组的具体应用
  • UniApp项目中 使用微信小程序原生语言 进行开发
  • 如何在vs2017及以前版本(vs2010、vs2015)上添加 添加类型库中的MFC类
  • C++作业4
  • 解决了布局问题1和布局问题2,接下来,你的Main函数如果写成下面这样,直接运行,什么也不会显示?
  • java设计模式学习之【建造者模式】
  • TCP网络常见名词
  • 本地navicate连接不上远程mysql主机
  • 基于若依的ruoyi-nbcio流程管理系统增加流程节点配置(三)