2011-09-06 66 views
2

我在使用JDK6时非常成功地使用netbeans 7。我需要为我的应用程序添加一个JAX-WS webservice [ws]接口,以消耗已经在应用程序中创建的EJB服务。自从我搬到maven2以来,我对glassfish v3.1的部署没有任何问题,除了新的ws外,它似乎工作得很好。JAX-WS Maven和NetBeans

这里的问题清单我还有:

  • WS不部署和WSDL不会产生
  • 问题与根上下文NT认可和测试WS只是本地主机后地址。
  • 我无法配置为WS安全约束,有一个JACC错误和WS不可

我曾经是能够通过简单的web.xml基本身份验证,但与固定WS(蚂蚁) maven这不再工作了。我创建了一个测试Ant项目,一切工作正常。

我认为解决方案是在pom.xml(archetype?)中包含正确的构建插件? 我不确定包含我使用的pom.xml中的部分代码。

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 ....

<groupId>com</groupId> 
<artifactId>at.web.ws</artifactId> 
<version>3.4.2</version> 
<packaging>war</packaging> 

<name>at.web.ws Web App</name> 

<properties> 
    <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
</properties> 

<dependencies> 
    <dependency> 
     <groupId>com.sun.xml.ws</groupId> 
     <artifactId>webservices-rt</artifactId> 
     <version>2.0-SNAPSHOT</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>javax</groupId> 
     <artifactId>javaee-web-api</artifactId> 
     <version>6.0</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.8.2</version> 
     <scope>test</scope> 
    </dependency> 
</dependencies> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>2.3.2</version> 
      <configuration> 
       <source>1.6</source> 
       <target>1.6</target> 
       <compilerArguments> 
        <endorseddirs>${endorsed.dir}</endorseddirs> 
       </compilerArguments> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-war-plugin</artifactId> 
      <version>2.1.1</version> 
      <configuration> 
       <failOnMissingWebXml>true</failOnMissingWebXml> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-dependency-plugin</artifactId> 
      <version>2.1</version> 
      <executions> 
       <execution> 
        <phase>validate</phase> 
        <goals> 
         <goal>copy</goal> 
        </goals> 
        <configuration> 
         <outputDirectory>${endorsed.dir}</outputDirectory> 
         <silent>true</silent> 
         <artifactItems> 
          <artifactItem> 
           <groupId>javax</groupId> 
           <artifactId>javaee-endorsed-api</artifactId> 
           <version>6.0</version> 
           <type>jar</type> 
          </artifactItem> 
         </artifactItems> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 
</build> 

<repositories> 
    <repository> 
     <url>http://download.java.net/maven/2/</url> 
     <id>metro</id> 
     <layout>default</layout> 
     <name>Repository for library Library[metro]</name> 
    </repository> 
</repositories> 

任何意见将不胜感激。提前致谢。

回答