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

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.lryc.cn/news/250749.html

相关文章:

  • Linux MIPI 调试中常见的问题
  • 使用极限网关助力 ES 集群无缝升级、迁移上/下云
  • RedisTemplate的配置和讲解以及和StringRedisTemplate的区别
  • 在oracle中的scn技术
  • LINUX 嵌入式C编程--信号编程
  • Linux:优化原则
  • HarmonyOs 4 (一) 认识HarmonyOs
  • System.out.println隐藏字符串
  • Java中的线程池你了解多少?
  • leetCode 131.分割回文串 + 动态规划 + 回溯算法 + 优化 + 图解 + 笔记
  • 【傻瓜级JS-DLL-WINCC-PLC交互】3.JS-DLL进行交互
  • 深度学习手势识别算法实现 - opencv python 计算机竞赛
  • 2023-12-01 AIGC-自动生成ppt的AI工具
  • NoSQL 数据建模错误会降低性能
  • 在Android上搭建一个NDK项目
  • TOP-K问题和向上调整算法和向下调整算法的时间复杂度问题的分析
  • 3、服务器性能剖析
  • xxl-job 分布式任务调度框架
  • 软件使用-stm32入门
  • 使用MAT分析内存泄漏(mac)
  • 【Vue】Linux 运行 npm run serve 报错 vue-cli-service: Permission denied
  • LeetCode的几道题
  • NLP/Natural Language Processing
  • 【教学类-06-12】20231202 0-9数字分合-房屋样式(一)-下右空-升序-抽7题
  • uni-app 微信小程序 电子签名及签名图片翻转显示功能
  • MySQL 8.0关键字和保留字
  • PyLMKit(3):基于角色扮演的应用案例
  • JAVA全栈开发 集合详解(day14+day15汇总)
  • Linux Spug自动化运维平台本地部署与公网远程访问
  • zookeeper集群和kafka集群