Skip to content

Commit

Permalink
allow byte-buddy as a dynamically loaded java-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Nov 22, 2023
1 parent f23f3f4 commit 6b2364d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion jfuse-linux-aarch64/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{surefire.jacoco.args} --enable-preview --enable-native-access=org.cryptomator.jfuse.linux.aarch64</argLine>
<argLine>@{surefire.jacoco.args} -javaagent:${net.bytebuddy:byte-buddy-agent:jar} --enable-preview --enable-native-access=org.cryptomator.jfuse.linux.aarch64</argLine>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion jfuse-linux-amd64/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{surefire.jacoco.args} --enable-preview --enable-native-access=org.cryptomator.jfuse.linux.amd64</argLine>
<argLine>@{surefire.jacoco.args} -javaagent:${net.bytebuddy:byte-buddy-agent:jar} --enable-preview --enable-native-access=org.cryptomator.jfuse.linux.amd64</argLine>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion jfuse-mac/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{surefire.jacoco.args} --enable-preview --enable-native-access=org.cryptomator.jfuse.mac</argLine>
<argLine>@{surefire.jacoco.args} -javaagent:${net.bytebuddy:byte-buddy-agent:jar} --enable-preview --enable-native-access=org.cryptomator.jfuse.mac</argLine>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion jfuse-win/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{surefire.jacoco.args} --enable-preview --enable-native-access=org.cryptomator.jfuse.win</argLine>
<argLine>@{surefire.jacoco.args} -javaagent:${net.bytebuddy:byte-buddy-agent:jar} --enable-preview --enable-native-access=org.cryptomator.jfuse.win</argLine>
</configuration>
</plugin>
</plugins>
Expand Down
20 changes: 19 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down Expand Up @@ -145,6 +150,19 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>jar-paths-to-properties</id>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down Expand Up @@ -195,7 +213,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{surefire.jacoco.args} --enable-preview --enable-native-access=ALL-UNNAMED</argLine>
<argLine>@{surefire.jacoco.args} -javaagent:${net.bytebuddy:byte-buddy-agent:jar} --enable-preview</argLine>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 6b2364d

Please sign in to comment.