我有一個帶有測驗的 springboot 專案,我想為 mvn 測驗傳遞幾個引數(例如密碼、引腳等),我知道這可以通過 cli 中的 -D 選項來完成。這些值可以從 pom.xml 傳遞嗎?下面似乎不起作用,我想這是用于執行而不是用于編譯
<properties>
<someproperty> abcd </someproperty>
</properties>
uj5u.com熱心網友回復:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine} -Dsomeproperty=someValue </argLine>
</configuration>
</plugin>
這成功了。回答我的問題,以防其他人需要這個
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/369537.html
上一篇:錯誤集成Allure報告與Jenkins。找不到誘惑命令列<null>
下一篇:無法執行目標org.codehaus.gmavenplus:gmavenplus-plugin:1.6.1:generateStubs(groovy):classpathInvocationTarge
