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.
Let's find where the artifacts were created by performing the following steps:
target
subfolder that was created: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:
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
.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.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..jar
file: The generated project artifact is also present in this folder.maven-archiver
and maven-status
—hold information used by Maven during the build.3.12.163.175