Android Maven Pom.xml Explained

Source: Internet
Author: User

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&gt ;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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.