Choosing the Maven build phase - Cloud - 7.3

Talend Software Development Life Cycle Best Practices Guide

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
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend JobServer
Talend Management Console
Talend Remote Engine
Talend Studio
Administration and Monitoring
Design and Development
Last publication date

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.