Posts Tagged ‘add generated sources’

Maven snippet – add generated sources to the build

July 21, 2014 Leave a comment

Here’s a maven snippet I found myself looking for many times – adding generated sources to the build.
This tells Maven to include the generated classes as part of the compilation, which ensures any non generated code that depends on them compiles fine, and their corresponding .class files be included in the .jar/.war file.


In this case (line #153) – we assume that the sources are generated to target/generated.

Some useful reading material regarding this subject:

%d bloggers like this: