maven

Skip single test with maven with command line options

拥有回忆 提交于 2021-02-18 05:10:36
问题 I would like to skip a single test (e.g. com.example.MyTest ) when building a project with Maven from the command line. I'm aware of similar questions like this one, but they all require either modification of source code or pom.xml . I would like to do without modifications. How can I exclude a test using command line options only? What I've tried so far after reading some documentation is mvn clean install -Dtest="*,!com.example.MyTest" but the test is still not skipped. I'm using surefire

Skip single test with maven with command line options

纵然是瞬间 提交于 2021-02-18 05:10:17
问题 I would like to skip a single test (e.g. com.example.MyTest ) when building a project with Maven from the command line. I'm aware of similar questions like this one, but they all require either modification of source code or pom.xml . I would like to do without modifications. How can I exclude a test using command line options only? What I've tried so far after reading some documentation is mvn clean install -Dtest="*,!com.example.MyTest" but the test is still not skipped. I'm using surefire

spring boot 集成mybatis报错Missing artifact

耗尽温柔 提交于 2021-02-18 03:49:22
1. pom文件中的oracle依赖提示Missing artifact,需要手动下载并导入maven 参考 oracle依赖下载地址 (ojdbc6.jar) cd到下载的ojdbc6.jar所在路径,执行命令 mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc6.jar mac端一样。 命令和执行结果截图: pom文件中添加依赖: < dependency > < groupId > com.oracle </ groupId > < artifactId > ojdbc6 </ artifactId > < version > 11.2.0.1.0 </ version > </ dependency > 此时,项目在pom文件中如果报错Missing artifact ,检查以下: 看结果中导入的文件位置是 查看maven使用的repository位置: 将生成的oracle文件拷贝到对应目录下。 来源: oschina 链接: https://my.oschina.net/u/4261514/blog/4197862

JUnit test class order

耗尽温柔 提交于 2021-02-17 19:20:14
问题 I have a java app with maven. Junit for tests, with failsafe and surefire plugins. I have more than 2000 integration tests. To speed up the test running, I use failsafe jvmfork to run my tests parallel. I have some heavy test class, and they typically running at end of my test execution and it is slows down my CI verify process. The filesafe runorder:balanced would be a good option for me, but i cant use it because the jvmfork. To rename the test classes or move to another package and run it

IntelliJ IDEA详细配置和使用教程

一曲冷凌霜 提交于 2021-02-17 17:09:09
前言 正所谓工欲善其事必先利其器,对开发人员而言若想提高编码效率,一款高效的开发工具是必不可少的,相信看到该博客的朋友们都已经对IntelliJ IDEA有所了解了,所以此处就不对IntelliJ IDEA进行介绍,而是直接阐述在实际开发中应用场景。博主使用的IntelliJ IDEA版本为IntelliJ IDEA 2017,因为博主是一名Java开发工程师,所以以下内容均以Java为主。(相信有不少人和我一样是从Eclipse转粉IntelliJ IDEA,在学习IntelliJ IDEA前请尽量忘记Eclipse有关知识)在学习过程中主要参考了 https://github.com/judasn/IntelliJ-IDEA-Tutorial ,该教程对IntelliJ IDEA介绍十分详细,你们可以直接点击以上链接进行学习。至于为什么写这篇博文,我的目的是想把自己的个性化配置记录下来,当然如果与此同时能帮助到其他人,岂不美哉,本文将持续更新,由于本文内容较多建议读者从目录树上定位想要获取的配置信息 关闭Intellij IDEA自动更新 在File->Settings->Appearance & Behavior->System Settings->Updates下取消Automatically check updates for勾选 隐藏.idea文件夹和.iml等文件

Apache-Poi-XXE-Analysis漏洞分析

天大地大妈咪最大 提交于 2021-02-17 07:07:04
No.1 声明 由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,雷神众测以及文章作者不为此承担任何责任。 雷神众测拥有对此文章的修改和解释权。如欲转载或传播此文章,必须保证此文章的完整性,包括版权声明等全部内容。未经雷神众测允许,不得任意修改或者增减此文章内容,不得以任何方式将其用于商业目的。 No.2 概述 apache poi 这个组件实际上在 java 应用中蛮常见的,这个组件主要用在 word 文档或者 excel 文件导入的业务场景下使用。众所周知,这些文档实际上也是一个类似压缩包一类的存在,所以今天就看看这个东西。 No.3 漏洞分析 CVE-2014-3529 apache poi 在3.10.1之前存在XXE漏洞 漏洞场景搭建 测试代码 import org.apache.poi.EncryptedDocumentException;import org.apache.poi.openxml4j.exceptions.InvalidFormatException;import org.apache.poi.ss.usermodel.Sheet;import org.apache.poi.ss.usermodel.Workbook;import org.apache.poi.ss.usermodel

Customize dependency file names in maven

蹲街弑〆低调 提交于 2021-02-17 06:22:06
问题 I'm using maven-dependency-plugin to copy dependency jars into specific folder. I'm looking the way to customize copied jar file names using dependency properties: groupid, artifactid and version. example: I have following dependency <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.3.2</version> </dependency> I'd like to copy dependency jar as "org.apache.commons.commons-lang3-3.3.2.jar" How can I accomplish this? 回答1: I was able to achieve

Why dependencies do not accompany the made package by Maven?

六眼飞鱼酱① 提交于 2021-02-17 06:09:21
问题 I've followed the simplest maven example and made the following pom.xml file: <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>my-app</name> <url>http://maven.apache.org</url>

Why dependencies do not accompany the made package by Maven?

血红的双手。 提交于 2021-02-17 06:09:19
问题 I've followed the simplest maven example and made the following pom.xml file: <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>my-app</name> <url>http://maven.apache.org</url>

does not have a matching glue code in Groovy-cucumber

人走茶凉 提交于 2021-02-17 05:52:50
问题 I'm using cucumber-groovy with maven based framework and unable to find the glue to stepDefinitions. Getting does not have a matching glue code in feature file. It is in Cucumber-maven Project. I have converted the Feature folder to 'Source folder'. Error : Unable to create src/test/groovy & src/test/resource (to use as feature's folder) Here is my Test Runner CucumberOptions: @CucumberOptions( features = ["src/test/resources/"], glue = ["com.esw.taa.avs.steps"], plugin = ["html:esw-tests