ITWissen.info - Tech know how online

Maven

Maven is a project of the ApacheSoftware Foundation for the configuration management of software and refers with Maven 2 specifically to a build management tool. Maven 2 is completely implemented in Java and is currently available in version 2.2.1 at the link below. The objective of Maven 2 is to create and manage Java programs in a standardized way and to map the individual cycles of software development. The scope of functionality of Maven 2 is broader than that of comparable products such as Ant. A completely revised and significantly expanded version will soon be available with Maven 3.

From the point of view of configuration management, it is essential that the steps for creating a software product are repeatable and reproducible at any time, so that the same product can always be created. The increase in productivity achieved through so-called project automation is another positive side effect. The mentioned goals can be realized by a build process. Its concrete implementation is highly project-specific and important influencing factors are, for example, the technology used, such as Java, .NET, etc., as well as the complexity of the product created.

This is exactly where Maven comes in and - based on the principle of "Convention over Configuration" - maps the entire software development cycle. Maven 2 thus goes a step further than the equally popular product Ant (Another Neat Tool) by additionally creating documentation, a detailed analysis and tests for the entire build process. The software developer is to be supported from the creation of a software project over compiling, testing, packing up to the distribution of the software on the appropriate target systems in such a detailed way that the individual steps and their interaction run automatically. In addition, Maven generates a range of documentation and reports in various formats. Maven can be extended at will with plug-ins. Maven thus applies the build process more comprehensively and thus generalizes the process of development more than Ant, for example. Like Ant, however, Maven is also command-line oriented. The Open Source Competence Group (OSCG) provides its own distribution for Maven. For integration into a comfortable development environment, an extension for Eclipse is available with the plug-in M2eclipse

Model-based, declarative approach for model implementation

Maven uses a model-based, declarative approach to implement a build process. Following Maven's standards, most build management tasks require very few configuration settings to map the lifecycle of a software project. This does not require creating long scripts, as is often the case; a so-called project model (POM) is used to compile the project's metadata. This is, for example, information about the external libraries required or the project structure used. In addition to the definition organizes the management of Maven repositories. This is a directory structure defined according to certain specifications with additional management information in the form of XML files. Based on the project model, the build process is performed and exactly one file is created for delivery at a time. Maven can then make this file available to other projects in the local or also in a remote repository, which is particularly advantageous for complex, distributed projects.

In the context of Maven, the following terms are used specifically:

  • Goal is used to refer to Maven's smallest unit of execution,
  • the lifecycle phase combines multiple Goals , and
  • Lifecycle describes an ordered sequence of the lifecycle phase.
Documenting a project takes an important role in Maven's philosophy. Extensive support for the creation of a specific project homepage is also offered.

With the Polyglot Maven project, the path to a Maven 3 version is currently being taken. A first preview is available at the link below. The goal of this project is to generate a higher flexibility of the Maven 3.0 core. It should be possible to pull POM information from data sources and to enable Domain Specific Languages (DSL) to use the core functionalities available in Maven 3. Among others, Groovy, Clojure, Ruby and Scala are to be supported; in the case of markup languages, it will only be YAML in an initial version. This means that the Maven POM no longer has to be XML only. Transformation of a POM is also supported - for example, pom.xml to pom.scala. In addition, the simplification and reduction of modules as well as the simplification of the artifact resolution are planned. An interesting enhancement is the integration of a performance framework. With all changes and modifications, Maven 3 is supposed to be 100% backwards compatible to Maven 2.x. Furthermore, another detail is an improved integration into an extensible development environment like Eclipse. The M2Eclipse plug-in no longer has to run through the entire build lifecycle.

Informationen zum Artikel
Englisch: Maven
Updated at: 28.10.2013
#Words: 1309
Links:
Translations: DE