Я обновил одну из зависимостей gatling-config-library-ext до 3.10.2, которая является последней версией в артефактах нашей компании, обновил SDK проекта до JDK 17 в IntelliJ и использую Scala sdk 2.13.8.
При компиляции maven я получаю исключение ниже.
***** 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.xml
<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-config-library-ext pom.xml
<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>
@SethTisue, та же ошибка в 2.13.13
Pom вашей библиотеки gatling-config-library-ext явно исключает зависимость pebble из ветки зависимостей Gatling. Ваш основной проект транзитивно протягивает Гатлинга через эту библиотеку, поэтому в пути к классам отсутствует галька. Поскольку pebble — обязательная, а не необязательная зависимость, один из наших классов не загружается.
Вы должны прекратить принудительно удалять камешек из пути к классам. То, что вы его не используете, не означает, что Гатлинг может работать без него.
Сборка maven заработала после добавления зависимости от гальки в мой pom. Спасибо, Стефан.
2.13.8 довольно старая. Воспроизводится ли проблема на Scala 2.13.13?