Skip to content

Commit 873d58a

Browse files
authored
Merge branch 'main' into fix/3649-broken-anchors-server-prefix
2 parents 84c4eb3 + 5c88544 commit 873d58a

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

versioned_docs/version-4.0.0/keploy-cloud/deduplication.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,35 @@ keploy dedup --rm
123123

124124
Java dynamic deduplication uses JaCoCo runtime coverage. Attach the Keploy Java agent to emit per-test coverage signals, and attach the JaCoCo runtime agent so the SDK can read the coverage data. The Java agent is framework-agnostic across Spring Boot, Dropwizard/Jersey, plain executable jars, classpath-based apps, servlet/WAR archives, etc.
125125

126-
Copy both jars into `target/` during your Maven build (do not add the Keploy SDK as an application dependency, and do not import Keploy classes from your code).
126+
Both agents attach at JVM startup via `-javaagent:`. They do not modify your application bytecode either at compile time or while classes load, so no source code or `pom.xml` changes are required to enable dedup.
127+
128+
You only need `keploy-sdk.jar` and `jacocoagent.jar` available on disk wherever you reference them with `-javaagent:` at runtime. Fetch them in whichever way fits your workflow:
129+
130+
**Option A**, one-off fetch with the Maven CLI:
131+
132+
```bash
133+
mvn dependency:copy \
134+
-Dartifact=io.keploy:keploy-sdk:2.0.6 \
135+
-DoutputDirectory=target -Dmdep.stripVersion=true
136+
137+
mvn dependency:copy \
138+
-Dartifact=org.jacoco:org.jacoco.agent:0.8.12:jar:runtime \
139+
-DoutputDirectory=target -Dmdep.stripVersion=true
140+
```
141+
142+
**Option B**, direct download from Maven Central (no Maven required):
143+
144+
```bash
145+
mkdir -p target
146+
147+
curl -L -o target/keploy-sdk.jar \
148+
https://repo.maven.apache.org/maven2/io/keploy/keploy-sdk/2.0.6/keploy-sdk-2.0.6.jar
149+
150+
curl -L -o target/jacocoagent.jar \
151+
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar
152+
```
153+
154+
**Option C**, let your Maven build copy them automatically. If you'd rather Maven fetch the agents during your normal build, add the following plugin block to your `pom.xml`. It runs at the `package` phase and only copies the two JARs alongside your app jar; it does not alter the compile classpath, your application bytecode, or any source file:
127155

128156
```xml
129157
<plugin>

0 commit comments

Comments
 (0)