1
두 웹 서비스 엔드 포인트에 대해 waven을 실행하기 위해 maven 3을 얻으려고합니다. 하나는 src/main/java에있는 'production'엔드 포인트이고 다른 하나는 src/test/java 아래에있는 'test'엔드 포인트입니다.테스트 엔드 포인트에서 jaxws-maven-plugin wsgen
문제는 wsgen이 (아마도) classpath에 src/main/java 만 있기 때문에 'test'sei 클래스를 찾지 못한다는 것입니다. jaxws-maven-plugin을 사용하여 wsgen 클래스 경로를 직접 설정할 수 없습니다 (이에 대한 구성 요소는 없습니다).
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<!-- this works fine -->
<execution>
<id>Production</id>
<configuration>
<genWsdl>true</genWsdl>
<verbose>true</verbose>
<protocol>soap1.1</protocol>
<sei>com.foo.ws.ProductionEndPoint</sei>
<sourceDestDir>${project.build.directory}/jaxws/wsgen/src</sourceDestDir>
<destDir>${project.build.directory}/jaxws/wsgen/classes</destDir>
<packageName>com.foo.ws</packageName>
</configuration>
<goals>
<goal>wsgen</goal>
</goals>
</execution>
<!-- this fails with Class Not Found on the sei class -->
<execution>
<phase>generate-test-sources</phase>
<id>Test</id>
<configuration>
<genWsdl>true</genWsdl>
<verbose>true</verbose>
<protocol>soap1.1</protocol>
<sei>com.foo.ws.TestEndPoint</sei>
<sourceDestDir>${project.build.directory}/jaxws/wsgen/src</sourceDestDir>
<destDir>${project.build.directory}/jaxws/wsgen/classes</destDir>
<packageName>com.foo.ws.test</packageName>
</configuration>
<goals>
<goal>wsgen</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-tools</artifactId>
<version>2.1.4</version>
</dependency>
</dependencies>
</plugin>
</plugin>
</build>
아, 그리고 wsgen 테스트 목표도 시도했지만 대상 디렉토리 아래에 생성 된 코드를 배치하는 동안 src/test/java를 실행하기 전에 classpath에 넣지 않습니다. – Chris