2016-12-22 3 views
0

axis2-wsdl2code-maven-plugin을 사용하여 SOAP 서비스 클라이언트를 생성하고 있습니다. 플러그인 자체가 제대로 작동하고 그것은 올바른 SOAP 클라이언트를 생성하지만 나는 모든 빌드 콘솔에서 경고를 다음 얻을 :Ax2-wsdl2code-maven-plugin을 사용하여 SOAP 클라이언트를 생성하는 중 Log4j 경고

log4j:WARN No appenders could be found for logger (org.apache.axiom.locator.DefaultOMMetaFactoryLocator). 
log4j:WARN Please initialize the log4j system properly. 

내가 Log4j의 속성을 구성 할 필요가 알고 있지만, 나는 어떤 기능 방식을 발견하지 않았습니다

<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/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 

    <artifactId>powerauth-java-client-axis</artifactId> 
    <version>0.13.0</version> 
    <name>powerauth-java-client-axis</name> 
    <description>PowerAuth 2.0 Service Client - Axis</description> 

    <parent> 
     <groupId>io.getlime.security</groupId> 
     <artifactId>powerauth-parent</artifactId> 
     <version>0.13.0</version> 
     <relativePath>../pom.xml</relativePath> 
    </parent> 

    <dependencies> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2</artifactId> 
      <version>1.6.3</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2-adb</artifactId> 
      <version>1.6.3</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2-transport-http</artifactId> 
      <version>1.6.3</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2-transport-local</artifactId> 
      <version>1.6.3</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.ws.commons.axiom</groupId> 
      <artifactId>axiom-api</artifactId> 
      <version>1.2.20</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.ws.commons.axiom</groupId> 
      <artifactId>axiom-impl</artifactId> 
      <version>1.2.20</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.ws.security</groupId> 
      <artifactId>wss4j</artifactId> 
      <version>1.6.19</version> 
     </dependency> 
     <dependency> 
      <groupId>wsdl4j</groupId> 
      <artifactId>wsdl4j</artifactId> 
     </dependency> 
    </dependencies> 

    <build> 
     <plugins> 
      <!-- tag::wsdl[] --> 
      <plugin> 
       <groupId>org.apache.axis2</groupId> 
       <artifactId>axis2-wsdl2code-maven-plugin</artifactId> 
       <version>1.6.4</version> 
       <executions> 
        <execution> 
         <goals> 
          <goal>wsdl2code</goal> 
         </goals> 
         <configuration> 
          <packageName>io.getlime.powerauth.soap</packageName> 
          <wsdlFile>${basedir}/src/main/resources/soap/wsdl/service.wsdl</wsdlFile> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 
      <!-- end::wsdl[] --> 
     </plugins> 
    </build> 

</project> 
+0

src/main/resources에 log4j.properties 파일을 추가 했습니까? src/main/resources에있는 maven 프로젝트의 내용은 classpath에 포함되어 있다고 생각합니다. –

+0

예, 시도했으나 경고 없이는 작동하지 않습니다. 이 프로젝트는 [github에서 사용 가능합니다.] (https://github.com/lime-company/lime-security-powerauth/tree/master/powerauth-java-client-axis),'mvn package -am- pl powerauth-java-client-axis' 명령을 사용합니다. –

+0

'-Dlog4j.configuration = log4j.properties'를 사용하여 실행중인 메이븐 목표를 빌드 해 볼 수 있습니까? –

답변

2

이 실제로 버그 : 이것은 내 pom.xml 파일입니다 ... axis2-wsdl2code-maven-plugin의 맥락에서

을 이렇게. AXIS2-5364에 대한 fix은 log4j에 대한 axis2-wsdl2code-maven-plugin에 대한 종속성을 추가했습니다. 문제는 플러그인에 의해 실행되는 코드 중 일부가 Commons Logging을 사용하므로 log4j를 사용하기 시작한 것입니다. Maven 환경에서 log4j가 구성되지 않았기 때문에 경고 메시지가 표시됩니다.

플러그인이 수행해야하는 작업은 해당 API가 supported by recent Maven versions이므로 로그를 SLF4J로 리디렉션하는 것입니다. -X 옵션 (Maven 명령 행에서 디버그 로깅 사용 가능)은 이러한 로그에서도 작동합니다.

이 문제는 AXIS2-5827으로 처리됩니다.