Peter Palaga created CAMEL-19466:
------------------------------------

             Summary: Skip Maven mojos in the fast profile properly
                 Key: CAMEL-19466
                 URL: https://issues.apache.org/jira/browse/CAMEL-19466
             Project: Camel
          Issue Type: Improvement
            Reporter: Peter Palaga


The current fastinstall profile works with skip properties of the mojos that 
are supposed to be skipped. This works and brings substantial speedups, but 
there is more that can be done: 

When skipping a mojo by passing the skip property, the plugin jar and all its 
dependencies still need to be downloaded, opened, an isolated mojo classloader 
has to be set up, all required classes have to be loaded and the mojo.execute() 
method needs to be invoked...
... only to find out that the skip property is true and that the mojo does not 
need to be run at all. 

There is a trick explained in 
https://peter.palaga.org/2020/10/29/skipping-maven-mojos-properly.html that 
allows to skip even downloading the mojos and loading any its classes. In 
short, the idea is to have a "full" profile that contains all those test and 
formatting mojos. It is activated by negated "!quickly" property, so that 
invoking mvn without -Dquickly makes the profile active and passing -Dquickly 
makes inactive. This has saved some 30 seconds compared to using skip 
properties in Camel Quarkus.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to