For Appengine testing using Eclipse-Maven I have this defined in the POM.xml
<!-- Appengine Testing -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-labs</artifactId>
<version>${appengine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>${appengine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>${appengine.version}</version>
<scope>test</scope>
</dependency>
However, everytime I add this dependency, when my webapp is invoked, it throws this error:
java.lang.ClassCastException: com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to com.google.appengine.tools.development.ApiProxyLocal
Although I can run JUnit and test my Appengine specific code, it is very painful that everytime I have to run the app I have to delete these dependencies and refresh everything.
Is there any workaround with this scenario?
I use the same POM as you (@xybrek), I solved this by doing a simple
mvn clean gae:run, now it works from maven …