0

What is the target folder, what is mvnw and mvnw.cmd file and what is src folder?

Refrence Image

enthusiastdev
  • 880
  • 8
  • 9

2 Answers2

2
  1. target: the tools will build and create intermediate and output files, say java .class files. That will be put there. more info
  2. mvnw and mvnw.cmd are wrappers of maven. see this link.
ch271828n
  • 15,854
  • 5
  • 53
  • 88
2

That is the default structure for a Maven project and this structure is also used as a defacto standard (Gradle uses it as well for instance).

The target directory is used to house all output of the build.

The src directory contains all of the source material for building the project, its site and so on. It contains a subdirectory for each type: main for the main build artefact, test for the unit test code and resources, site and so on.

Source: The Maven guide (see link above).

The mvnw script and .mvnw directory (currently hidden) is for the Maven Wrapper, which makes it easier to use Maven. It will automatically download the correct version of Maven before building the application.

Related questions:

M. Deinum
  • 115,695
  • 22
  • 220
  • 224