0

my first.

I am looking for a way to disable maven resource and jar plugin phases from command line specifically, something like -Dmaven.test.skip=true which seems to disable maven-surefire-plugin:version:test

-Dmaven.{jar,resource}.skip=true kind of.

Is this possible ?

mabreu0
  • 80
  • 2
  • 8

2 Answers2

3

For dependency plugin use maven.resources.skip property.

Regarding maven jar plugin, it seems there is not a similar property, but in the links below you may find alternatives.

Link1 and link2

leopal
  • 4,711
  • 1
  • 25
  • 35
  • This is what I was looking for, the concern came while trying to improve build time since there's lots of modules with no resources, then took the moment to ask for other plugins as well. Thanks sir. – mabreu0 Oct 20 '20 at 17:18
1

Note that you cannot deactivate phases. You can only deactivate plugins. -Dmaven.test.skip=true does not deactivate the test phase, but the surefire plugin.

Therefore, you need to check for the different plugins if they have a skip parameter. @leopal gave you the right directions.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142