Hi,
In PR https://github.com/apache/camel/pull/10476 I tried to make some
changes to improve ergonomics and reproducibility.
The first idea is to auto-fix formatting issues instead of outputting
error messages. I.e. rather than using Checkstyle plugin that is not
able to fix even basic violations of its policies, maven-license-plugin,
maven-formatter-plugin and maven-impsort-plugin are enabled by default
to format the sources in the desired way without contributors having to
configure their IDEs or anything else manually. There are some more
details in https://issues.apache.org/jira/browse/CAMEL-19461
My second goal was to make the fast build (done from a state that passed
the CI) as fast as possible by removing the unessential Maven mojos from
the Maven execution plan altogether. We use this since longer in Camel
Quarkus and it is explained in detail in this blog:
https://peter.palaga.org/2020/10/29/skipping-maven-mojos-properly.html
The new mechanism is slightly different from how our original
`fastinstall` profile worked. `fastinstall` was disabling mojos by
defining their skip properties and it was activated simply by passing
`-Pfastinstall`. The new fast build does something different: it
disables the default `full` profile by passing a property. Because the
invocation had to change from -P to -D I dared to use the same property
name as we use in Camel Quarkus: `-Dquickly` I hope that's fine for
everybody. See also https://issues.apache.org/jira/browse/CAMEL-19466
On my machine with 32 virtual threads, invoking `mvnd clean install
-Dquickly` takes
* 1st build: 1m 21s
* 2nd build: 1m 10s
The subsequent builds are slower. I have not investigated why, it is
perhaps because of garbage collection or some plugin might be leaking
memory.
The third thing is not having the Apache Snapshots Maven repository
enabled by default for the sake of reproducibility locally and on CI.
It is still present in the `apache-snapshots` profile.
There are more details in https://issues.apache.org/jira/browse/CAMEL-19465
Any feedback is welcome.
Thanks,
-- Peter