getappmap / getappmap/appmap-js

Installer: Java installer does not recognize packages in multi-module projects

Open
#460 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
53
Forks
18
Avg merge
3d 18h
Merged PRs (30d)
8

Description

WebGoat is a good example of this problem. The installer updates pom.xml correctly and generates appmap.yml that has no packages without giving the user any warning that no packages were found and added to the configuration.

# This is the AppMap configuration file.
# For full documentation of this file for Java programs, see:
# https://appland.com/docs/reference/appmap-java.html#configuration
name: WebGoat
packages: []
# appmap-java init looks for source packages in src/main/java.
# This folder was not found in your project, so no packages were auto-detected.
# You can add your source packages by replacing the line above with lines like this:
# packages:
# - path: com.mycorp.pkg
# - path: org.otherstuff.pkg

The installer should at least notify the user that the appmap.yml configuration is incomplete; and preferably the logic for discovering Java packages is updated to search for sources in the projects' submodules' folders.

~/work/github/java/WebGoat • develop*
‣ npx appmap install
? This directory contains sub-projects. Would you like to choose sub-projects for installation? No
Installing AppMap agent for ....
? AppMap is about to be installed. Confirm the details below.
  Project type: Maven
  Project directory: /Users/ptrdvrk/work/github/java/WebGoat
  Git remote: origin	https://github.com/WebGoat/WebGoat.git (fetch)
  JAVA_HOME: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
  JDK Version: 11.0.10

  Is this correct? Yes
? An appmap.yml configuration file already exists. How should the conflict be resolved? Overwrite
✔ Installing the AppMap agent...
✔ Validating 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                   │
   │                                                                                    │
   ╰────────────────────────────────────────────────────────────────────────────────────╯

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the npx appmap install flow and the generated appmap.yml and pom.xml behavior described for WebGoat. Check how Java packages are discovered when a project has submodules. Done means the installer warns when no packages are found and, if supported, discovers packages from submodule source folders.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.