2015-11-04 45 views
0

有没有人在GWTP Boilerplate Generation的Eclipse Annotation Processing指示下成功?我遵循Eclipse Annotation Processing的指示,但无法导入GWTP注释包。GWTP Boilerplate Generation - Eclipse Annotation Processing

我很感谢任何有关Eclipse Annotation Processing或提及的Maven Configuration setup的任何见解。

这些是GWTP Boilerplate Generation方向(页面底部):

Eclipse的注解处理

在Eclipse中,只要你保存你的工作文件上的注解处理器踢并逐步更改 只更改所需的文件。另一种方法是使用Eclipse生命周期映射。如果使用生命周期 映射,则不必设置注释处理器。了解更多关于 的Maven配置如何设置注释处理而不用触摸eclipse属性。

要启用GWTP注释处理在eclipse:

  • 打开您的项目
  • 勾选标注处理网页上的所有箱子属性。 选中“注释处理”页面上的所有框。
  • 将GWTP jar添加到工厂路径。 将GWTP jar添加到工厂路径。

回答

0

Maven中你可以试试这个:

1)进口gwtp处理器

<dependency> 
<groupId>com.gwtplatform</groupId> 
<artifactId>gwtp-processors</artifactId> 
<version>${gwtplatform.version}</version> 
</dependency> 

2)使用下一个插件

<!-- Run annotation processors on src/home/java sources --> 
    <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>${gwt.version}</version> 
        </dependency> 
       </dependencies> 
      </plugin> 
      <plugin> 
       <groupId>org.codehaus.mojo</groupId> 
       <artifactId>build-helper-maven-plugin</artifactId> 
       <version>1.9</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>