2013-08-31 2 views
0

iam이 maven java2wsdl generation을 사용하여 java 클래스에서 wsdl을 생성합니다. 또한 어떤 예외도 얻지 못했습니다. 아래는 pom.xml입니다. 아무도 그것을 고칠 수있는 방법을 제안하십시오.wsdl이 java 클래스에서 생성되지 않습니다.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>com.facial</groupId> 
    <artifactId>facedetections</artifactId> 
    <packaging>war</packaging> 
    <version>0.0.1-SNAPSHOT</version> 
    <name>facedetections Maven Webapp</name> 
    <url>http://maven.apache.org</url> 
    <dependencies> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>3.8.1</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>com.sun.xml.ws</groupId> 
     <artifactId>jaxws-rt</artifactId> 
     <version>2.1.3</version> 
    </dependency> 
    <dependency> 
     <groupId>mysql</groupId> 
     <artifactId>mysql-connector-java</artifactId> 
     <version>5.1.6</version> 
    </dependency>   
    <dependency> 
     <groupId>gov.nist.math</groupId> 
     <artifactId>jama</artifactId> 
     <version>1.0.3</version> 
    </dependency> 
    <dependency> 
     <groupId>javax.media</groupId> 
     <artifactId>jmf</artifactId> 
     <version>2.1.1e</version> 
    </dependency> 
    </dependencies> 

    <build> 
    <finalName>facedetections</finalName> 
    <pluginManagement> 
    <plugins> 
     <plugin> 
     <artifactId>maven-antrun-plugin</artifactId> 
     <executions> 
      <execution> 
      <phase>deploy</phase> 
      <configuration> 
       <tasks> 
       <target name="-post-compile"> 
        <copy file="C:\Program Files\JMF2.1.1e\lib\jmf.properties" todir="E:\path\to\local\repo\javax\media\jmf\2.1.1e\"/> 
       </target> 
       <!-- 
        Place any Ant task here. You can add anything 
        you can add between <target> and </target> in a 
        build.xml. 
       --> 

       </tasks> 
      </configuration> 
      <goals> 
       <goal>run</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>2.3.1</version> 
      <configuration> 
       <source>1.6</source> 
       <target>1.6</target> 
      </configuration> 
     </plugin> 


     <plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>jaxws-maven-plugin</artifactId> 
      <executions> 
       <execution> 
        <id>generate-wsdl</id> 
        <phase>process-classes</phase> 
        <goals> 
         <goal>wsgen</goal> 
        </goals> 
        <configuration> 
         <sei>com.facial.facedetection.ws.FaceDetectionV001<!-- fully qualified class name goes here --></sei> 
         <genWsdl>true</genWsdl> 
        </configuration> 
       </execution> 
       <execution> 
        <id>generate-stubs</id> 
        <phase>process-classes</phase> 
        <goals> 
         <goal>wsimport</goal> 
        </goals> 
        <configuration> 
         <wsdlDirectory>target/jaxws/wsgen/wsdl</wsdlDirectory> 
         <wsdlFiles>     
          <wsdlFile><!-- class name goes here -->Service.wsdl</wsdlFile> 
         </wsdlFiles> 
         <!-- *** you need the next line to set the wsdlLocation in the generated stubs *** --> 
         <wsdlLocation>http://localhost:8080/test</wsdlLocation> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 

    </plugins> 
    </pluginManagement> 
    </build> 
</project> 

또한 콘솔을 빌드 할 때 wsdl 생성에 jave 로그가 없습니다. 아래 콘솔 로그입니다. 또한 외부pluginManagement

<plugins> 
    <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>jaxws-maven-plugin</artifactId> 
    </plugin> 
</plugins> 

:

[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building facedetections Maven Webapp 0.0.1-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ facedetections --- 
[debug] execute contextualize 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] Copying 2 resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.1:compile (default-compile) @ facedetections --- 
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! 
[INFO] Compiling 26 source files to C:\Users\LENOVO\workspace\JavaCV-Harr\face-detection\facedetections\target\classes 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ facedetections --- 
[debug] execute contextualize 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] skip non existing resourceDirectory C:\Users\LENOVO\workspace\JavaCV-Harr\face-detection\facedetections\src\test\resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.1:testCompile (default-testCompile) @ facedetections --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ facedetections --- 
[INFO] No tests to run. 
[INFO] Surefire report directory: C:\Users\LENOVO\workspace\JavaCV-Harr\face-detection\facedetections\target\surefire-reports 

------------------------------------------------------- 
T E S T S 
------------------------------------------------------- 

Results : 

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 

[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ facedetections --- 
[INFO] Packaging webapp 
[INFO] Assembling webapp [facedetections] in [C:\Users\LENOVO\workspace\JavaCV-Harr\face-detection\facedetections\target\facedetections] 
[INFO] Processing war project 
[INFO] Copying webapp resources [C:\Users\LENOVO\workspace\JavaCV-Harr\face-detection\facedetections\src\main\webapp] 
[INFO] Webapp assembled in [1998 msecs] 
[INFO] Building war: C:\Users\LENOVO\workspace\JavaCV-Harr\face-detection\facedetections\target\facedetections.war 
[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored 
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true') 
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ facedetections --- 
[INFO] Installing C:\Users\LENOVO\workspace\JavaCV-Harr\face-detection\facedetections\target\facedetections.war to C:\path\to\local\repo\com\facial\facedetections\0.0.1-SNAPSHOT\facedetections-0.0.1-SNAPSHOT.war 
[INFO] Installing C:\Users\LENOVO\workspace\JavaCV-Harr\face-detection\facedetections\pom.xml to C:\path\to\local\repo\com\facial\facedetections\0.0.1-SNAPSHOT\facedetections-0.0.1-SNAPSHOT.pom 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 20.676s 
[INFO] Finished at: Sat Aug 31 22:13:53 IST 2013 
[INFO] Final Memory: 10M/25M 
[INFO] ------------------------------------------------------------------------ 

답변

0

당신은 플러그인 호출을 추가해야합니다. 수, 바랍니다 pomfile에서

PluginManagement는 (물론 아이 모듈) 플러그인 실행의 구성이지만, 주요 플러그인 요소도

+0

죄송 선언하지 않을 경우 플러그인은 실제로 현재 빌드에서 실행되지 않습니다 당신은 더 명확하게 설명한다 – developer

+0

; ' '에 넣은 플러그인 정의는 하위 프로젝트에서 상속 될 수있는 특정 플러그인의 구성입니다. 실행이 실제로 빌드에 첨부 된 플러그인은 ''요소에 나열된 플러그인입니다. –

+0

이렇게하면, jaxws plugin 선언을''외부로 옮길 수 있습니다. 2. 거기에 그대로두고 ''(artifactId 및 groupId 만 다른 모든 속성은 pluginManagement에서 읽을 수 있습니다) –

관련 문제