Maven Build Life cycle :
Once java code is developed > Maven perform below activities
maven > takes all java src code > compile all java files > .class > run all classes > test > build .jar file > install .jar in local Repo --> deploy created .jar file into remote repo.
----------------------------------------------------------
A Build Lifecycle is Made Up of Phases
Each of these build lifecycles is defined by a different list of build phases, wherein a build phase represents a stage in the lifecycle.
For example, the default lifecycle comprises of the following phases (for a complete list of the lifecycle phases, refer to the Lifecycle Reference):
------------
Validate
Compile
test
Package
verify
install
deploy
------------
validate - validate the project is correct and all necessary information is available
validate pom.xml is correct
compile - compile the source code of the project
target folder
test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
package - take the compiled code and package it in its distributable format, such as a JAR.
verify - run any checks on results of integration tests to ensure quality criteria are met
install - install the package (.jar) into the local repository, for use as a dependency in other projects locally
deploy - done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.
******************************************
FAQ what is Maven Build life cycle ?
Refer : https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Revise:
-------
validate -- > check pom.xml is correct or not or project info is correct
compile --> src/test/java -- compile --> .class
test --> run all .class file -- >
package --> take compiled class file > combine/build /package -- into single .jar file
verify -> verifies integrating classes are working fine or not
install --> install created .jar file into Local repo
deploy --> it installs created .jar file into Remote repository (Server)
100 classes -- Dev -developed - copy all 100 classes in server ...
deployment --> Developer copy ".jar" in server machine (or) remote machine but not 100 java class files
No comments:
Post a Comment