Supported Java versions: JDK 8, 11
Open a terminal window in the top level folder of your project and run this command:
npx @appland/appmap install-agent
You will be guided through a series of steps for installing and configuring that agent, that will look like this:
$ npx @appland/appmap install-agent
npx: installed 191 in 5.415s
? Select a target language for agent installation. Java
? Select the type of Java project to install the AppMap agent to. Maven
✔ Installing the AppMap agent...
╭─────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Success! The AppMap agent has been installed. │
│ │
│ The AppMap agent will automatically record your tests when you run ./mvnw test. │
│ By default, AppMap files will be output to target/appmap. │
│ │
│ For more information, visit │
│ https://appland.com/docs/reference/appmap-java │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────╯
After you have installed the agent proceed to Record AppMaps.
For installation without Node.js follow this manual installation procedure.
Supported Java versions: JDK 8, 11
pom.xml
file in the IntelliJ editor<plugins>
tag and add the AppMap plugin as the first plugin entry: <!-- the plugin element goes to build/plugins -->
<plugin>
<groupId>com.appland</groupId>
<artifactId>appmap-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-test-classes</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
Next: create appmap.yml
gradle.build
file in the IntelliJ editor plugins {
//other plugins here
id "com.appland.appmap" version "1.1.0"
}
Next: create appmap.yml
-javaagent
argument to your JVM when running tests or when recording AppMaps remotely. Include the path to the AppMap java agent jar. For example: java -javaagent:<path-to-jar>/appmap-agent-<version>.jar myapp.jar
$ java -javaagent:lib/appmap-agent-1.15.1.jar myapp.jar
Next: create appmap.yml
Add an application name and a list of Java packages you want to record to the appmap.yml
file.
# appmap.yml
name: my_app
packages:
# List the packages you'd like to record here.
- path: org.myorg.myapp
- path: org.myorg.otherPackage