我在jenkins中设置我的变量,如下所示: http://i.stack.imgur.com/mipCP.jpg
testngVersion
我想在我的pom.xml中使用:
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>%{testngVersion}</version>
<scope>test</scope>
</dependency>
我试过了:
<version>%{env.testngVersion}</version>
我做错了什么? 我一直在说:
[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}
答案 0 :(得分:1)
不是%{...}
应为${testngVersion}