DEV Community

Shaik Nasir Ahmad
Shaik Nasir Ahmad

Posted on

Useful Maven commands

Important Maven commands.

mvn clean – This command is used to clean the project’s target directory.

mvn compile – This command is used to compile the source code of the project.

mvn package – This command is used to package the project into a JAR file.

mvn install – This command is used to install the package into the local repository.

mvn deploy – This command is used to deploy the package to a remote repository.

mvn test – This command is used to run the unit tests of the project.

mvn verify – This command is used to run the integration tests of the project.

mvn site – This command is used to generate the project’s site documentation.

mvn help:effective-pom – This command is used to display the effective POM of the project.

mvn help:describe – This command is used to display the details of a mojo.

mvn archetype:generate – This command is used to generate a project from an archetype.

mvn help:active-profiles – This command is used to list the active profiles in the project.

mvn dependency:tree – This command is used to display the project's dependency tree.

mvn help:plugin – This command is used to display information about a specific plugin.

mvn help:system – This command is used to display information about the system.

mvn help:effective-settings – This command is used to display the effective settings of the project.

mvn help:describe – This command is used to display information about a specific mojo.

mvn clean test – This command is used to clean the project and then run the unit tests.

mvn site:run – This command is used to generate the project’s site documentation and launch a web server to view it.

mvn help:all-profiles – This command is used to list all the profiles in the project.

mvn dependency:analyze – This command is used to analyze the project’s dependencies.

mvn help:system-properties – This command is used to display system properties that can be used in the project.

mvn help:evaluate – This command is used to evaluate an expression in the project’s POM.

mvn help:descriptor – This command is used to display the project descriptor.

mvn help:active-profiles – This command is used to list the active profiles in the project.

mvn help:plugin-prefix – This command is used to display the list of available plugin prefixes.

Top comments (0)