我将其中一个依赖项gatling-config-library-ext更新为3.10.2,这是我们公司artifactory的最新版本,将项目sdk更新为TLR中的JK 17,并且我正在使用Scala sdk 2.13.8

在进行专家编译时,我得到了以下异常.

***** missing reference, looking for Extension/T in package io.pebbletemplates.pebble.extension
decls = Scope{}
[ERROR] [Error] : Bad symbolic reference. A signature in /Users/manr4/.m2/repository/io/gatling/gatling-core/3.10.5/gatling-core-3.10.5.jar(io/gatling/core/body/BodySupport.class)
refers to Extension/T in package io.pebbletemplates.pebble.extension which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling /Users/manr4/.m2/repository/io/gatling/gatling-core/3.10.5/gatling-core-3.10.5.jar(io/gatling/core/body/BodySupport.class).

我在代码中的任何地方都没有使用io.pebbletemplates.pebble.extension

我的pom.html

    <properties>
        <gcle.version>3.10.2</gcle.version>
        <commons-io.version>2.14.0</commons-io.version>
        <json4s-jackson.version>4.1.0-M2</json4s-jackson.version>
        <scalaj-http.version>2.4.2</scalaj-http.version>
        <aws-java-sdk-s3.version>1.12.693</aws-java-sdk-s3.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>com.company.app</groupId>
            <artifactId>gatling-config-library-ext</artifactId>
            <version>${gcle.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
        </dependency>
        <dependency>
            <groupId>org.json4s</groupId>
            <artifactId>json4s-jackson_3</artifactId>
            <version>${json4s-jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scalaj</groupId>
            <artifactId>scalaj-http_2.13</artifactId>
            <version>${scalaj-http.version}</version>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-s3</artifactId>
            <version>${aws-java-sdk-s3.version}</version>
        </dependency>
    </dependencies>

gatling-connect-library-ext pom.html

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>

        <gcl.version>2.0.0</gcl.version>
        <gatling.version>3.10.5</gatling.version>
        <spock.version>2.3-groovy-4.0</spock.version>
        <typesafe.version>1.4.3</typesafe.version>
        <scalatest.version>3.2.18</scalatest.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>${spock.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-junit4</artifactId>
            <version>${spock.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
            <version>${typesafe.version}</version>
        </dependency>

        <dependency>
            <groupId>io.gatling.highcharts</groupId>
            <artifactId>gatling-charts-highcharts</artifactId>
            <version>${gatling.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>io.pebbletemplates</groupId>
                    <artifactId>pebble</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.pebbletemplates</groupId>
            <artifactId>pebble</artifactId>
            <version>3.2.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.company.app</groupId>
            <artifactId>gatling-config-library</artifactId>
            <version>${gcl.version}</version>
        </dependency>

        <dependency>
            <groupId>org.scalactic</groupId>
            <artifactId>scalactic_2.13</artifactId>
            <version>${scalatest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.13</artifactId>
            <version>${scalatest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scalamock</groupId>
            <artifactId>scalamock_2.13</artifactId>
            <version>5.2.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

推荐答案

您的gatling-connect-library-ext库的pom正在从Gatling依赖项分支中明确排除卵石依赖项. 您的主要项目是将Gatling过渡地拉过该库,因此类路径中缺少pebble. 由于卵石是必需的依赖项而不是可选的依赖项,因此我们的一个类无法加载.

您必须停止从类路径中强行移除卵石.您不使用它并不意味着加特林可以在没有它的情况下工作.

Java相关问答推荐

我们如何直接使用kerminldap服务票证来通过ldap进行身份验证并形成LDAP上下文

try Dockerize Maven应用程序,但发布版本21不支持"

BiPredicate和如何使用它

当一个链表中间有一个循环时,它的松散部分会发生什么?

如何使用Java API在Oracle ODI中运行模拟?

如何在返回bigint []值的子查询中使用any?

如果一个子类没有构造函数,超类也没有构造函数,那么为什么我可以构造子类的实例呢?

Junit with Mockito for java

Java inline Double条件和值解装箱崩溃

错误:在Liferay7.4中找不到符号导入com.liferay.portal.kernel.uuid.PortalUUID;";

Java中如何根据Font.canDisplay方法对字符串进行分段

对某一Hyroby控制器禁用@cacheable

Java:使用Class.cast()将对象转换为原始数组

MimeMessage emlMessage=new MimeMessage(Session,emlInputStream);抛出InvocationTargetException

如何从日志(log)行中删除包名称?

将PNG转换为位图自定义十六进制字符串

舰队运行配置Maven版本

一对多关系和ID生成

为什么相同的数据条码在视觉上看起来不同?

如何显示新布局