There are a lot more sources in a project than just its java source. For example, any project with snapshot dependencies may change if its snapshot jars have changed. You won't know this without actually doing a build.

Secondly, the reactor takes a list of goals. One of those goals - or indeed an invocation from a custom goal - could be 'clean'. (maven-new's maven.xml contains an example of this)

Thirdly, you need to keep track not only of whether the project changed, but whether the build environment changed. What you describe won't notice if I change MAVEN_HOME, maven.repo.local, JAVA_HOME, the -o flag, etc etc. Admittedly neither will javac, of course.

In short: the idea is of dubious value. Individual goals (like java:compile) can make better decisions about what to do and what not to do because they are much more focussed, but shortcutting builds at the reactor level is error prone.

Having said all that, if this was an optional feature, or a different goal, I'd be happy with it.

-Baz

Aslak Hellesøy wrote:
Sorry if this has been brought up before, but I have an idea about how to make the reactor smarter/quicker.

I have a project with lots of subprojects that are built with reactor. I>
want to reduce the build time by making the reactor smarter.

Imagine I have 3 sub projects a,b and c with the following dependencies:>
a<-b<-c.

The 1st time I run reactor everything is built. Then I modify b and run>
 reactor again. a doesn't depend on b and therefore shouldn't be rebuilt.>
 The reactor should now only build b and c.

I think this can be implemented quite simply by doing some date comparisons between java sources and classes in each project.


I'm planning to implement this feature, but before I do, I'd like to hear some opinions.

Cheers,
Aslak


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





Privacy and Confidentiality Notice

------------------------------------------------

The information contained in this E-Mail message is intended only for the person or persons to whom it is addressed. Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege. If you have received it in error, please destroy it and notify us on the telephone number printed above. If you do not receive complete and legible copies, please telephone us immediately. Any opinions expressed herein including attachments are those of the author only. i-documentsystems Ltd. does not accept responsibility for the accuracy or completeness of the information provided or for any changes to this Email, however made, after it was sent. (Please note that it is your responsibility to scan this message for viruses).


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to