0%

Maven 打包常用命令

maven command

  1. 打包
1
mvn clean package
  1. 打包跳过测试
1
mvn clean package -Dspring.test.spip=true
  1. 打包指定环境
1
2
3
4
# 默认使用配置
spring:
profiles:
active: ${spring.profiles.active}

maven 打包

1
mvn clean package -Pdev

启动jar指定环境

1
java -jar my.jar --spring.profiles.active=dev