Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread Alex Herbert
On Sun, 8 Oct 2023 at 22:53, sebb  wrote:
>
> > > On Oct 8, 2023, at 7:11 AM, sebb  wrote:
> > >
> > > There are currently lots of variations of the defaultGoal in different
> > > components.
> > >
> > > It may be sensible to establish a standard setting which components
> > > should adopt (unless there is a good reason to do otherwise).
> > >
> > > If so, what should that be, and where does it get documented?
> > >
> > > Personally, I don't think install should ever be a default goal as it
> > > changes the environment outside the component.
> > >
> > > Main goals seen:
> > > clean
> > > install
> > > package
> > > site
> > > test
> > > verify
> > >
> > > Other goals seen:
> > > apache-rat:check
> > > checkstyle:check
> > > clirr:check
> > > findbugs:check
> > > japicmp:cmp
> > > javadoc:javadoc
> > > pmd:check
> > > pmd:cpd-check
> > > spotbugs:check

Note that some poms will be configured to use executions to bind goals
to lifecycle phases. So the default goal may only be 'clean verify'
but many plugins will be executed. For example the commons-parent pom
runs apache-rat-plugin in the validate phase making this explicit goal
redundant in all our projects; the multi-module RNG component uses
'clean verify javadoc:javadoc' but executes PMD, SpotBugs and
Checkstyle in executions bound to the verify phase. There are also
some plugins that have executions bound to verify but activated by the
presence of a file, for example RevAPI/JApiCmp for modules building a
jar; these can be disabled by lack of a file for modules with a
non-jar packaging.

I think making the default goal run verify is appropriate as this is
where many validation plugins are conventionally configured to run. It
allows a quicker build with 'mvn test' and a full check with 'mvn'.

Alex

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread sebb
On Sun, 8 Oct 2023 at 18:25, Phil Steitz  wrote:
>
> What exactly is the point of the default goal?  I mean when is it expected to 
> be used?  Automations?  Pipes of some kind?  It’s not always executed, right? 
>  So if I say “clean” was the default, “mvn test” would not mean “mvn clean 
> test”, right?

The default goal is only used if you don't provide a goal.

> Phil
>
> > On Oct 8, 2023, at 7:11 AM, sebb  wrote:
> >
> > There are currently lots of variations of the defaultGoal in different
> > components.
> >
> > It may be sensible to establish a standard setting which components
> > should adopt (unless there is a good reason to do otherwise).
> >
> > If so, what should that be, and where does it get documented?
> >
> > Personally, I don't think install should ever be a default goal as it
> > changes the environment outside the component.
> >
> > Main goals seen:
> > clean
> > install
> > package
> > site
> > test
> > verify
> >
> > Other goals seen:
> > apache-rat:check
> > checkstyle:check
> > clirr:check
> > findbugs:check
> > japicmp:cmp
> > javadoc:javadoc
> > pmd:check
> > pmd:cpd-check
> > spotbugs:check
> >
> > Sebb
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread Gary Gregory
The default goal is always used by GitHub builds and it is nice to use as a
dev before you push. This lets us avoid putting some custom mvn call in the
GH build definition. We can also document to users that calling 'mvn' is a
all you need to do to validate a PR or push.

Gary

On Sun, Oct 8, 2023, 1:25 PM Phil Steitz  wrote:

> What exactly is the point of the default goal?  I mean when is it expected
> to be used?  Automations?  Pipes of some kind?  It’s not always executed,
> right?  So if I say “clean” was the default, “mvn test” would not mean “mvn
> clean test”, right?
>
> Phil
>
> > On Oct 8, 2023, at 7:11 AM, sebb  wrote:
> >
> > There are currently lots of variations of the defaultGoal in different
> > components.
> >
> > It may be sensible to establish a standard setting which components
> > should adopt (unless there is a good reason to do otherwise).
> >
> > If so, what should that be, and where does it get documented?
> >
> > Personally, I don't think install should ever be a default goal as it
> > changes the environment outside the component.
> >
> > Main goals seen:
> > clean
> > install
> > package
> > site
> > test
> > verify
> >
> > Other goals seen:
> > apache-rat:check
> > checkstyle:check
> > clirr:check
> > findbugs:check
> > japicmp:cmp
> > javadoc:javadoc
> > pmd:check
> > pmd:cpd-check
> > spotbugs:check
> >
> > Sebb
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread Phil Steitz
What exactly is the point of the default goal?  I mean when is it expected to 
be used?  Automations?  Pipes of some kind?  It’s not always executed, right?  
So if I say “clean” was the default, “mvn test” would not mean “mvn clean 
test”, right?  

Phil

> On Oct 8, 2023, at 7:11 AM, sebb  wrote:
> 
> There are currently lots of variations of the defaultGoal in different
> components.
> 
> It may be sensible to establish a standard setting which components
> should adopt (unless there is a good reason to do otherwise).
> 
> If so, what should that be, and where does it get documented?
> 
> Personally, I don't think install should ever be a default goal as it
> changes the environment outside the component.
> 
> Main goals seen:
> clean
> install
> package
> site
> test
> verify
> 
> Other goals seen:
> apache-rat:check
> checkstyle:check
> clirr:check
> findbugs:check
> japicmp:cmp
> javadoc:javadoc
> pmd:check
> pmd:cpd-check
> spotbugs:check
> 
> Sebb
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
> 

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread sebb
On Sun, 8 Oct 2023 at 17:18, Gary Gregory  wrote:
>
> What matters is the space and noise saved by putting plug-in configurations
> in the parent POM. The default goal is a single line so the savings there
> is minuscule IMO.

I agree the savings are minuscule.
But that is not the only reason to put stuff in CP.

We also put stuff in CP so component POMs don't need to be updated
when defaults change.

> Gary
>
> On Sun, Oct 8, 2023, 12:05 PM sebb  wrote:
>
> > On Sun, 8 Oct 2023 at 15:38, Gilles Sadowski  wrote:
> > >
> > > Le dim. 8 oct. 2023 à 16:11, sebb  a écrit :
> > > >
> > > > There are currently lots of variations of the defaultGoal in different
> > > > components.
> > > >
> > > > It may be sensible to establish a standard setting which components
> > > > should adopt (unless there is a good reason to do otherwise).
> > >
> > > +1
> > >
> > > >
> > > > If so, what should that be,
> > >
> > > Anything and everything that would lead to a -1 by the reviewer
> > > (if just to avoid spending cycles on something that could have
> > > been detected automatically).
> > >
> > > > and where does it get documented?
> > >
> > > Can it be defined in "commons-parent" POM file?
> >
> > Good idea.
> >
> > CP could define it as a property, and POMs can use:
> >   ${commons.defaultGoal}
> >
> > > >
> > > > Personally, I don't think install should ever be a default goal as it
> > > > changes the environment outside the component.
> > >
> > > +1
> > >
> > > >
> > > > Main goals seen:
> > > > clean
> > > > install
> > > > package
> > > > site
> > > > test
> > > > verify
> > >
> > > $ mvn clean test verify
> > > Isn't "test" included in "verify"?
> > >
> > > >
> > > > Other goals seen:
> > > > apache-rat:check
> > > > checkstyle:check
> > > > clirr:check
> > > > findbugs:check
> > > > japicmp:cmp
> > > > javadoc:javadoc
> > > > pmd:check
> > > > pmd:cpd-check
> > > > spotbugs:check
> > >
> > > +1 (all of the above, plus "revapi:check")
> > >
> > > Regards,
> > > Gilles
> > >
> > > -
> > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > For additional commands, e-mail: dev-h...@commons.apache.org
> > >
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
> >

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread Gary Gregory
What matters is the space and noise saved by putting plug-in configurations
in the parent POM. The default goal is a single line so the savings there
is minuscule IMO.

Gary

On Sun, Oct 8, 2023, 12:05 PM sebb  wrote:

> On Sun, 8 Oct 2023 at 15:38, Gilles Sadowski  wrote:
> >
> > Le dim. 8 oct. 2023 à 16:11, sebb  a écrit :
> > >
> > > There are currently lots of variations of the defaultGoal in different
> > > components.
> > >
> > > It may be sensible to establish a standard setting which components
> > > should adopt (unless there is a good reason to do otherwise).
> >
> > +1
> >
> > >
> > > If so, what should that be,
> >
> > Anything and everything that would lead to a -1 by the reviewer
> > (if just to avoid spending cycles on something that could have
> > been detected automatically).
> >
> > > and where does it get documented?
> >
> > Can it be defined in "commons-parent" POM file?
>
> Good idea.
>
> CP could define it as a property, and POMs can use:
>   ${commons.defaultGoal}
>
> > >
> > > Personally, I don't think install should ever be a default goal as it
> > > changes the environment outside the component.
> >
> > +1
> >
> > >
> > > Main goals seen:
> > > clean
> > > install
> > > package
> > > site
> > > test
> > > verify
> >
> > $ mvn clean test verify
> > Isn't "test" included in "verify"?
> >
> > >
> > > Other goals seen:
> > > apache-rat:check
> > > checkstyle:check
> > > clirr:check
> > > findbugs:check
> > > japicmp:cmp
> > > javadoc:javadoc
> > > pmd:check
> > > pmd:cpd-check
> > > spotbugs:check
> >
> > +1 (all of the above, plus "revapi:check")
> >
> > Regards,
> > Gilles
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread sebb
(verify includes test and package)

Looks like there is some consensus for:

clean verify

 -- plus --

apache-rat:check
checkstyle:check
japicmp:cmp
javadoc:javadoc
pmd:check
spotbugs:check

I think these should be optional:

pmd:cpd-check
revapi:check

On Sun, 8 Oct 2023 at 17:04, sebb  wrote:
>
> On Sun, 8 Oct 2023 at 15:38, Gilles Sadowski  wrote:
> >
> > Le dim. 8 oct. 2023 à 16:11, sebb  a écrit :
> > >
> > > There are currently lots of variations of the defaultGoal in different
> > > components.
> > >
> > > It may be sensible to establish a standard setting which components
> > > should adopt (unless there is a good reason to do otherwise).
> >
> > +1
> >
> > >
> > > If so, what should that be,
> >
> > Anything and everything that would lead to a -1 by the reviewer
> > (if just to avoid spending cycles on something that could have
> > been detected automatically).
> >
> > > and where does it get documented?
> >
> > Can it be defined in "commons-parent" POM file?
>
> Good idea.
>
> CP could define it as a property, and POMs can use:
>   ${commons.defaultGoal}
>
> > >
> > > Personally, I don't think install should ever be a default goal as it
> > > changes the environment outside the component.
> >
> > +1
> >
> > >
> > > Main goals seen:
> > > clean
> > > install
> > > package
> > > site
> > > test
> > > verify
> >
> > $ mvn clean test verify
> > Isn't "test" included in "verify"?
> >
> > >
> > > Other goals seen:
> > > apache-rat:check
> > > checkstyle:check
> > > clirr:check
> > > findbugs:check
> > > japicmp:cmp
> > > javadoc:javadoc
> > > pmd:check
> > > pmd:cpd-check
> > > spotbugs:check
> >
> > +1 (all of the above, plus "revapi:check")
> >
> > Regards,
> > Gilles
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread sebb
On Sun, 8 Oct 2023 at 15:38, Gilles Sadowski  wrote:
>
> Le dim. 8 oct. 2023 à 16:11, sebb  a écrit :
> >
> > There are currently lots of variations of the defaultGoal in different
> > components.
> >
> > It may be sensible to establish a standard setting which components
> > should adopt (unless there is a good reason to do otherwise).
>
> +1
>
> >
> > If so, what should that be,
>
> Anything and everything that would lead to a -1 by the reviewer
> (if just to avoid spending cycles on something that could have
> been detected automatically).
>
> > and where does it get documented?
>
> Can it be defined in "commons-parent" POM file?

Good idea.

CP could define it as a property, and POMs can use:
  ${commons.defaultGoal}

> >
> > Personally, I don't think install should ever be a default goal as it
> > changes the environment outside the component.
>
> +1
>
> >
> > Main goals seen:
> > clean
> > install
> > package
> > site
> > test
> > verify
>
> $ mvn clean test verify
> Isn't "test" included in "verify"?
>
> >
> > Other goals seen:
> > apache-rat:check
> > checkstyle:check
> > clirr:check
> > findbugs:check
> > japicmp:cmp
> > javadoc:javadoc
> > pmd:check
> > pmd:cpd-check
> > spotbugs:check
>
> +1 (all of the above, plus "revapi:check")
>
> Regards,
> Gilles
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread Gilles Sadowski
Le dim. 8 oct. 2023 à 16:48, Gary Gregory  a écrit :
>
> Clirr and FindBugs are now unmainted and broken on modern Java versions.
> They have been replaced by JApiCmp and SpotBugs.

+1 to not run deprecated software.

>
> It does not make sense IMO to run both JApiCmp and RevApi, they do the same
> thing.

Supposedly; but there was one case where "revapi" spotted
a potential problem not found by "japicmp".  [I don't remember
the details.]
In any case, it doesn't hurt to run both, does it?  [Or one can
be in the default, and the other added by projects that want it...]

Gilles

>> [...]

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread Gary Gregory
Clirr and FindBugs are now unmainted and broken on modern Java versions.
They have been replaced by JApiCmp and SpotBugs.

It does not make sense IMO to run both JApiCmp and RevApi, they do the same
thing.

Gary


On Sun, Oct 8, 2023, 10:38 AM Gilles Sadowski  wrote:

> Le dim. 8 oct. 2023 à 16:11, sebb  a écrit :
> >
> > There are currently lots of variations of the defaultGoal in different
> > components.
> >
> > It may be sensible to establish a standard setting which components
> > should adopt (unless there is a good reason to do otherwise).
>
> +1
>
> >
> > If so, what should that be,
>
> Anything and everything that would lead to a -1 by the reviewer
> (if just to avoid spending cycles on something that could have
> been detected automatically).
>
> > and where does it get documented?
>
> Can it be defined in "commons-parent" POM file?
>
> >
> > Personally, I don't think install should ever be a default goal as it
> > changes the environment outside the component.
>
> +1
>
> >
> > Main goals seen:
> > clean
> > install
> > package
> > site
> > test
> > verify
>
> $ mvn clean test verify
> Isn't "test" included in "verify"?
>
> >
> > Other goals seen:
> > apache-rat:check
> > checkstyle:check
> > clirr:check
> > findbugs:check
> > japicmp:cmp
> > javadoc:javadoc
> > pmd:check
> > pmd:cpd-check
> > spotbugs:check
>
> +1 (all of the above, plus "revapi:check")
>
> Regards,
> Gilles
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: [ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread Gilles Sadowski
Le dim. 8 oct. 2023 à 16:11, sebb  a écrit :
>
> There are currently lots of variations of the defaultGoal in different
> components.
>
> It may be sensible to establish a standard setting which components
> should adopt (unless there is a good reason to do otherwise).

+1

>
> If so, what should that be,

Anything and everything that would lead to a -1 by the reviewer
(if just to avoid spending cycles on something that could have
been detected automatically).

> and where does it get documented?

Can it be defined in "commons-parent" POM file?

>
> Personally, I don't think install should ever be a default goal as it
> changes the environment outside the component.

+1

>
> Main goals seen:
> clean
> install
> package
> site
> test
> verify

$ mvn clean test verify
Isn't "test" included in "verify"?

>
> Other goals seen:
> apache-rat:check
> checkstyle:check
> clirr:check
> findbugs:check
> japicmp:cmp
> javadoc:javadoc
> pmd:check
> pmd:cpd-check
> spotbugs:check

+1 (all of the above, plus "revapi:check")

Regards,
Gilles

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



[ALL] Standardise Maven defaultGoal in components?

2023-10-08 Thread sebb
There are currently lots of variations of the defaultGoal in different
components.

It may be sensible to establish a standard setting which components
should adopt (unless there is a good reason to do otherwise).

If so, what should that be, and where does it get documented?

Personally, I don't think install should ever be a default goal as it
changes the environment outside the component.

Main goals seen:
clean
install
package
site
test
verify

Other goals seen:
apache-rat:check
checkstyle:check
clirr:check
findbugs:check
japicmp:cmp
javadoc:javadoc
pmd:check
pmd:cpd-check
spotbugs:check

Sebb

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org