Merge pull request #4193 from mbohlool/plugin-fix

Add gitUseID and gitRepoID flags to maven plugin
This commit is contained in:
wing328 2016-11-16 10:46:17 +08:00 committed by GitHub
commit 2425a35f45

View File

@ -70,6 +70,18 @@ public class CodeGenMojo extends AbstractMojo {
@Parameter(name = "inputSpec", required = true)
private String inputSpec;
/**
* Git user ID, e.g. swagger-api.
*/
@Parameter(name = "gitUserId", required = false)
private String gitUserId;
/**
* Git repo ID, e.g. swagger-codegen.
*/
@Parameter(name = "gitRepoId", required = false)
private String gitRepoId;
/**
* Folder containing the template files.
*/
@ -195,6 +207,14 @@ public class CodeGenMojo extends AbstractMojo {
configurator.setInputSpec(inputSpec);
}
if(isNotEmpty(gitUserId)) {
configurator.setGitUserId(gitUserId);
}
if(isNotEmpty(gitRepoId)) {
configurator.setGitRepoId(gitRepoId);
}
configurator.setLang(language);
configurator.setOutputDir(output.getAbsolutePath());