Hi guys, so I'm building my plugin in Jenkins and with every build my jar file gets a number from jenkins like "plugin-branch#build#149.jar". I wanted to add that number to "Version" when I install the plugin on Jira, in my case the Version says: 1.0.0-SNAPSHOT because my pom.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.jira.plugin</groupId>
<artifactId>service</artifactId>
<version>1.0.0-SNAPSHOT</version>
<organization>
<name>Capgemini</name>
<url>http://www.company.com/</url>
</organization>
<name>security-service</name>
<description>This is the com.company.jira.plugin:security plugin for Atlassian JIRA.</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
How can I include the jenkins Build number into my plugin automatically when I build on Jenkins? I tried this but it's not working.
This worked for me :
<version>${BUILD_NUMBER}-SNAPSHOT</version>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.