Skip to content

java: generated javadoc under target/ is indexed as a JavaScript project, so a Maven repo gets a second language graph #1545

Closed

Description

@swapnilpaliwal-sd

Symptom

A Maven project whose target/ holds generated javadoc (mvn javadoc:javadoc writes target/site/apidocs/script.js) is indexed as a Java + JavaScript repository. The JavaScript files under target/ get their own graph and every query also asks it. The Java walker skips target/. Measured on 0.1.3 at 0df257c; the MCP axiomcode_index tool reports graph up to date (java, javascript).

$ axiomcode index
building java + javascript graphs for . … (java 1 · typescript 0 · python 0 · javascript 1 · csharp 0 files)
$ axiomcode impact createElem
══ javascript graph ══   (.axiomcode/lang/javascript)
    [resolved] loadScripts   target/site/apidocs/script.js:3   -- calls it

Control: the same tree without target/ prints building java graph ... (java 1 · ... javascript 0 ...).

Reproduction

pom.xml (groupId example, no dependencies), src/main/java/app/WidgetValidator.java (any class), and target/site/apidocs/script.js:

var moduleSearchIndex;
function loadScripts(doc, tag) {
    createElem(doc, tag, 'search.js');
}
function createElem(doc, tag, path) {
    var script = doc.createElement(tag);
    script.src = path;
}

Root cause

parser/src/constants/javascript-constants.ts:125-128 (JS_SKIP_DIRECTORIES) has no target, while the Java walk's EXCLUDED_DIRS (parser/src/constants/consts.ts:11-24) does. plugins/axiomcode/skills/axiomcode/scripts/axiomcode-build:55 (count) does not prune target either, so lines 67-70 add javascript to LANGS from one file under it.

Expected

In a Maven project, files under the build output directory target/ do not add a language graph, as the control shows.

Activity

  1. added
    bugSomething isn't working
    parserthe parser (parser/), transferred from AxiomCodeAI/parser
    on Sep 28, 2026
  2. added a commit that references this issue on Sep 28, 2026
  3. swapnilpaliwal-sd commented on Sep 28, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Fixed by #1616.

  4. added a commit that references this issue on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjavaJavaparserthe parser (parser/), transferred from AxiomCodeAI/parser

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions