java skip line_How to Skip All Integration Tests (-DskipITs) and One Unit Test mvn Command Line

I am relatively new to Maven. I have done a lot of research and digging on this topic, but I can't seem to find an answer, so I thought I would ask here.

Goal: I would like to run mvn clean install test while skipping integration tests, as well as one particular unit test class.

I have tried the following:

mvn clean install -DskipITs -Dtest=!MyTestClass test

mvn clean install -DskipITs&&test=!MyTestClass test

mvn clean install -DskipITs&test=!MyTestClass test

However, none of the above commands seem to work. The first command of the three above made the most sense to me, but it seems as though the integration tests are being run when using that command. This is where my knowledge and understanding of Maven has a gap; I'm not sure if that's the expected behavior, or if that is the appropriate way to pass multiple properties on the command line?

When I run this command: mvn clean install -DskipITs test, the integration tests are successfully skipped.

I am familiar with the Maven build life-cycle, but it is possible that I am misunderstanding something or missing a detail.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值