basic poms

  • pom.xml parent
  • <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">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.my.android</groupId>
      <artifactId>myAndroidApp</artifactId>
        <version>1.0</version>
        <packaging>pom</packaging>
        <name>Android Apps</name>
      <description>Android apps</description>
      <url>http://www.wiebe-elsinga.com</url>
      <inceptionYear>2010</inceptionYear>
      <developers>
        <developer>
          <name>Wiebe Elsinga</name>
          <id>welsinga</id>
          <url>http://www.wiebe-elsinga.com</url>
          <roles>
            <role>Developer</role>
                    <role>Contributor</role>
                </roles>
        </developer>
      </developers>
      <modules>
        <module>Android</module>
        <module>AndroidTest</module>
      </modules>
    </project>
  • pom.xml Android project
  • <?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">
      <modelVersion>4.0.0</modelVersion>
      <parent>
        <groupId>com.my.android</groupId>
        <artifactId>myAndroidApp</artifactId>
        <version>1.0</version>
      </parent>
      <artifactId>Android</artifactId>
        <packaging>apk</packaging>
        <name>My Android App</name>
      <description>The first android app I made</description>
      <url>http://www.wiebe-elsinga.com</url>
      <inceptionYear>2010</inceptionYear>
      <developers>
        <developer>
          <name>Wiebe Elsinga</name>
          <id>welsinga</id>
          <url>http://www.wiebe-elsinga.com</url>
          <roles>
            <role>Developer</role>
                    <role>Contributor</role>
                </roles>
        </developer>
      </developers>
    </project>
  • pom.xml AndroidTest project
  • <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">
      <modelVersion>4.0.0</modelVersion>
      <parent>
        <groupId>com.my.android</groupId>
        <artifactId>myAndroidApp</artifactId>
        <version>1.0</version>
      </parent>
      <artifactId>AndroidTest</artifactId>
        <packaging>apk</packaging>
        <name>My Android Tesst App</name>
      <description>Testing my first android app</description>
      <url>http://www.wiebe-elsinga.com</url>
      <inceptionYear>2010</inceptionYear>
      <developers>
        <developer>
          <name>Wiebe Elsinga</name>
          <id>welsinga</id>
          <url>http://www.wiebe-elsinga.com</url>
          <roles>
            <role>Developer</role>
                    <role>Contributor</role>
                </roles>
        </developer>
      </developers>
    </project>
    1. Sanjeev
      I have one questions i am very new to maven i want build android project through maven. My project name is "MyAndroid" and top level package name "com.my.android" which contains main activity. what are these fields ? modelVersion: groupId: artifactId: and what are the values for these fields.
    2. W.Elsinga
      Have a look at: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

    Leave a Reply

    *

    captcha *