title: jaxws-maven-plugin resolving WSDL location relative to class location, why?
body: <p>I'm using the <code>jaxws-maven-plugin</code> version <code>2.1</code>. I've found out very strange code generated for WSDL location from jar resources:</p>
  
  <pre><code>                &lt;configuration&gt;
                      &lt;keep&gt;true&lt;/keep&gt;
                      &lt;sourceDestDir&gt;${basedir}/src/main/java&lt;/sourceDestDir&gt;
                      &lt;extension&gt;true&lt;/extension&gt;
                      &lt;wsdlDirectory&gt;${basedir}/src/main/resources/wsdl&lt;/wsdlDirectory&gt;
                      &lt;packageName&gt;my.package.gen&lt;/packageName&gt;
                      &lt;wsdlLocation&gt;wsdl/*&lt;/wsdlLocation&gt;
                      &lt;wsdlFiles&gt;
                          &lt;wsdlFile&gt;mywsdl.wsdl&lt;/wsdlFile&gt;                            
                      &lt;/wsdlFiles&gt;
                  &lt;/configuration&gt;
  </code></pre>
  
  <p>And the code generated is:</p>
  
  <pre><code>static {
      URL url = null;
      try {
          URL baseUrl;
          baseUrl = my.package.gen.My_Service.class.getResource(".");
          url = new URL(baseUrl, "wsdl/mywsdl.wsdl");
      } catch (MalformedURLException e) {
          logger.warning("Failed to create URL for the wsdl Location: 'wsdl/mywsdl.wsdl', retrying as a local file");
          logger.warning(e.getMessage());
      }
      MYSERVICE_WSDL_LOCATION = url; }
  </code></pre>
  
  <p>So the wsdl file is looked up in the directory (package) the generated class residents, and not in the main jar directory, as would be logical. And the WSDL can't be found.</p>
  
  <p>Is it a bug in <code>jaxws-maven-plugin</code>, or it is the error in my configuration?</p>