idea tool maven projects there are nine kinds of life-cycle

idea tool maven projects there are nine kinds of the life cycle, the life cycle is an ordered series of stages in a project to build contains.

First, the two most commonly used packing method:
  1.clean, Package Penalty for (if the error is likely to jar is dependent problem)
  2.clean, install

Second, the nine kinds of life-cycle:
  1.clean, clean up, do some clean-up work before the actual build is performed, removing a build file generated on all. Execute the command will delete the files in the target path of the project, but does not remove local maven repository has been generated jar file.
  2.validate, verify, verify that the project is correct, the required information is complete.
  3.compile, compile the source code, compiled class files, compile command, just compile the selected target, regardless of whether previously compiled, will generate a target directory under your project path contains a classes folder in the directory , which are all generated class files and bytecode file.
  4.test, unit testing, testing.
  5.package, packaging, packaged project file to the specified format, such as JAR, WAR and so on. This command a target directory under your project path, and has the function of compiling compile command, while the project will generate jar / war files in the target directory. If a project depends on the project b, b when packaging items will be packaged into the next target under b project, the error will compile a project, the project can not be found because of b depends, indicating that a project is not found in the local repository b it depends on the project, then you use the install command the
  6.verify, verification, check the package is valid, standards-compliant.
  7.install, attached to the local repository, install the package to a local warehouse to make other items dependent. The command includes the package command function, not only will generate class files and jar package in the project path, and it will generate a jar file in your local maven repository for other projects to use (if not set too maven local repository, usually in the user / under .m2 directory. b if a project depends on the project, when you install b project will generate pom files and jar files at the same time local warehouse, to solve the problem of the above package packing error)
  8.build: function similar to compile, but only for the entire project to compile.
  9.site, site documentation site, build the project's
  10.deploy, copied to the remote repository

Three differences, build and compile the
  1.Compile: compile only a selected target, regardless of whether previously compiled.
  2, Build: a thorough recompilation of the entire project, regardless of whether already compiled. Build processes tend to generate a release package, this depends on the specific configuration of the IDE, Build rarely used in practice, because developers basically do not have time, production time is generally issued by ANT and other tools to publish. Build all because to compile, but also to perform additional work packages, etc., so a long time.
----------------
Disclaimer: This article is the original article CSDN bloggers "dawang325", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. .
Original link: https: //blog.csdn.net/u011213044/article/details/103923231

Released seven original articles · won praise 0 · Views 86

Guess you like

Origin blog.csdn.net/weixin_44361498/article/details/104040505