This commit is contained in:
Tony Tam 2015-12-21 22:16:11 -08:00
parent 968c943c44
commit b46e3ad400
2 changed files with 12 additions and 4 deletions

View File

@ -10,7 +10,7 @@ public final class AdditionalParams {
public static final String MODEL_PACKAGE_PARAM = "modelPackage"; public static final String MODEL_PACKAGE_PARAM = "modelPackage";
public static final String API_PACKAGE_PARAM = "apiPackage"; public static final String API_PACKAGE_PARAM = "apiPackage";
public static final String INVOKER_PACKAGE_PARAM = "invokerPackage"; public static final String INVOKER_PACKAGE_PARAM = "invokerPackage";
public static final String LIBRARY_PARAM = "library";
private AdditionalParams() { private AdditionalParams() {}
} }
}

View File

@ -100,6 +100,12 @@ public class CodeGenMojo extends AbstractMojo {
@Parameter(name = "configurationFile", required = false) @Parameter(name = "configurationFile", required = false)
private String configurationFile; private String configurationFile;
/**
* Sets the library
*/
@Parameter(name = "library", required = false)
private String library;
/** /**
* A map of language-specific parameters as passed with the -c option to the command line * A map of language-specific parameters as passed with the -c option to the command line
*/ */
@ -139,7 +145,9 @@ public class CodeGenMojo extends AbstractMojo {
System.setProperty(key, value); System.setProperty(key, value);
} }
} }
if (null != library) {
config.setLibrary(library);
}
if (null != templateDirectory) { if (null != templateDirectory) {
config.additionalProperties().put(TEMPLATE_DIR_PARAM, templateDirectory.getAbsolutePath()); config.additionalProperties().put(TEMPLATE_DIR_PARAM, templateDirectory.getAbsolutePath());
} }