Choosing the Maven build phase - Cloud - 8.0

Talend Software Development Life Cycle Best Practices Guide

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Administration Center
Talend Artifact Repository
Talend Cloud Management Console
Talend CommandLine
Talend JobServer
Talend Remote Engine
Talend Studio
Content
Administration and Monitoring
Deployment
Design and Development
Last publication date
2023-09-14

You only need to learn a small set of commands to build any Maven project, and the pom.xml file will ensure you get the expected results. Each build phase represents a stage in the lifecycle, here are the ones that you may need:

  • test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed.

    When building and deploying your project, Test Cases will be generated as JUnit files and thus will be built before the packaging Maven phase.

  • package - takes the compiled code and package it in its distributable format, such as a JAR.

    If you want to exclude Java code from the generated zip file when using the package maven goal, add the !include-java-sources parameter as follows:

    mvn clean package -P !include-java-sources
  • install - installs the package 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.

For more information on the Maven phases, see the Maven documentation.