2013-01-14 3 views
2

이 문제 "는 클래스 여야합니다 결과 리 바인드"오류를 설치 2.5.0. 이 라인 오류의 조각이 GWT는 MVN이

<replace-with class="c3gw.fwk.gui.client.ClientFactoryImpl"> 
    <when-type-is class="c3gw.fwk.gui.client.ClientFactory" /> 
</replace-with> 

입니다 : 이것은 내 C3gwGui.gwt.xml의 조각이

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>gwt-maven-plugin</artifactId> 
    <version>2.5.0</version> 
    <executions> 
     <execution> 
     <goals> 
      <goal>compile</goal> 
      <goal>test</goal> 
      <goal>i18n</goal> 
      <goal>resources</goal> 
      <goal>generateAsync</goal> 
     </goals> 
     </execution> 
    </executions> 
    <configuration> 
     <runTarget>C3gwGui.html</runTarget> 
     <hostedWebapp>${webappDirectory}</hostedWebapp> 
     <i18nMessagesBundle>c3gw.fwk.gui.client.Messages</i18nMessagesBundle> 
    </configuration> 
    </plugin> 

    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-war-plugin</artifactId> 
     <version>2.1.1</version> 
     <executions> 
      <execution> 
       <phase>compile</phase> 
       <goals> 
        <goal>exploded</goal> 
       </goals> 
      </execution> 
     </executions> 
     <configuration> 
      <webappDirectory>${webappDirectory}</webappDirectory> 
     </configuration> 
    </plugin> 

:

내 pom.xml 파일의 미리보기입니다 다음과 같이 throw됩니다.

public void onModuleLoad() { 
    ClientFactory clientFactory = GWT.create(ClientFactory.class); 

    ... 
} 

ClientFactory는 인터페이스이며 ClientFactoryImpl은 인터페이스를 구현합니다.

내가 지금까지 알아 낸 것 : 디버그를 실행할 때이 코드는 Eclipse에서 완벽하게 작동하지만 mvn을 설치하면 작동하지 않습니다. 나는 gwt-maven-plugin (clean, compile, sources, etc ...)에서 사용할 수있는 모든 목표를 실행했으며,이 모든 것이 작동하기 때문에이 시점에서 내가 할 수있는 유일한 결론은 Maven-War -Plugins phase 또는 훨씬 나중에.

또한이 코드의 기본 사항을 다음 google tutorial에서 가져 와서 인터페이스를 사용하므로 예제 프로젝트도 제대로 작동한다고 가정합니다.

+1

'war : exploded'을 제거해 보셨습니까? 그것은 필요하지 않아야합니다. AFAICT 그것은 더 이상 필요하지 않아야하는 devmode에 대한 해킹이었습니다 (언제든지 있었음). –

+0

com.mycompany.gwt.Module 모듈에 해당 모듈에 대한 'inherits' 문이 있습니까? '... C3gwGui' 모듈? –

+0

고마워 토마스, 그 일했다. 그것은 지금 구축됩니다. 나는 그것이 다른 원치 않는 효과를 일으키는 지 점검 할 것입니다. Colin, 죄송합니다. 위의 게시물에서 pom.xml을 수정했습니다. 잘못된 pom 정보였습니다. – Thirlan

답변

0

전쟁 제거 : 토마스가 지적한대로 폭발되어 문제가 해결되었습니다.