In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "Maven common command summary", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's train of thought slowly in depth, together to study and learn "Maven common command summary" bar!
Maven commands in addition to a few commonly used, most often can not remember, sort it out, easy to query.
The format of the maven command is mvn [plugin-name]: [goal-name], and the acceptable parameters are as follows.
-D specify parameters, such as-Dmaven.test.skip=true skipping unit tests
-P specifies the Profile configuration, which can be used to distinguish between environments
-e displays the message of maven running error
-o execute the command offline, that is, do not go to the remote warehouse to update the package
-X displays the debug information allowed by maven
-U forces snapshot plug-ins or dependencies to be updated remotely, only once a day by default.
Common maven commands
Create a maven project: mvn archetype:create
Specify group:-DgroupId=packageName
Specify artifact:-DartifactId=projectName
Create a web project:-DarchetypeArtifactId=maven-archetype-webapp
Create a maven project: mvn archetype:generate
Verify that the project is correct: mvn validate
Maven Packaging: mvn package
Only pack jar package: mvn jar:jar
Generate source code jar package: mvn source:jar
Generate any additional source code required for the application: mvn generate-sources
Compile source code: mvn compile
Compile test code: mvn test-compile
Run the test: mvn test
Run check: mvn verify
Clean up the maven project: mvn clean
Generate the eclipse project: mvn eclipse:eclipse
Clean up eclipse configuration: mvn eclipse:clean
Generate the idea project: mvn idea:idea
Install the project to the local warehouse: mvn install
Publish the project to a remote warehouse: mvn:deploy
Processing and publishing packages in an environment where integration tests can be run: mvn integration-test
Show maven dependency tree: mvn dependency:tree
Show maven dependency list: mvn dependency:list
Download the source code of the dependent package: mvn dependency:sources
Install local jar to local warehouse: mvn install:install-file-DgroupId=packageName-DartifactId=projectName-Dversion=version-Dpackaging=jar-Dfile=path
Web project related commands
Start tomcat:mvn tomcat:run
Start jetty:mvn jetty:run
Run the packaged deployment: mvn tomcat:deploy
Undo deployment: mvn tomcat:undeploy
Start the web application: mvn tomcat:start
Stop the web application: mvn tomcat:stop
Redeploy: mvn tomcat:redeploy
Deploy the deployed war file: mvn war:exploded tomcat:exploded
Thank you for your reading, the above is the content of "Maven common command summary", after the study of this article, I believe you have a deeper understanding of the problem of Maven common command summary, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.