Introducing Maven: A Build Tool for Today's Java Developers
()
About this ebook
Gain an understanding of Maven’s dependency management and use it to organize basic and multi-module Maven projects. This short book is your quick-start tutorial for learning to use Maven. It includes inconsistently immutable collections, better array construction, and more from the latest Maven version 3.6. This second edition covers the newest in today's most popular build tool for Java development and programming.
You'll learn all about Maven and how to set it up. Firstly, you’ll cover the Maven life cycle and how to effectively leverage it. Also, you'll see the basics of site plugins, generating Javadocs, test coverage/FindBugs reports, and version/release notes. Furthermore, you'll take advantage of Maven's archetypes to bootstrap new projects easily. Finally, you will learn how to integrate the Nexus repository manager with Maven release phases.What You Will Learn
- Set up your basic project in Maven
- Create more advanced projects
- Apply the Maven life cycle to your build Work with Maven archetypes and manage Maven releases
- Integrate with Jenkins, Eclipse, and other IDEs Carry out debugging and password encryption
Who This Book Is For
Those new to Maven or those who are familiar with Maven, but maybe not with the latest Maven 3.6 release.
Related to Introducing Maven
Related ebooks
Extending Jenkins Rating: 0 out of 5 stars0 ratingsCreating Development Environments with Vagrant - Second Edition Rating: 0 out of 5 stars0 ratingsHands-on Azure Pipelines: Understanding Continuous Integration and Deployment in Azure DevOps Rating: 0 out of 5 stars0 ratingsNginx Troubleshooting Rating: 0 out of 5 stars0 ratingsSecuring WebLogic Server 12c Rating: 0 out of 5 stars0 ratingsJAVA 9.0 To 13.0 New Features: Learn, Implement and Migrate to New Version of Java. Rating: 0 out of 5 stars0 ratingsGetting Started with Hazelcast - Second Edition Rating: 0 out of 5 stars0 ratingsDocker: Up and Running: Build and deploy containerized web apps with Docker and Kubernetes (English Edition) Rating: 0 out of 5 stars0 ratingsMastering Jenkins Rating: 3 out of 5 stars3/5Learning SaltStack - Second Edition Rating: 0 out of 5 stars0 ratingsKubernetes A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsTerraform for Developers: Essentials of Infrastructure Automation and Provisioning Rating: 0 out of 5 stars0 ratingsKubernetes A Complete Guide Rating: 0 out of 5 stars0 ratingsHands-on Ansible Automation: Streamline your workflow and simplify your tasks with Ansible (English Edition) Rating: 0 out of 5 stars0 ratingsKubernetes: Preparing for the CKA and CKAD Certifications Rating: 0 out of 5 stars0 ratingsTerraform Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsTraefik API Gateway for Microservices: With Java and Python Microservices Deployed in Kubernetes Rating: 0 out of 5 stars0 ratingsDocker A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsMaking Sense of Agile Project Management: Balancing Control and Agility Rating: 0 out of 5 stars0 ratingsElasticsearch 5.x Cookbook - Third Edition Rating: 0 out of 5 stars0 ratingsMastering Cloud-Native Microservices: Designing and implementing Cloud-Native Microservices for Next-Gen Apps (English Edition) Rating: 0 out of 5 stars0 ratingsOracle Exalytics Revealed: E-Book Rating: 0 out of 5 stars0 ratingsCI/CD Pipeline with Docker and Jenkins: Learn How to Build and Manage Your CI/CD Pipelines Effectively (English Edition) Rating: 0 out of 5 stars0 ratingsBeginning Mobile Application Development in the Cloud Rating: 0 out of 5 stars0 ratingsCouchbase Essentials Rating: 0 out of 5 stars0 ratingsMicroservices A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsChaos Engineering A Clear and Concise Reference Rating: 0 out of 5 stars0 ratings
Programming For You
Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5Game Development with Unreal Engine 5: Learn the Basics of Game Development in Unreal Engine 5 (English Edition) Rating: 0 out of 5 stars0 ratingsExcel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5C# Programming from Zero to Proficiency (Beginner): C# from Zero to Proficiency, #2 Rating: 0 out of 5 stars0 ratingsPython Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Learn JavaScript in 24 Hours Rating: 3 out of 5 stars3/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsPYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Python Machine Learning By Example Rating: 4 out of 5 stars4/5Problem Solving in C and Python: Programming Exercises and Solutions, Part 1 Rating: 5 out of 5 stars5/5Python Data Structures and Algorithms Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5The Unofficial Guide to Open Broadcaster Software: OBS: The World's Most Popular Free Live-Streaming Application Rating: 0 out of 5 stars0 ratingsPython GUI Programming Cookbook - Second Edition Rating: 5 out of 5 stars5/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5
Reviews for Introducing Maven
0 ratings0 reviews
Book preview
Introducing Maven - Balaji Varanasi
© Balaji Varanasi 2019
B. VaranasiIntroducing Mavenhttps://doi.org/10.1007/978-1-4842-5410-3_1
1. Getting Started with Maven
Balaji Varanasi¹
(1)
Salt Lake City, UT, USA
Like other craftsmen, software developers rely on their tools to build applications. Developers’ integrated development environments (IDEs), bug-tracking tools, build tools, frameworks, containers, and debug tools, such as memory analyzers, play a vital role in day-to-day development and maintenance of quality software. This book will discuss and explore the features of Maven, which we know will become an important tool in your software development arsenal.
Apache Maven is an open source, standards-based project management framework that simplifies the building, testing, reporting, and packaging of projects. Maven's initial roots were in the Apache Jakarta Alexandria project that took place in early 2000. It was subsequently used in the Apache Turbine project. Like many other Apache projects at that time, the Turbine project had several subprojects, each with its own Ant-based build system. Back then, there was a strong desire for developing a standard way to build projects and to share generated artifacts easily across projects. This desire gave birth to Maven. Maven version 1.0 was released in 2004, followed by version 2.0 in 2005 and version 3.0 in 2010. At the time of writing this book, 3.6.1 is the current version of Maven.
Maven has become one of the most widely used open source software programs in enterprises around the world. Let's look at some of the reasons why Maven is so popular.
Standardized Directory Structure
Often, when we start work on a new project, a considerable amount of time is spent deciding on the project layout and folder structure needed to store code and configuration files. These decisions can vary vastly across projects and teams, which can make it difficult for new developers to understand and adopt other teams' projects. It can also make it hard for existing developers to jump between projects and find what they are seeking.
Maven addresses the preceding problems by standardizing the folder structure and organization of a project. Maven provides recommendations on where different parts of a project, such as source code, test code, and configuration files, should reside. For example, Maven suggests that all of the Java source code should be placed in the src\main\java folder. This makes it easier to understand and navigate any Maven project.
Additionally, these conventions make it easy to switch to and start using a new IDE. Historically, IDEs varied with project structure and folder names. A dynamic web project in Eclipse might use the WebContent folder to store web assets, whereas IntelliJ IDEA might use web folder for the same purpose. With Maven, your projects follow a consistent structure and become IDE agnostic.
Declarative Dependency Management
Most Java projects rely on other projects and open source frameworks to function properly. It can be cumbersome to download these dependencies manually and keep track of their versions as you use them in your project.
Maven provides a convenient way to declare these project dependencies in a separate, external pom.xml file. It then automatically downloads those dependencies and allows you to use them in your project. This simplifies project dependency management greatly. It is important to note that in the pom.xml file, you specify the what and not the how. The pom.xml file can also serve as a documentation tool, conveying your project dependencies and their