https://maven.apache.org/plugins/maven-clean-plugin/clean-mojo.html#skip is the key to get you out of your hole.
You write a custom plugin that just sets the property `clean.skip` to true if the classes are new enough... a simple plugin to write. Then bind that plugin to the pre-clean phase of your pom (in a profile that is only activated by the CI system) and as you are invoking the `clean` phase and not the `clean:clean` mojo directly, the pre-clean phase will run first, the property will get set, and bob's a male sibling of one of your parents! On 9 August 2013 00:31, jigarjm <[email protected]> wrote: > I am skipping clean phase in CI loop, I want it to execute clean once a day > > existing option: > > 1. fork clean plugin and modify code to take timespan as conf input and > clean if its building during that time > > 2. configure maven compiler plugin to mark staleTimemillis to one day, that > will cache classes without modification for a day > > Is there any better option ? > > > > -- > View this message in context: > http://maven.40175.n5.nabble.com/conditional-plugin-execution-tp5767111.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
