Apache maven 2

    I decided to try to write something on my blog, so do not scold too much if that;) I am writing the first article about Apache Maven 2, a system for building and managing Java projects. This is a review article, if anyone is interested, I’ll do a short cycle already with the details.

    So what is Maven? Java developers are well aware of the Apache Ant utility. A fairly adequate replacement for the command line, however, in order to add some new resources to the project, compiled modules have to write more than one line in build.xml. Maven, on the other hand, pretty much reduces the number of steps to get the desired result.
    The main idea of ​​Maven is that each project has a so-called project object model (POM), which is described in the pom.xml file. It lists all the modules that the project uses, paths to repositories, and much more. All you have to do is develop this very object model and build the project using Maven. At the same time, it is not necessary to describe everything up to the catalog - Maven “knows” how projects are usually built and he himself will find and collect everything.
    For more aboutFor simplicity and speed of work, there are so-called archetypes - with their help, you can create a directory structure and an object model for a project automatically. There are already quite a few predefined archetypes in Maven that describe web applications, class libraries, J2EE applications, and more. In addition, you can easily create your own.
    Work with repositories is very well organized. If Maven does not find the module or plug-in he needs in the local repository, he himself tries to download it from the Internet and after that puts it in his local one.
    Using plugins, Maven is easily integrated into all the most popular IDEs (Eclipse, NetBeans, IDEA, JDeveloper). This greatly simplifies teamwork - each developer can work in their favorite IDE and not be afraid of the incompatibility of directories and project files.
    There is also the opportunity to generate a site that displays information about new library releases.
    Perhaps in a nutshell - that's all. If someone is interested, I can continue. In particular, I will describe in more detail the architecture of Maven, the process of creating an application, servicing the repository server, and integration into various IDEs.

    Also popular now: