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 to do it...

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 ...

Get Apache Maven Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.