Skip to content

Commit

Permalink
Fixes ByteBuddy AbstractMethodError which could occur when running te…
Browse files Browse the repository at this point in the history
…sts from IDE (#3327)
  • Loading branch information
JonasKunz authored Sep 21, 2023
1 parent a40988e commit e28ad36
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 1 deletion.
7 changes: 7 additions & 0 deletions apm-agent-attach-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@
<version>${version.bouncy-castle.bc-fips}</version>
<scope>provided</scope>
</dependency>
<dependency>
<!-- required for the inherited assertJ and Mockito dependencies-->
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-dep</artifactId>
<version>${version.byte-buddy}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
<artifactId>hibernate-search-orm</artifactId>
<version>5.11.1.Final</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId> <!-- conflicts with byte-buddy-dep -->
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<artifactId>hibernate-search-mapper-orm</artifactId>
<version>${version.hibernate.search}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId> <!-- conflicts with byte-buddy-dep -->
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
7 changes: 7 additions & 0 deletions apm-agent-tracer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
<artifactId>apm-agent-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<!-- required for the inherited assertJ and Mockito dependencies-->
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-dep</artifactId>
<version>${version.byte-buddy}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
7 changes: 7 additions & 0 deletions elastic-apm-agent-premain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
<artifactId>apm-agent-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<!-- required for the inherited assertJ and Mockito dependencies-->
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-dep</artifactId>
<version>${version.byte-buddy}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
14 changes: 13 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -721,12 +721,24 @@
<artifactId>assertj-core</artifactId>
<version>3.24.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId> <!-- conflicts with byte-buddy-dep -->
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${version.mockito}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId> <!-- conflicts with byte-buddy-dep -->
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- adding this to classpath allows to keep default behavior of mockito 4.x where mock subclassing is used. -->
Expand Down Expand Up @@ -756,7 +768,7 @@
<dependency>
<groupId>net.javacrumbs.json-unit</groupId>
<artifactId>json-unit-assertj</artifactId>
<version>2.37.0</version>
<version>3.2.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit e28ad36

Please sign in to comment.