Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi....I was wondering if it 's possible to configure the pom file for ci-builder in a way that it determine the version of the job from the studio and append "-SNAPSHOT" to it. I attached the pom file I used and I would like to configure the tag <deploy.version>.
If I remove the tag completely, the generated pom file for a job contains the job version from the studio without -SNAPSHOT. But I would like to generate the job version from the studio including -SNAPSHOT.
e.g. If a job has the version 1.5, I would like to generate the version 1.5.0-SNAPSHOT without apapting the attached pom file.
Is this possible?
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend</groupId>
<artifactId>buildsources</artifactId>
<version>A.B.C</version>
<properties>
<!-- Required. Commandline application workspace and Studio path, only for local(script) mode -->
<commandline.workspace>/opt/talend_ci/workspce_ci</commandline.workspace>
<product.path>/opt/cmdLine651/</product.path>
<!-- Optional. Specify target directory where generated sources will be stored -->
<projectsTargetDirectory>/opt/talend_ci/project_sources</projectsTargetDirectory>
<!-- Optional. Specify version for the artifact to be built. Can be set for each Job independently -->
<deploy.version> <someConfigNeeded?>-SNAPSHOT </deploy.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.talend</groupId>
<artifactId>ci.builder</artifactId>
<version>A.B.C</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<!-- local(script) mode -->
<goal>local-generate</goal>
</goals>
<configuration>
<!-- Optional. Specify CommandLine user -->
<!--<commandlineUser>jobbuilder@talend.com</commandlineUser>-->
<!-- Optional. Jvm Parameters for local(script) mode -->
<!-- <jvmArguments>-ea -Xms512m -Xmx1300m -XX:+CMSClassUnloadingEnabled -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:+HeapDumpOnOutOfMemoryError</jvmArguments> -->
<!-- Optional. Parameter used to filter on specific Job status (TEST, DEV, PROD, etc) -->
<!-- <itemFilter>(status=TEST)or(status=PROD)or(status="")</itemFilter> -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<pluginRepositories>
<!-- everything through Maven Central Proxy -->
<pluginRepository>
<id>Central</id>
<name>Central</name>
<url>http://localhost:8083/nexus/content/repositories/central</url>
</pluginRepository>
<pluginRepository>
<id>thirdparty</id>
<name>thirdparty</name>
<url>http://localhost:8083/nexus/content/repositories/thirdparty/</url>
</pluginRepository>
</pluginRepositories>
I already read the tutorials but unfortunately i didn't found anything regarding this.
https://help.talend.com/reader/kDsKHeR~mqi~2bkCPVA9Lw/1wiLJ68Pr_RasKg79B8Gjw
hi Robert,
You could parameterize the version (snapshot or release) and send it to the pom file at the time of build.
The screen shot below shows an example:
In Jenkins:
In POM :
At Runtime:
Thank,
Rekha