I want to use maven for a GAE project, how do i do?

前端 未结 3 1506
盖世英雄少女心
盖世英雄少女心 2021-02-09 20:36

i\'m new in the world of GAE. I \'m using eclipse and GAE\'s SDK, i can deploy to the cloud with the GAE icon and everything is fine. The problem arises when I have to import th

3条回答
  •  野的像风
    2021-02-09 21:02

    You'll need to define a pom.xml for the project which declares the dependencies.
    When you build with maven the dependencies will be downloaded from the remote repositories and stored in you local repository ${userhome}/.m2/repository.
    The maven build will also bindle the dependencies in your war file.

    The easiest way to get started is by creating a project structure using an archetype.

    There are 2 archetypes that I've tried for gae so far:

    1. gae-archetype-gwt, which is built adjacent to the gae-maven-plugin, see this article.
    2. gae-eclipse-maven-archetype, see this article and also note the link at the top of the article for the helios update.

    As the name suggests gae-eclipse-maven-archetype has better support for eclipse, I have been finding that the configurations for maven and eclipse have been clashing with each other, which gae-eclipse-maven-archetype goes a long way to alleviate.

    If your current project is not using the maven directory structure, then you are going to have an uphill battle. Maven projects are easier to configure if you try to fit in with the defaults which are largely sensible options, rather than going against the grain and having to override all of the default configuration options.

提交回复
热议问题