forked from loafle/openapi-generator-original
Merge pull request #4009 from wing328/change_source_folder
[Maven] Correct source folder for generated files
This commit is contained in:
commit
3362578595
@ -16,11 +16,17 @@ package io.swagger.codegen.plugin;
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import io.swagger.codegen.CliOption;
|
||||
import io.swagger.codegen.ClientOptInput;
|
||||
import io.swagger.codegen.CodegenConfig;
|
||||
import io.swagger.codegen.DefaultGenerator;
|
||||
import io.swagger.codegen.config.CodegenConfigurator;
|
||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyAdditionalPropertiesKvp;
|
||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyImportMappingsKvp;
|
||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyInstantiationTypesKvp;
|
||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyLanguageSpecificPrimitivesCsv;
|
||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyTypeMappingsKvp;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
@ -28,12 +34,12 @@ import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static io.swagger.codegen.config.CodegenConfiguratorUtils.*;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
import io.swagger.codegen.CliOption;
|
||||
import io.swagger.codegen.ClientOptInput;
|
||||
import io.swagger.codegen.CodegenConfig;
|
||||
import io.swagger.codegen.CodegenConstants;
|
||||
import io.swagger.codegen.DefaultGenerator;
|
||||
import io.swagger.codegen.config.CodegenConfigurator;
|
||||
|
||||
/**
|
||||
* Goal which generates client/server code from a swagger json/yaml definition.
|
||||
@ -304,7 +310,8 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
}
|
||||
|
||||
if (addCompileSourceRoot) {
|
||||
project.addCompileSourceRoot(output.toString());
|
||||
String sourceJavaFolder = output.toString() + "/" + configOptions.get(CodegenConstants.SOURCE_FOLDER);
|
||||
project.addCompileSourceRoot(sourceJavaFolder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user