I'm not sure how to create a maven project from eclipse, but creating it from scratch is very simple. For gae you can use net.kindleit:maven-gae-plugin See http://www.kindleit.net/maven_gae_plugin/index.html , it can generate pom.xml for you. Or just use it like
<plugin> <groupId>net.kindleit</groupId> <artifactId>maven-gae-plugin</artifactId> <version>0.8.4</version> <configuration> <port>8080</port> <address>127.0.0.1</address> </configuration> <executions> <execution> <id>start-gae</id> <goals> <goal>stop</goal> <goal>unpack</goal> <goal>start</goal> </goals> </execution> <execution> <id>stop-gae</id> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin>
but don't forget to add the GAE dependencies:
<dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-api-1.0-sdk</artifactId> <version>${gae.version}</version> </dependency> <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-api-labs</artifactId> <version>${gae.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-api-stubs</artifactId> <version>${gae.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-testing</artifactId> <version>${gae.version}</version> <scope>test</scope> </dependency>
and repositories:
<pluginRepositories> <pluginRepository> <id>maven-gae-plugin-repo</id> <name>maven-gae-plugin repository</name> <url>http://maven-gae-plugin.googlecode.com/svn/repository</url> </pluginRepository> </pluginRepositories> <repositories> <repository> <id>maven-gae-plugin-repo</id> <name>maven-gae-plugin repository</name> <url>http://maven-gae-plugin.googlecode.com/svn/repository</url> </repository> </repositories>
and then you can create an eclipse configuration using mvn eclipse:eclipse
You can start the Dev server using mvn gae:run , deploy mvn gae:deploy
To use Spring, add dependencies to the spring-webmvc , spring-core and spring-context org.springframework in the org.springframework group
Igor Artamonov
source share