Maven Tutorial for Beginners 6 - Introduction to the Build Lifecycle

preview_player
Показать описание
In this video I will Give an Introduction to the Build Lifecycle.
Maven is based around the central concept of a build lifecycle. What this means is that the process for building and distributing a particular artifact (project) is clearly defined.

For the person building a project, this means that it is only necessary to learn a small set of commands to build any Maven project, and the POM will ensure they get the results they desired.

A Maven build follow a lifecycle. The Default lifecycle in maven generate-sources/generate-resources, compile, test, package
integration-test (pre and post), Install and deploy. There is also a Clean lifecycle.

★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

You are the best !! Thank you from Argentina.

ThePomelo
Автор

Validate : validate the project is correct and all necessary information is available.
Compile : compile the source code of the project.
Test : run tests 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.
Integration: process and deploy the package if necessary into an environment where integration tests can be run.
Verify: run any checks to verify the package is valid and meets quality criteria.
Install: install the package into the local repository, for use as a dependency in other projects locally.
Deploy : done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.

gurekodok
Автор

Question for you: I am currently working on updating the build process for a work project. However I need to have some files deleted before an overlay replaces them. I am using antrun to delete this files however they need to be deleted between the prepare package phase and the package phase as the target folder containing the files I need to delete are not there. Can you help me out with this? I guess I am looking for a goal that can execute right after the assembling of my webapp into the target folder but before the packaging of the war. -thanks

Chrisgu
Автор

Instead of: "Clean takes care of cleaning the project."
Do this: "Clean deletes the target folder and removes artifacts from previous builds."

Your tutorials are generally okay, but you have to work on elaborating concepts rather than repeating the term in a circular definition. Explanations are "how" and "why", not "what".

KatRollo