3
votes

The appengine-modules-sample-java contains the file appengine-modules-ear/src/main/application/META-INF/maven-application.xml.

  1. What is maven-application.xml for?

  2. What part of the appengine-modules-sample-java sample refers to maven-application.xml or is it a conventional file that's looked for by the build system or runtime system?

  3. If it's a convention, where is its specification?

  4. Is maven-application.xml redundant with appengine-modules-ear/src/main/application/META-INF/application.xml?

  5. If application.xml is required for Google modules, why is the following warning in appengine-modules-ear/src/main/application/META-INF/application.xml?

This is the application.xml file intended for use with gradle, if you find it in your maven project, then that's a problem most likely.

  1. Possibly related to question 5: why are there both maven and gradle configuration files in one project? Don't they both automate building?

Thanks for your help.

1

1 Answers

4
votes
  1. maven-application.xml is the just the application.xml file when building with maven

  2. if you look at appengine-moudles-ear/pom.xml, you'll see a reference to maven-application.xml (basically telling maven to look for maven-application.xml instead of application.xml)

  3. I guess this is answered by "2", but the convention is to use application.xml

  4. They are not redundant. Due to some quirks with how maven and gradle handle exploding (unzipping/unarchiving) EAR containers, the included war directories have slightly different names. If you take a look a the application.xml it refers to wars by their names appengine-modules-guestbook, and if you look at maven-application.xml it refers to them as name-version.war appengine-modules-guestbook-1.0.war, it turns out they're both directories though, just named differently by the plugins.

  5. see 4

  6. The sample includes both gradle and maven build files, and these steps were necessary to get it working with both build systems at the same time. You can probably remove all the gradle stuff and just use maven when extending this sample (and rename the application.xml to something of your liking)