Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apache Maven Cookbook

You're reading from  Apache Maven Cookbook

Product type Book
Published in Apr 2015
Publisher Packt
ISBN-13 9781785286124
Pages 272 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Apache Maven Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started 2. IDE Integration with Maven 3. Maven Lifecycle 4. Essential Maven Plugins 5. Dependency Management 6. Code Quality Plugins 7. Reporting and Documentation 8. Handling Typical Build Requirements 9. Multi-module Projects 10. Java Development with Maven 11. Advanced Maven Usage Index

Understanding the standard directory layout


When we built our sample Java project earlier, we saw files being compiled, tests being run, and a JAR being generated. We do not know where these artifacts were created.

How to do it...

Let's find where the artifacts were created by performing the following steps:

  1. Go to the folder that has the sample Maven project.

  2. Open the target subfolder that was created:

How it works...

When Maven runs, it puts all the contents that it generates into a separate folder. This is to distinguish it from any user-generated content. Let us examine the contents of this folder:

  • The classes folder: Compiled source files are placed in this folder. This folder will also contain resources, such as XML and property files that are part of the source, placed in src/main/resources.

  • The test-classes folder: Compiled test source files are available in this folder. In addition, it also contains test resources, which are files required for the purpose of testing, but not for running the project.

  • The surefire-reports folder: Test reports are separately placed in this folder. Typically, both XML and HTML report formats are available. The latter can be opened in the browser, while the former can be integrated with a code coverage tool.

  • The output .jar file: The generated project artifact is also present in this folder.

  • Two other folders—maven-archiver and maven-status—hold information used by Maven during the build.

You have been reading a chapter from
Apache Maven Cookbook
Published in: Apr 2015 Publisher: Packt ISBN-13: 9781785286124
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}