亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Java 12 中缺少集成測試階段

Java 12 中缺少集成測試階段

慕工程0101907 2022-10-12 09:39:12
我的任務是使用 Maven 3.0 / Java 8 將項目更新到 Maven 3.6 / Java 12。據我所知,我就是這樣做的,更改了各種依賴項?,F在,在運行構建時,integration-test似乎缺少該階段。例如,在 期間不再調用以下插件clean verify:<plugin>    <groupId>com.google.code.maven-replacer-plugin</groupId>    <artifactId>maven-replacer-plugin</artifactId>    <version>1.4.1</version>    <executions>        <execution>            <id>do-magic</id>            <phase>pre-integration-test</phase>            <goals>                <goal>replace</goal>            </goals>        </execution>    </executions>    <configuration>            <!-- ... -->    </configuration></plugin>我可以輕松地搜索構建日志do-magic,因此我可以確認它是在 Java 8 中調用的,但不是在 Java 12 中調用的(即使可能還有一些我現在不知道的其他更改)。調試輸出為:[DEBUG] Goal:          com.google.code.maven-replacer-plugin:maven-replacer-plugin:1.4.1:replace (do-magic)[DEBUG] Style:         Regular[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?><configuration>    <!-- same as above--></configuration>所以沒有關于它為什么不執行的信息。我嘗試integration-test手動調用目標,仍然沒有調用插件。也沒有額外的信息。我不知道在哪里尋找問題的根源。我什至不知道在哪里禁用這樣的集成測試(除了可能maven.test.skip,它完全從反應器中刪除了測試模塊,所以不是這樣)。任何人都可以對這個問題有所了解嗎?
查看完整描述

1 回答

?
慕慕森

TA貢獻1856條經驗 獲得超17個贊

問題不在于該integration-test階段被跳過,而是突然maven-surefire-plugin決定它也想執行測試。那失敗了,因為 pre-integration-test測試需要該階段。


我不知道為什么會突然發生這種情況,所以這里有一個偽修復,它再次禁用了 Surefire:


<plugin>

    <artifactId>maven-surefire-plugin</artifactId>

    <configuration>

            <!-- We run integration tests with failsafe! -->

            <skip>true</skip>

    </configuration>

</plugin>


查看完整回答
反對 回復 2022-10-12
  • 1 回答
  • 0 關注
  • 123 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號