Refer to Http://spring.io/guides/gs/maven-android/
The pom.xml of a typical Android Maven project is as follows
<?xml version= "1.0" encoding= "UTF-8"? ><project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "http ://www.w3.org/2001/XMLSchema-instance "xsi:schemalocation=" http://maven.apache.org/POM/4.0.0/http Maven.apache.org/maven-v4_0_0.xsd "> <!--POM version number, always 4.0.0--and <modelversion>4.0.0</modelversion& Gt <!--organization Domain name reversal is actually the value of the androidmanifest.xml inside the package node--<groupId>org.hello</groupId> <!-- The name of the project, such as the name displayed in the IDE's project view, not necessarily the name that the app displays on the phone--<artifactId>gs-maven-android</artifactId> & lt;! --Project version number--<version>0.1.0</version><!--There will be duplicate Groupid,artifactid, the version node, meaning the same--<! --means packaged into a apk--> <packaging>apk</packaging> <properties> <!--use UTF-8 for Everythin G--<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reportin G.outputencoding>utf-8</project.reporting.outpuTencoding> </properties> <!--The library that this project relies on can have several dependency subnodes, each representing a dependent library--> <dependen cies> <dependency> <groupId>com.google.android</groupId> <artifactid& Gt;android</artifactid> <version>4.1.1.4</version> <!--scope indicates the period of the library's existence, C Ompile,runtime,test and provided,provided indicate that the device on which the app resides at runtime will give him a <scope>provided</scope> </dependency> </dependencies> <!--The build node is configured with something that needs to be used when the project is compiled, and a build node has a plugins child node underneath it with multiple plug In child nodes, each plugin child node has groupid,artifactid,version and other sub-nodes, meaning the same as mentioned above. In addition, the plugin node typically has a configuration node, which indicates further configurations of this plugin-<build> <plugins> <plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactid> ;android-maven-plugin</artifactid> <version>3.9.0-rc.1</version> <configuration> <sdk> <platform>19 </platform> </sdk> <deleteconflictingfiles>true</deleteconflict Ingfiles> <undeployBeforeDeploy>true</undeployBeforeDeploy> </configur Ation>
<!--whether to load this plugin extensions, can be true and false, or there can be some columns of extension child nodes, which should be set to true--> <extensions>true </extensions> </plugin> <plugin> <artifactid>maven-compiler-plugin</ artifactid> <version>3.1</version> <configuration> <source>1.6</ source> <target>1.6</target> </configuration> </plugin> </ Plugins> </build></project>
More information: http://maven.apache.org/pom.html
Android Maven Pom.xml Explained