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

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

自 Wildfly 15 起,Arquillian 托管測試不再有效

自 Wildfly 15 起,Arquillian 托管測試不再有效

慕桂英3389331 2023-12-13 14:58:31
很長一段時間以來,我一直在使用 Wildlfy 進行 Arquillian 測試。目前我從 Wildfly 14 更新到 Wildfly 17。但是現在,所有 Arquillian 測試都失敗了。我將其簡化為單個 POM 和 arquillian.xml,主要取自網絡中的教程和示例,結果發現,所有這些都適用于 Wildfly 14,而不是不適用于 Wildfly 15、16 或 17。pom.xml:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0"    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">    <modelVersion>4.0.0</modelVersion>    <groupId>org.jboss.arquillian</groupId>    <artifactId>wildfly-arquillian-managed-example</artifactId>    <version>1.0-SNAPSHOT</version>    <properties>        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>    </properties>    <dependencyManagement>        <dependencies>            <dependency>                <groupId>org.jboss.arquillian</groupId>                <artifactId>arquillian-bom</artifactId>                <version>1.5.0.Final</version>                <scope>import</scope>                <type>pom</type>            </dependency>        </dependencies>    </dependencyManagement>    <dependencies>        <dependency>            <groupId>junit</groupId>            <artifactId>junit</artifactId>            <version>4.12</version>        </dependency>        <dependency>            <groupId>org.jboss.arquillian.junit</groupId>            <artifactId>arquillian-junit-container</artifactId>        </dependency>        <dependency>            <groupId>org.wildfly</groupId>            <artifactId>wildfly-arquillian-container-managed</artifactId>            <version>8.2.1.Final</version>            <scope>test</scope>        </dependency>    </dependencies>
查看完整描述

1 回答

?
汪汪一只貓

TA貢獻1898條經驗 獲得超8個贊

好的,我找到了答案!問題是 pom.xml 中的錯誤依賴項!


錯誤的是:


<dependency>

    <groupId>org.wildfly</groupId>

    <artifactId>wildfly-arquillian-container-managed</artifactId>

    <version>8.2.1.Final</version>

    <scope>test</scope>

</dependency>

正確的是:


<dependency>

    <groupId>org.wildfly.arquillian</groupId>

    <artifactId>wildfly-arquillian-container-managed</artifactId>

    <version>2.1.1.Final</version>

    <scope>test</scope>

</dependency>

我剛剛在谷歌上搜索了“wildfly-arquillian-container-management”并使用了最高版本號。但這一次,較高的數字是較舊的狀態,可能與 Wildfly 8.2.1 同步,但不再與 Wildfly 15 或更高版本一起使用。


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

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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