Skip to content

Commit bb73a46

Browse files
committed
feat(workflow): add ByteBuddy agent download and integration in Maven build
1 parent 4a7a71b commit bb73a46

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/maven-publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
build:
1313

1414
runs-on: ubuntu-latest
15+
env:
16+
BYTEBUDDY_VERSION: 1.17.5
1517
permissions:
1618
contents: read
1719
packages: write
@@ -33,10 +35,13 @@ jobs:
3335
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
3436
settings-path: ${{ github.workspace }} # location for the settings.xml file
3537

38+
- name: Download ByteBuddy agent for tests
39+
run: mvn -B dependency:copy -Dartifact=net.bytebuddy:byte-buddy-agent:${{ env.BYTEBUDDY_VERSION }} -DoutputDirectory=target/test-agent -Dtransitive=false
40+
3641
- name: Build with Maven
37-
run: mvn -B package --file pom.xml
42+
run: mvn -B -DargLine="-javaagent=${{ github.workspace }}/target/test-agent/byte-buddy-agent-${{ env.BYTEBUDDY_VERSION }}.jar" package --file pom.xml
3843

3944
- name: Publish to GitHub Packages Apache Maven
40-
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml -D skipITs
45+
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml -DskipITs -DargLine="-javaagent=${{ github.workspace }}/target/test-agent/byte-buddy-agent-${{ env.BYTEBUDDY_VERSION }}.jar"
4146
env:
4247
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)