Maven

 
 
Maven is a Java project management and project comprehension tool. It's primary goal is to make the developers life easier by providing a well defined project structure, well defined development processes to follow, and a coherent body of documentation that keeps your developers and clients apprised of what's happening with your project.

Maven is distributed at no charge for commercial or non-commercial use and is licensed under the Apache License, Version 2.0.

More information about Maven can be found at: http://maven.apache.org

The latest Maven version can be downloaded from: http://maven.apache.org/download.html

rss feed






Maven pom.xml file.



Information
none

Operating system used
Windows Vista Home Premium SP 2

Software prerequisites
Maven 3.0 or higher.


Procedure
  1. The simplest pom.xml contains the following three mandatory fields:

    • groupId
      To identify the company or organization. Usually the reverse domain is used.
      For example: com.mobilefish.apps

    • artifactId
      Refers to the projects name.
      For example: mobile-banking

    • version
      The project version
      For example: 1.0.0 or 1.0-SNAPSHOT

    The groupId, artifactId and version are used to define the location of an artifact within the maven repository.

  2. Example of the most simplest pom.xml:

    <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/xsd/maven-4.0.0.xsd">
       <modelVersion>4.0.0</modelVersion>
       <groupId>com.mobilefish.apps</groupId>
       <artifactId>mobile-banking</artifactId>
       <version>1.0.0</version>
    </project>

  3. The pom.xml file is located within a project folder but is not the actual pom.xml used by maven.
    A pom.xml file inherits from a super pom containing default values.
    Together they form a so-called effective pom which is the actual pom.xml file used by maven.

    To find out how your effective pom file looks like, type (where the pom.xml file is located):

    mvn help:effective-pom

    Example of an effective pom.xml based on the above mentioned simplest pom.xml file.