title: Specifying Package Name When Using Maven to Generate Java from WSDL
body: <p>I am using a maven script to generate the Java code I need to communicate with a WCF service.  I have gotten communication working and am ready to integrate my maven script, and the code it generates, with the rest of the java code from the project.</p>
  
  <p>However, I can't get maven to generate the code with the correct package name I want.  From what I've read online I should be using the  tag, and I've seen two possible places where this goes.  I've included the segment of the script I think these need to go in, and both of them there.  However, these tags affect nothing and the code generates just as it did without them</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
              &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;
              &lt;version&gt;${cxf.version}&lt;/version&gt;
              &lt;configuration&gt;
                          &lt;packageName&gt;com.name.server.cxf&lt;/packageName&gt;                      
                      &lt;sourceRoot&gt;src/com/server/cxf&lt;/sourceRoot&gt;
                          &lt;wsdlOptions&gt;
                              &lt;wsdlOption&gt;
                                  &lt;wsdl&gt;src/com/server/cxf/code-generation/service.xml&lt;/wsdl&gt;
                                  &lt;bindingFiles&gt;
                                      &lt;bindingFile&gt;src/com/server/cxf/code-generation/javabindings.xml&lt;/bindingFile&gt;
                                  &lt;/bindingFiles&gt; 
                                  &lt;extraargs&gt;
                                      &lt;extraarg&gt;-validate&lt;/extraarg&gt;
                                      &lt;extraarg&gt;-client&lt;/extraarg&gt;
                                      &lt;extraarg&gt;-verbose&lt;/extraarg&gt;
                                      &lt;extraarg&gt;-xjc-verbose&lt;/extraarg&gt;
                                  &lt;/extraargs&gt;
                              &lt;/wsdlOption&gt;
                          &lt;/wsdlOptions&gt;
                          &lt;verbose /&gt;
                      &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;generate-sources&lt;/id&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;wsdl2java&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;packageName&gt;com.name.server.cxf&lt;/packageName&gt;      
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>Perhaps I am using the wrong tag, or perhaps it is in the wrong place?</p>