• Complain

Balaji Varanasi - Introducing Maven

Here you can read online Balaji Varanasi - Introducing Maven full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2014, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Balaji Varanasi Introducing Maven

Introducing Maven: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Introducing Maven" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Introducing Maven is your quick start-up primer guide on Maven. This fully packed mini-book includes the new features and enhancements found in the latest version of Maven.

In this short 100-page book, youll learn all about Maven and how to set it up to use. Youll learn about the Maven life cycle and how to effectively leverage and use it. Also, youll learn the basics of using site plugins and generating Javadocs, test coverage/FindBugs reports, version/release notes and more. Furthermore, youll take advantage of Mavens archetypes to bootstrap new projects easily. Finally, you will learn how to integrate Nexus repository manager with Maven release phases.

After reading and using this short book, youll have an understanding of Mavens dependency management and how to organize basic and multi-module Maven projects.

What youll learn
  • What Maven is and how it compares with Ant, Gradle and more.
  • How to set up and test Maven
  • What transitive dependencies are
  • How to create a basic Maven project
  • How set up a multi-module project
  • What is the Maven life cycle and how to leverage it
  • How to generate Javadocs, unit test reports and more with Maven
  • How to use Maven archetypes
  • How to integrate with Nexus repository manager
  • Releasing your project with Maven and more
  • How to integrate with Subversion
Who this book is for

This book is for those new to Maven. It is recommended for experienced Java coders, programmers and developers, especially those doing enterprise and Java web development using the Spring Framework.

Balaji Varanasi: author's other books


Who wrote Introducing Maven? Find out the surname, the name of the author of the book and a list of all author's works by series.

Introducing Maven — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Introducing Maven" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make

CHAPTER 1

Picture 1

Getting Started with Maven

Like other craftsmen, software developers rely on their tools to build applications. Developers integrated development environments (IDEs), bug-tracking tools, build tools, frameworks, 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. Mavens 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. At the time of writing this book, 3.0.5 is the current version of Maven.

Maven has become one of the most widely used open source software programs in enterprises around the world. Lets 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 above 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 NetBeans might use Web Pages 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 versions.

Plug-ins

Maven follows a plug-inbased architecture, making it easy to augment and customize its functionality. These plug-ins encapsulate reusable build and task logic. Today, there are hundreds of Maven plug-ins available that can be used to carry out tasks ranging from code compilation to packaging to project documentation generation.

Maven also makes it easy to create your own plug-ins, thereby enabling you to integrate tasks and workflows that are specific to your organization.

Uniform Build Abstraction

Maven provides a uniform interface for building projects. You can build a Maven project by using just a handful of commands. Once you become familiar with Mavens build process, you can easily figure out how to build other Maven projects. This frees developers from having to learn build idiosyncrasies so they can focus more on development.

Tools Support

Maven provides a powerful command-line interface to carry out different operations. All major IDEs today provide excellent tool support for Maven. Additionally, Maven is fully integrated with todays continuous integration products such as Jenkins, Bamboo, and Hudson.

Archetypes

As we already mentioned, Maven provides a standard directory layout for its projects. When the time comes to create a new Maven project, you need to build each directory manually, and this can easily become tedious. This is where Maven archetypes come to rescue. Maven archetypes are predefined project templates that can be used to generate new projects. Projects created using archetypes will contain all of the folders and files needed to get you going.

Archetypes is also a valuable tool for bundling best practices and common assets that you will need in each of your projects. Consider a team that works heavily on Spring framework-based web applications. All Spring-based web projects share common dependencies and require a set of Spring configuration files. It is also highly possible that all of these web projects have similar Log4j/Logback configuration files, CSS/Images , and Apache Tile layouts or SiteMesh decorators. Maven lets this team bundle these common assets into an archetype. When new projects get created using this archetype, they will automatically have the common assets included. No more copy and pastes or drag and drops required.

Open Source

Maven is open source and costs nothing to download and use. It comes with rich online documentation and the support of an active community. Additionally, companies such as Sonatype offer commercial support for the Maven ecosystem.

CONVENTION OVER CONFIGURATION

Convention overconfiguration (CoC) or coding by convention is one of the key tenants of Maven. Popularized by the Ruby on Rails community, CoC emphasizes sensible defaults, thereby reducing the number of decisions to be made. It saves time and also results in a simpler end product, as the amount of configuration required is drastically reduced.

As part of its CoC adherence, Maven provides several sensible defaults for its projects. It lays out a standard directory structure and provides defaults for the generated artifacts. Imagine looking at a Maven artifact with the name log4j-1.4.3.jar . At a glance, you can easily see that you are looking at a log4j JAR file, version 1.4.3.

One drawback of Mavens CoC is the rigidness that end users experience when using it. To address this, you can customize most of Mavens defaults. For example, it is possible to change the location of the Java source code in your project. As a rule of thumb, however, such changes to defaults should be minimized.

Maven Alternatives

Although the emphasis of this book is on Maven, lets look at a couple of its alternatives: Ant + Ivy and Gradle.

Ant + Ivy

Apache Ant ( http://ant.apache.org ) is a popular open source tool for scripting builds. Ant is Java based, and it uses Extensible Markup Language (XML) for its configuration. The default configuration file for Ant is the build.xml file.

Using Ant typically involves defining tasks and targets. As the name suggests, an Ant task is a unit of work that needs to be completed. Typical tasks involve creating a directory, running a test, compiling source code, building a web application archive (WAR) file, and so forth. A

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Introducing Maven»

Look at similar books to Introducing Maven. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Introducing Maven»

Discussion, reviews of the book Introducing Maven and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.