Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • Our poms are written where maven-source-plugin runs by default so I'll have to restructure them as you suggest. Commented Jan 14, 2011 at 16:33
  • 4
    There are many cases where plugins are desirable to have on by default and disabled by using a profile. I think this answer avoids the problem without solving it.
    – Kevin
    Commented Feb 10, 2014 at 2:25
  • 1
    @Mowgli But the maven profile system is not well-suited to that: there is only an "activation" mechanism, not a "deactivation" mechanism. Some plugins handle this by building a deactivation mechanism of their own (e.g. skipTests for surefire plugin). Commented Feb 11, 2014 at 18:13
  • 1
    This is Maven Disease in a nutshell. "No, you actually don't want a conditional build, you really want this upside-down thing over here that requires you to retool your entire build system! See, isn't that awesome?" Nothing against the answer, mind you, I +1'ed it.
    – wberry
    Commented Jul 1, 2016 at 20:28
  • @wberry eh, maybe. As I said above, the maven profile system is fine for conditional builds ... by conditionally enabling stuff. If you want to conditionally enable and disable stuff, I suspect your build system is going to require increased maintenance effort over time. These days, most objections to maven sound to me like, "I want to create my own build system!" But thanks for the +1 :) Commented Jul 5, 2016 at 21:22