Revision: 10652
Author: [email protected]
Date: Fri Sep 16 14:51:55 2011
Log: Updated pom.xml with the new sauce for annotation processing
http://code.google.com/p/google-web-toolkit/source/detail?r=10652
Modified:
/wiki/RequestFactoryInterfaceValidation.wiki
=======================================
--- /wiki/RequestFactoryInterfaceValidation.wiki Wed Sep 14 14:31:53 2011
+++ /wiki/RequestFactoryInterfaceValidation.wiki Fri Sep 16 14:51:55 2011
@@ -56,31 +56,57 @@
An optional client-only mode will produce the metadata required by
`RequestFactorySource` clients using only the shared interfaces. This mode
is activated by adding a `-client` flag before the output location.
== Maven builds ==
-Use the following recipe to run the !ValidationTool as a post-compilation
step. If you are using Maven with Google Plugin for Eclipse (see
WorkingWithMaven), you do not need to configure Eclipse with the
requestfactory-apt.jar as described above. The !ValidationTool will be
invoked via the POM instead.
+Use the following recipe to run the !ValidationTool. If you are using
Maven with Google Plugin for Eclipse (see WorkingWithMaven), you do not
need to configure Eclipse with the requestfactory-apt.jar as described
above. The !ValidationTool will be invoked via the POM instead.
{{{
- <!-- Run the RequestFactory ValidationTool -->
+ <!-- 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>exec-maven-plugin</artifactId>
- <version>1.2</version>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
<executions>
<execution>
- <phase>process-classes</phase>
- <configuration>
- <id>VerifyRequestFactoryInterfaces</id>
- <executable>java</executable>
- <arguments>
- <argument>-cp</argument>
- <classpath />
-
<argument>com.google.web.bindery.requestfactory.apt.ValidationTool</argument>
- <argument>${project.build.outputDirectory}</argument>
-
<argument>com.google.gwt.sample.mobilewebapp.shared.MobileWebAppRequestFactory</argument>
- </arguments>
- </configuration>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
<goals>
- <goal>exec</goal>
+ <goal>add-source</goal>
</goals>
+ <configuration>
+ <sources>
+
<source>${project.build.directory}/generated-sources/apt</source>
+ </sources>
+ </configuration>
</execution>
</executions>
</plugin>
@@ -102,11 +128,11 @@
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <versionRange>[1.2,)</versionRange>
+ <groupId>org.bsc.maven</groupId>
+ <artifactId>maven-processor-plugin</artifactId>
+ <versionRange>[2.0.5,)</versionRange>
<goals>
- <goal>exec</goal>
+ <goal>process</goal>
</goals>
</pluginExecutionFilter>
<action>
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors