Which Maven lifecycle phase compiles the project’s source code?
A) compile
B) package
C) test
D) install
Answer:
A) compile
Explanation:
The compile
phase in the Maven build lifecycle is responsible for compiling the project’s source code. This phase takes the source code from the src/main/java
directory, compiles it, and places the compiled bytecode in the target/classes
directory.