Perform Goal (Maven)
퇽회 Definition
In Apache Maven, a goal is a specific task performed by a plugin.
A perform goal refers to executing a particular task/goal as part of the build or release process.
퇽훹 What is a Goal?
A goal is a unit of work such as:
- Compiling code
- Running tests
- Packaging files
- Deploying artifacts
퇽훹 Examples of Maven Goals
compile᭒ Compiles source codetest᭒ Runs testspackage᭒ Creates JAR/WAR fileinstall᭒ Installs into local repositorydeploy᭒ Uploads to remote repository
퇽훹 Perform Goal in Maven Release
In release management, Maven uses goals like:
1. release:prepare
- Prepares the project for release
- Updates version numbers
- Tags the source code
2. release:perform
- Builds the project
- Deploys artifacts to repository
- Executes full release process
퇽훹 Example Command
mvn release:perform
Ⅱ This command performs the actual release deployment.
퇽훹 Lifecycle vs Goal
| Concept | Description |
|---|---|
| Lifecycle | Sequence of phases |
| Phase | Stage in lifecycle |
| Goal | Task executed |
퇽훹 Importance
- Automates build and release tasks
- Ensures consistency
- Reduces manual errors
- Supports CI/CD pipelines
