Defining the Maven options to build your project
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>/maven_settings.xml -Dlicense.path=<PathToDirectory>/license <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=<P2BaseURL> --> -Dtalend.studio.p2.update=<P2UpdateURL> -Pnexus -DaltDeploymentRepository=snapshots::default::http://XXX:8081/repository/snapshots/ -fae -e' goals: 'deploy'
-
Groovy script example:
options: '''-f CICD/poms/pom.xml -s /home/talend/CI_dir/maven_settings.xml -Dlicense.path=/home/talend/talend_studio/license <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base --> -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02 -Pnexus -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ -fae -e''' goals: 'deploy'
Read the Groovy syntax documentation for more information on supported formats for multiline strings.
-
Yaml script example:
options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/maven_settings.xml -Dlicense.path=/home/talend/talend_studio/license <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base --> -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02 -Pnexus -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ -fae -e' goals: 'deploy'
Read the YAML syntax documentation for more information on supported formats for multiline strings.
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):
-
Groovy example:
options: '''-f CICD/poms/pom.xml -s /home/talend/CI_dir/maven_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 <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base --> -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02 -Pnexus -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ -fae -e''' goals: 'deploy'
Read the Groovy syntax documentation for more information on supported formats for multiline strings.
-
YAML example:
options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/maven_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 <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base --> -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02 -Pnexus -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ -fae -e' goals: 'deploy'
Read the YAML syntax documentation for more information on supported formats for multiline strings.
-
Groovy example:
options: '''-f CICD/poms/pom.xml -s /home/talend/CI_dir/maven_settings.xml -pl jobs/process/parent_0.1 -am -Dlicense.path=/home/talend/talend_studio/license <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base --> -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02 -Dtalend.job.context=dev -Dtalend.job.applyContextToChildren=true -fae -e''' goals: 'deploy'
Read the Groovy syntax documentation for more information on supported formats for multiline strings.
-
YAML example:
options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/maven_settings.xml -pl jobs/process/parent_0.1 -am -Dlicense.path=/home/talend/talend_studio/license <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base --> -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02 -Dtalend.job.context=dev -Dtalend.job.applyContextToChildren=true -fae -e' goals: 'deploy'
Read the YAML syntax documentation for more information on supported formats for multiline strings.
Information noteNote: 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>/maven_settings.xml -Dlicense.path=<PathToDirectory>/license <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=<updatesiteURL> --> -Dtalend.studio.p2.update=<updatefolderPathOrURL> -Pdocker -Djkube.docker.push.registry=<DockerRegistryName> -Djkube.docker.username=<Dockerusername> -Djkube.docker.password=<DockerPassword> -Dtalend.docker.name=<DockerImageName> -Xms1024m -Xmx3096m' goals: 'clean deploy'
-
Groovy script example:
options: '''-f CICD/poms/pom.xml -s /home/talend/CI_dir/maven_settings.xml -Dlicense.path=/home/talend/talend_studio/license <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base --> -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/updateXXX.zip -Pdocker -Djkube.docker.push.registry=registry.example.com/group/project -Djkube.docker.username=TalendUser -Djkube.docker.password=V3ryCompl3xPwd -Dtalend.docker.name=cicd4talend -Xms1024m -Xmx3096m''' goals: 'clean deploy'
Read the Groovy syntax documentation for more information on supported formats for multiline strings.
-
YAML script example:
options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/maven_settings.xml -Dlicense.path=/home/talend/talend_studio/license <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base --> -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/updateXXX.zip -Pdocker -Djkube.docker.push.registry=registry.example.com/group/project -Djkube.docker.username=TalendUser -Djkube.docker.password=V3ryCompl3xPwd -Dtalend.docker.name=cicd4talend -Xms1024m -Xmx3096m' goals: 'clean deploy'
Read the YAML syntax documentation for more information on supported formats for multiline strings.
-