Defining the Maven options to build your project - 7.3

Talend Software Development Life Cycle Best Practices Guide

EnrichVersion
7.3
EnrichProdName
Talend Big Data
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
EnrichPlatform
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend JobServer
Talend Studio
task
Administration and Monitoring
Deployment
Design and Development

You have the possibility to adapt the Maven build command to fit your deployment needs. Here are some examples of commands:

  • To build, test, package artifacts of the CICD project as .jar or .zip files and deploy them to the Nexus snapshots repository :
    options: '-f <ProjectName>/poms/pom.xml -s <PathToDirectory>/settings.xml -Dlicense.path=<PathToDirectory>/license -Dupdatesite.path=<updatesiteURL> -DaltDeploymentRepository=snapshots::default::http://XXX:8081/repository/snapshots/ -fn -e'
    goals: 'deploy'

    Example:

    options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/settings.xml -Dlicense.path=/home/talend/talend_studio/license -Dupdatesite.path=http://company/updatesite -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ -fn -e'
    goals: 'deploy'

    Example with a Job that uses custom components (additional parameters are required to point to the artifact repository in which the custom components are stored):

    options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/settings.xml -pl jobs/process/sample_0.1 -am  
    -Dcomponents.nexus.user=username 
    -Dcomponents.nexus.password=password 
    -Dcomponents.nexus.url=http://localhost:8081/ 
    -Dcomponents.nexus.repository=talend-custom-libs-release 
    -Dcomponents.nexus.repository.snapshot=talend-custom-libs-snapshot
    -Dlicense.path=/home/talend/talend_studio/license 
    -Dupdatesite.path=http://company/updatesite 
    -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ 
    -fn -e'
    goals: 'deploy'

    Example with a Job that uses context groups:

    options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/settings.xml -pl jobs/process/parent_0.1 -am  
    -Dlicense.path=/home/talend/talend_studio/license
    -Dupdatesite.path=http://company/updatesite 
    -Dtalend.job.context=dev 
    -Dtalend.job.applyContextToChildren=true 
    -fn -e'
    goals: 'deploy'
    Note: If the context group you specify does not exist on the Job, the default context group will be applied.
  • To build, clean, test, package artifacts of the CICD project as .jar or .zip files and deploy them to a Docker registry :
    options: '-f <ProjectName>/poms/pom.xml -s <PathToDirectory>/settings.xml -Dlicense.path=<PathToDirectory>/license -Dupdatesite.path=<updatesiteURL> -Ddocker.push.registry=<DockerRegistryName> -Ddocker.push.username=<Dockerusername> -Ddocker.push.password=<DockerPassword> -Dtalend.docker.name=<DockerImageName> -Xms1024m -Xmx3096m'
    goals: 'clean deploy'

    Example:

    options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/settings.xml -Dlicense.path=/home/talend/talend_studio/license -Dupdatesite.path=http://company/updatesite -Ddocker.push.registry=registry.example.com/group/project -Ddocker.push.username=TalendUser -Ddocker.push.password=V3ryCompl3xPwd -Dtalend.docker.name=cicd4talend -Xms1024m -Xmx3096m'
    goals: 'clean deploy'