In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
What are the common commands of Maven? in view of this question, this article introduces in detail the corresponding analysis and answers, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
Common command
Mvn-version
Mvn-v
Display maven installation version information
Mvn clean
Clean up the project package file, that is, the target directory under the project
Mvn compile
Compile the src/main/Java directory source code under the project
Mvn package
Package the project and generate compiled jar or war files in the project target directory
Mvn install
The project is packaged and published to the local warehouse
Mvn deploy
The project is packaged and published to a remote warehouse
Mvn test
Unit test command to execute the unit test case of junit under src/test/java/
Mvn site
A website that generates information about the project
Mvn eclipse:eclipse
Convert a project to an eclipse project
Mvn dependency:tree
Print out the entire dependency tree of the project
Mvn archetype:generate
Create a maven normal java project
Mvn tomcat:run
To run the web application in the tomcat container, you need to configure the tomcat plug-in in the pom file
Mvn jetty:run
To run the web application in the jetty container, you need to configure the jetty plug-in in the pom file
Command parameter
-D pass in attribute parameters
-P uses the specified profile configuration
-e displays the error message when maven is running
-o execute commands offline locally without going to the remote warehouse to update the package
-X displays the debug information allowed by maven
-U forces remote updates, otherwise it is updated only once a day by default
For example, the use of-D: mvn package-Dmaven.test.skip=true, that is, skip unit tests when packaging, install, deplay commands can be used.
You can type mvn-h for help with more commands.
The answers to the questions about the common commands of Maven are shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.