javamavencxfcxf-codegen-plugin

Where I put auto-generated classes?


I use cxf maven plugin to generate classes for web services. I wonder which directory I specify for <sourceRoot>.

Is it a good practice to put the generated classes in ${basedir}\target\classes ?


Solution

  • Here is an excerpt from the documentation:

    By default, the codegen plugin follows the Maven convention of "target/generated-sources/cxf" for the output folder for the generated classes. You can override this value using as shown below, but note this is usually not necessary,

    So in other word no need to overwrite it. Just follow the conventions.