2011-10-02 5 views
3

GWT 2.4.0 RequestFactory를 사용하려면 요청 팩토리 유효성 검사 도구를 실행해야합니다. 그렇지 않으면 작동하지 않습니다.GWT, Maven 및 AspectJ : AOPed 코드에 대한 RequestFactory 유효성 검사?

<!-- requestfactory-apt runs an annotation processor (APT) to 
     instrument its service interfaces so that 
     RequestFactoryServer can decode client requests. Normally 
     you would just have a dependency on requestfactory-apt 
     with <scope>provided</scope>, but that won't work in 
     eclipse due to m2e bug 
     https://bugs.eclipse.org/bugs/show_bug.cgi?id=335036 --> 
    <plugin> 
    <groupId>org.bsc.maven</groupId> 
    <artifactId>maven-processor-plugin</artifactId> 
    <version>2.0.5</version> 
    <executions> 
     <execution> 
     <id>process</id> 
     <goals> 
      <goal>process</goal> 
     </goals> 
     <phase>generate-sources</phase> 
     </execution> 
    </executions> 
    <dependencies> 
     <dependency> 
     <groupId>com.google.web.bindery</groupId> 
     <artifactId>requestfactory-apt</artifactId> 
     <version>${gwtVersion}</version> 
     </dependency> 
    </dependencies> 
    </plugin> 

    <!-- Google Plugin for Eclipse (GPE) won't see the source 
     generated above by requestfactory-apt unless it is exposed 
     as an additional source dir--> 
    <plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>build-helper-maven-plugin</artifactId> 
    <version>1.7</version> 
    <executions> 
     <execution> 
     <id>add-source</id> 
     <phase>generate-sources</phase> 
     <goals> 
      <goal>add-source</goal> 
     </goals> 
     <configuration> 
      <sources> 
      <source>${project.build.directory}/generated-sources/apt</source> 
      </sources> 
     </configuration> 
     </execution> 
    </executions> 
    </plugin> 

을 문제는, 내가 AOP를 사용하여 매우 복잡한 서버 측 코드를, 그래서 검증 도구 인 경우 : [1], 그건 충분히 단지의 pom.xml 2 플러그인을 추가하려면 [구글은 말한다] "메소드 xxx()가 없다", "클래스 xxx가 인터페이스 yyy를 구현하지 않음"등으로 인해 실패했습니다.

그래서 제 질문은 pom에서이 문제를 해결할 수 있습니까? xml 수준, 오히려 다음 별도로 컴파일 될 별도의 프로젝트로 모든 AOP 코드를 이동?

답변

-2

모든 AOPed 코드를 다른 프로젝트로 이동하면 해결됩니다.

+0

이 모든 실제 해결책은 무엇입니까? –

관련 문제