Michal K
Michal K

Reputation: 49

Passing parameters from jenkins to maven

I set my variables in jenkins like this : https://i.sstatic.net/mipCP.jpg

testngVersion

I want to use in my pom.xml:

  <dependency>
  <groupId>org.testng</groupId>
  <artifactId>testng</artifactId>
  <version>%{testngVersion}</version>
  <scope>test</scope>
  </dependency>

I tried :

 <version>%{env.testngVersion}</version>

What im doing wrong ? I keep getting:

[ERROR] Failed to execute goal on project Testing: Could not resolve dependencies for project Framework:Testing:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.testng:testng:jar:%{env.testngVersion}: Failed to read artifact descriptor for org.testng:testng:jar:%{env.testngVersion}: Could not transfer artifact org.testng:testng:pom:%{env.testngVersion}

Upvotes: 0

Views: 3409

Answers (1)

vins
vins

Reputation: 15370

It is not %{...}

It should be ${testngVersion}

Upvotes: 1

Related Questions