Skip to content

Conversation

@okolawole-ebsco
Copy link
Collaborator

Purpose: Maven dependency extraction fails when processing large projects with extensive dependency trees, as the default Node.js buffer size (1MB) is insufficient for capturing verbose Maven output during dependency downloads and analysis. This causes silent failures or truncated output that prevents accurate dependency evaluation.

Approach:

  • Introduced MAX_BUFFER constant set to 50MB for Maven command execution
  • Added isMaxBufferError() detection function to identify buffer overflow errors similar to existing isTimeoutError() pattern
  • Applied maxBuffer parameter to all Maven execAsync calls (license:add-third-party and dependency:list)
  • Implemented specific error handling for buffer overflow scenarios with informative error messages that explain the cause (large dependency tree, verbose output) and suggest manual verification of generated THIRD-PARTY.txt files

- Add MAX_BUFFER constant set to 50MB for verbose Maven output
- Include maxBuffer in both execAsync Maven command calls
- Add isMaxBufferError() helper to detect buffer overflow
- Provide clear error message when buffer limit is exceeded
@okolawole-ebsco okolawole-ebsco merged commit e6d096c into master Oct 24, 2025
3 checks passed
@okolawole-ebsco okolawole-ebsco deleted the maven-outputBuffer branch October 31, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants