The Griffon Trove: compiling additional sources

Posted by: Andres Almiray on 05/25/2012

The Griffon build automatically compiles all Java & Groovy sources found under src/main. Follow these steps should you require additional sources to be compiled during the same compilation step

  1. Create a file named _Events.groovy under the scripts directory.
  2. Create a build event handler that configures the new path. The handler must react to a particular build event. Either CompileStart or CompileSourcesStart will do the trick.
Note that you can define relative and absolute paths. This tip works in both plugin and application projects.

Keep on Groovying!


About Andres Almiray

Andres Almiray

Andres is a Java/Groovy developer and Java Champion, with more than 13 years of experience in software design and development. He has been involved in web and desktop application developments since the early days of Java. He has also been teacher of computer science courses in the most prestigious education institute in Mexico. His current interests include Groovy and Swing. He is a true believer of open source and has participated in popular projects like Groovy, Griffon, JMatter and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member and current project lead of the Griffon framework. He blogs periodically at http://jroller.com/aalmiray. You can find him on twitter too as @aalmiray. He likes to spend time with his beloved wife, Ixchel, when not hacking around.

More About Andres »

NFJS, the Magazine

May Issue Now Available
  • On the road to learning

    by Raju Gandhi
  • Refactoring to Modularity

    by Kirk Knoernschild
  • RESTful Groovy

    by Kenneth Kousen
  • Getting Started with D3.js

    by Brian Sletten
Learn More »