Permalink
Browse files

[generator] Allow namespace selection from maven plugin

  • Loading branch information...
1 parent 5b5614b commit 7b5ea79533964d239c428bf4ec00e565d7aac0a4 @andrewcox andrewcox committed Feb 15, 2013
Showing with 9 additions and 1 deletion.
  1. +9 −1 swift-maven-plugin/src/main/java/com/facebook/mojo/SwiftMojo.java
@@ -135,6 +135,13 @@ public URI apply(final File file) {
private String codeFlavor = "java-regular";
/**
+ * Use the 'java' namespace instead of the 'java.swift' namespace.
+ *
+ * @parameter default-value="false"
+ */
+ private boolean usePlainJavaNamespace = false;
+
+ /**
* @parameter expression="${project}"
* @required
* @readonly
@@ -163,7 +170,8 @@ public final void execute() throws MojoExecutionException, MojoFailureException
.overridePackage(overridePackage)
.defaultPackage(defaultPackage)
.generateIncludedCode(generateIncludedCode)
- .codeFlavor(codeFlavor);
+ .codeFlavor(codeFlavor)
+ .usePlainJavaNamespace(usePlainJavaNamespace);
if (addThriftExceptions) {
configBuilder.addTweak(SwiftGeneratorTweak.ADD_THRIFT_EXCEPTION);

0 comments on commit 7b5ea79

Please sign in to comment.