• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Automated Builds with Aspects

 
Geoff Dinsdale
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using Aspect compilers, such as AspectJ, how would they impact on the automated build systems such as CruiseControl?
 
Mike Clark
author
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If by "impact" you mean how would CruiseControl handle a project that uses an aspect compiler such as AspectJ, then I think it's a matter of pointing the CC configuration file at an Ant target (or Maven goal) that directly or indirectly uses the aspect compiler. (I'm assuming the aspect compiler has an associated Ant task.)

In other words, CruiseControl merely delegates the build process to Ant or Maven. You can put arbitrarily complex build steps into the Ant build file, for example.

Please ping again if you meant to ask something else.

Mike
 
Geoff Dinsdale
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should have read all the previous posts . So CruiseControl merely schedules when the Ant tasks are to run.

My main reason for the original question is we are adding logging information for every method in every class so as to give us a very standardised log. We don't want this to intrude on the developers so it does want to be in the main build. Therefore am I right in assuming that we get Ant to do the Aspects compilation as you suggested or should we be doing it as a prior job, i.e. not automating it?
 
Mike Clark
author
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all the developers want those logging statements in their development builds, then I'd make sure that the default Ant task for building the project includes (indirectly) the build step that invokes the aspect compiler, if that's possible. For example, the default 'build' target could depend on the target that runs the aspect compiler, and then CruiseControl would simply call the 'build' target.

If the logging statements are only used in production and developers don't want their local builds burdened by an aspect compilation step, then I'd add a separate, non-default Ant target (e.g., build-production). CruiseControl would then call that target so that the continuous builds test a production-ready build.

Make sense?

Mike
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mike Clark:
CruiseControl would then call that target so that the continuous builds test a production-ready build.


Keep in mind, though, that the purpose of a continuous build process is to give rapid feedback on wether something broke.

So, if weaving aspects into the code is something that significantly increases build time, but doesn't typically break, it might be better to *not* incorporate it into the continuous build - it would only delay feedback without adding value.

Instead, you should configure an additional nightly production build (CC can do that).
 
Mike Clark
author
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ilja Preuss:


Keep in mind, though, that the purpose of a continuous build process is to give rapid feedback on wether something broke.

So, if weaving aspects into the code is something that significantly increases build time, but doesn't typically break, it might be better to *not* incorporate it into the continuous build - it would only delay feedback without adding value.

Instead, you should configure an additional nightly production build (CC can do that).


Thanks for clarifying that. I failed to mention that the build that also weaved in aspects would be on a different build frequency.

Mike
 
Geoff Dinsdale
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info and yes it makes perfect sense, all I need now is the book so I can put the automated build together

Funnily enough we don't need separate tasks as we all build from within eclipse, but once code is checked in we want a full build once a day in order to regression test. But the tip about different tasks was still cool.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic