2

My team uses a plugin that generates javadocs that adds about 20 - 30 seconds to our build time. I don't ever use these javadocs, so I would like to eliminate them from my build.

Changing the POMs is not possible for various reasons, so I can't add a profile to conditionally use those (even if they default to true!).

My read of the docs suggests that this is not possible in settings.xml since it's a truncated version of and doesn't contain .

How can I override plugin settings locally?

jordanpg
  • 6,386
  • 4
  • 46
  • 70

2 Answers2

1

Skip it using a system property:

mvn -Dmaven.javadoc.skip=true clean install

You can change some behavior using system properties, e.g. the value of the configuration settings skipTests is bound to the user property skipTests, so when you invoke Maven with -DskipTests=true, it will implicitly set this value.

However, that works only if a) your POMs rely on properties to make configurations, b) your POMs do so far not set these configuration settings explicitly and c) it is not some special value that cannot be set via properties, e.g. config settings that accept multiple values such as some "includes/excludes" settings.

rec
  • 10,340
  • 3
  • 29
  • 43
0

If the plugin has an option to skip its run and you are inheriting it form a parent pom, yes you can "re-define" the plugin config in the child poms. Here are some related answers that could help you: Disable a Maven plugin defined in a parent POM

Community
  • 1
  • 1
Yogesh_D
  • 17,656
  • 10
  • 41
  • 55