Add packageName configuration to maven (#2429)

This commit is contained in:
Thibault Duperron
2019-04-01 04:28:22 +02:00
committed by Jim Schubert
parent f4fa941e2b
commit 9c7d4073f4
2 changed files with 21 additions and 0 deletions

View File

@@ -166,6 +166,12 @@ public class CodeGenMojo extends AbstractMojo {
@Parameter(name = "invokerPackage")
private String invokerPackage;
/**
* The default package to use for the generated objects
*/
@Parameter(name = "packageName")
private String packageName;
/**
* groupId in generated pom.xml
*/
@@ -510,6 +516,10 @@ public class CodeGenMojo extends AbstractMojo {
configurator.setInvokerPackage(invokerPackage);
}
if (isNotEmpty(packageName)) {
configurator.setPackageName(packageName);
}
if (isNotEmpty(groupId)) {
configurator.setGroupId(groupId);
}