0

I set my variables in jenkins like this : https://i.stack.imgur.com/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}
Michal K
  • 49
  • 2
  • 9

1 Answers1

1

It is not %{...}

It should be ${testngVersion}

vins
  • 15,030
  • 3
  • 36
  • 47