Maven project configuration
As we have already mentioned, Maven helps to compose the javac and java commands when you compile and run your application. It sets the value of the -classpath option. To accomplish it, Maven reads the list of libraries your project needs from pom.xml. It is your responsibility to correctly specify these libraries. Otherwise, Maven will not be able to find them.
By default, the pom.xml file is located in the project root directory. That is also the directory where IDE runs the javac command and sets the src/main/java directory on the classpath so that javac can find the source files of your project. It puts the compiled .class files in the target/classes directory into the root directory too, and sets this directory ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access