Maybe this is a basic question but i'm wondering how to add additional source directory for compilation, for instance target/src.
I will appreciate any help
Maybe this is a basic question but i'm wondering how to add additional source directory for compilation, for instance target/src.
I will appreciate any help
That's not the kind of thing that's easy to do with the Grails build system. You could raise an issue to make it easier, but your best bet is to compile the source in that directory separately, perhaps after the usual source folders have been compiled.
See the $GRAILS_HOME/scripts/_GrailsCompile.groovy file for an example of doing compilation from within a Gant script. The compilation is basically done by the 'ant.groovyc()' call.
Again thanks for your help
i will definitely have a look on it
May I ask you if there is a way to compile this source folder before the usual source folders have been compiled ?
You can write an event handler for CompileStart:
Not sure whether it's possible to add your compiled classes to the classpath for the main compilation though. In fact, it doesn't really look doable without a lot of copy and pasting from the core Grails scripts.Code:eventCompileStart = { // Compile my custom source folders before the main compilation... }