title: JAX-WS Maven and NetBeans
body: <p>I am using netbeans 7 very successfully with JDK6. I need to add a JAX-WS webservice[ws] interface to my application to consume EJB service already created in the app. Since I moved to maven2 I had no issues with deployments on glassfish v3.1 and it seemed to work all fine apart from the new ws.</p>
  
  <p>here is the list of issues I still have:</p>
  
  <ul>
  <li>WS are not deployed and the WSDL are not generated  </li>
  <li>issues with the root context is nt recognised and the test WS is just after the localhost address.</li>
  <li>I cannot configure security constrain for the WS, there is a JACC error and the WS is not available</li>
  </ul>
  
  <p>I used to be able to secure the ws (Ant) with simple web.xml BASIC auth but with maven this is not working any more. I created a test Ant project and everything is working fine.</p>
  
  <p>I think the solution is in the pom.xml (archetype?) where the correct build plug-ins are included?
  I am not sure what code to include part from the pom.xml I am using.</p>
  
  <p><code>
  
  http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0
      
          ....
      </p>
  
  <pre><code>&lt;groupId&gt;com&lt;/groupId&gt;
  &lt;artifactId&gt;at.web.ws&lt;/artifactId&gt;
  &lt;version&gt;3.4.2&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;name&gt;at.web.ws Web App&lt;/name&gt;
  
  &lt;properties&gt;
      &lt;endorsed.dir&gt;${project.build.directory}/endorsed&lt;/endorsed.dir&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.xml.ws&lt;/groupId&gt;
          &lt;artifactId&gt;webservices-rt&lt;/artifactId&gt;
          &lt;version&gt;2.0-SNAPSHOT&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
          &lt;version&gt;6.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.8.2&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
                  &lt;compilerArguments&gt;
                      &lt;endorseddirs&gt;${endorsed.dir}&lt;/endorseddirs&gt;
                  &lt;/compilerArguments&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.1.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;failOnMissingWebXml&gt;true&lt;/failOnMissingWebXml&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;validate&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;copy&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;outputDirectory&gt;${endorsed.dir}&lt;/outputDirectory&gt;
                          &lt;silent&gt;true&lt;/silent&gt;
                          &lt;artifactItems&gt;
                              &lt;artifactItem&gt;
                                  &lt;groupId&gt;javax&lt;/groupId&gt;
                                  &lt;artifactId&gt;javaee-endorsed-api&lt;/artifactId&gt;
                                  &lt;version&gt;6.0&lt;/version&gt;
                                  &lt;type&gt;jar&lt;/type&gt;
                              &lt;/artifactItem&gt;
                          &lt;/artifactItems&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;url&gt;http://download.java.net/maven/2/&lt;/url&gt;
          &lt;id&gt;metro&lt;/id&gt;
          &lt;layout&gt;default&lt;/layout&gt;
          &lt;name&gt;Repository for library Library[metro]&lt;/name&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  </code></pre>
  
  <p></p>
  
  <p></code></p>
  
  <p>any advise will be appreciated. thanks in advance.</p>