我正在尝试使用Maven pom.xml
使用以下代码读取Jenkins编号。问题是,生成失败并显示以下错误。我参考了詹金斯(Jenkins)建立一个软件项目给出的正式文件。如果我尝试使用任何文本代替${BUILD_NUMBER}
它,它将在控制台中打印,而不是变量。
POM配置文件参考:
<profiles>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<build.number>${BUILD_NUMBER}</build.number>
</properties>
</profile>
</profiles>
Run Code Online (Sandbox Code Playgroud)
POM系统属性:
<systemPropertyVariables>
<buildnumber>${build.number}</buildnumber>
</systemPropertyVariables>
Run Code Online (Sandbox Code Playgroud)
如果我做错了事,请告诉我。