只需在pom.xml添加如下即可

<skipTests>true</skipTests>

pom文件如下

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
<java.version>1.8</java.version>
<skipTests>true</skipTests>
</properties> <groupId>xxxx</groupId>
<artifactId>xxx</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>xxxx</name>
<description>xxxx</description> <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement> <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build> <modules>
<module>xxxx</module>
<module>xxxxx</module>
<module>xxxxx</module>
</modules> </project>

springboot插件打包跳过单元测试的更多相关文章

  1. maven项目打包跳过单元测试

    在pom.xml中添加一下代码: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifact ...

  2. maven常用插件: 打包源码 / 跳过测试 / 单独打包依赖项

    一.指定编译文件的编码 maven-compile-plugin <plugin> <groupId>org.apache.maven.plugins</groupId& ...

  3. maven项目打包和编译跳过单元测试和javadoc

    代码中可能由于单元测试.注释(方法中的参数)或者maven javadoc插件的问题导致无法打包,影响工作,为避免这两种情况可以在打包时输入命令: mvn clean install -Dmaven. ...

  4. SpringBoot使用maven插件打包時報:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException的處理方案

    SpringBoot使用maven插件打包時報:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExec ...

  5. 解决spring-boot-maven-plugin插件打包,springboot启动时报找不到主main问题

    一:遇到的问题及解决方法 最近在搭建一个新项目时,使用spring-boot-maven-plugin插件打包,springboot项目在发布后启动时遇到找不到主main问题. 遇到这个问题当时感觉本 ...

  6. springboot maven打包插件

    <build> <plugins> <!-- springboot maven打包--> <plugin> <groupId>org.spr ...

  7. maven中跳过单元测试

    Maven 提供了跳过单元测试的能力,只需要使用 Surefire 插件的 skip 参数. 在命令行,只要简单的给任何目标添加 maven.test.skip 属性就能跳过测试: $ mvn ins ...

  8. ******可用 SpringBoot 项目打包分开lib,配置和资源文件

    spring-boot多模块打包后,无法找到其他模块中的类https://blog.csdn.net/Can96/article/details/96172172 关于SpringBoot项目打包没有 ...

  9. 将自己的SpringBoot应用打包发布到Linux下Docker中

    目录 将自己的SpringBoot应用打包发布到Linux下Docker中 1. 环境介绍 2. 开始前的准备 2.1 开启docker远程连接 2.2 新建SpringBoot项目 3. 开始构建我 ...

随机推荐

  1. [MySQL实战-Mysql基础篇]-mysql架构

    1.基本组成 下面是mysql的基本架构示意图  图一 图二 我们可以从图上看出,mysql大体分为两个部分,一个是server层,另一个是引擎层. server层中包含了连接器.查询缓存.分析器.优 ...

  2. Go modules基础精进,六大核心概念全解析(上)

    点击一键订阅<云荐大咖>专栏,获取官方推荐精品内容,学技术不迷路! Go 语言做开发时,路径是如何定义的?Go Mudules又为此带来了哪些改变?本文将会全面介绍Go modules六大 ...

  3. java的bio和nio写入及读取txt文件

    一.bio的写入及读取 1.采用bio之BufferedWriter 写入文件 public static void main(String[] args) throws IOException { ...

  4. LuoguP7019 [NWRRC2017]Auxiliary Project 题解

    Update \(\texttt{2021.6.24}\) 修改了一处格式上的错误和一处笔误. Content 已知用 LED 灯来显示 \(0\sim9\) 这十个数字分别需要 \(6,2,5,5, ...

  5. TensorFlow.NET机器学习入门【3】采用神经网络实现非线性回归

    上一篇文章我们介绍的线性模型的求解,但有很多模型是非线性的,比如: 这里表示有两个输入,一个输出. 现在我们已经不能采用y=ax+b的形式去定义一个函数了,我们只能知道输入变量的数量,但不知道某个变量 ...

  6. SpringBoot项目给静态变量static注入@Value

    @value不能直接注入值给静态属性,spring 不允许/不支持把值注入到静态变量中:spring支持set方法注入,我们可以利用非静态setter 方法注入静态变量 @Component publ ...

  7. JAVAWEB使用保存cookie、删除cookie、获取cookie工具类

    package com.test; import org.apache.commons.lang.StringUtils; import org.springframework.util.Assert ...

  8. win10+vs2015编译nanogui

    !!版权声明:本文为博主原创文章,版权归原文作者和博客园共有,谢绝任何形式的 转载!! 作者:mohist 说明: A.OS : win10 1909 ,没有配置OpenGL开发环境的 经历. B. ...

  9. 【九度OJ】题目1475:IP数据包解析 解题报告

    [九度OJ]题目1475:IP数据包解析 解题报告 标签(空格分隔): 九度OJ http://ac.jobdu.com/problem.php?pid=1475 题目描述: 我们都学习过计算机网络, ...

  10. 【LeetCode】55. Jump Game 解题报告(Python & C++)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 贪心 日期 题目地址:https://leetcod ...