简体   繁体   English

我将自动生成的类放在哪里?

[英]Where I put auto-generated classes?

I use cxf maven plugin to generate classes for web services. 我使用cxf maven插件来生成Web服务的类。 I wonder which directory I specify for <sourceRoot> . 我想知道为<sourceRoot>指定哪个目录。

Is it a good practice to put the generated classes in ${basedir}\\target\\classes ? 将生成的类放在${basedir}\\target\\classes是一种好习惯吗?

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. 默认情况下,codegen插件在生成类的输出文件夹中遵循“目标/生成源/ cxf”的Maven约定。 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. 只需遵循约定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM