2. 2 Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information. What is Maven
3.
4. Will become messy and incomprehensible if the projects don’t adhere to some common principles
5. Will be time-consuming to build all projects manuallyUse a project management tool (like Maven) Maven helps you with various aspects: Build process Project structure Dependency management Access to information and documentation
14. 8 The build lifecycle is the process of building and distributing an artifact A phase is a step in the build lifecycle Most important default phases: Validate Compile Test Package Install Deploy Some common phases not default: Clean Site For each step, all previous steps are executed Build Lifecycle and Phases
15. 9 Advantages: A developer familar with Maven will quickly get familiar with a new project No time wasted on re-inventing directory structures and conventions src/main/java Javasource files goes here src/main/resources Other resources your application needs src/main/filters Resource filters (properties files) src/main/config Configuration files src/main/webapp Web application directory for a WAR project src/test/java Test sources like unit tests (not deployed) src/test/resources Test resources (not deployed) src/test/filters Test resource filter files (not deployed) src/site Files used to generate the Maven project website Standard directory layout
16. 10 Dependency: a third-party or project-local software library (JAR or WAR file) Dependency management is a challenge in multi-module projects Dependency management
21. 15 Most projects use open source software as building blocks in application development. These building blocks, referred to as Artifacts, are best obtained from Maven repositories, because these repositories store binary artifacts together with meta data to describe dependencies, licensing and locations of source code. To control what artifacts are acquired, to manage local repositories and to support their software development work-flows and policies, companies use an Artifact Repository Manager such as Nexus Open Source or Nexus Professional. Sonatype Nexus - Artifact Repository Managers
22. 16 Proxy Repository: A proxy repository is a proxy of a remote repository. Hosted Repository: A hosted repository is a repository which is hosted by Nexus. Virtual Repository: This serves as an adapter to and from different types of repositories. Currently Nexus supports conversion to and from Maven 1 repositories and Maven 2 repositories. Sonatype Nexus - Artifact Repository Managers