apache / apache/maven-archetype

OOM with maven-archetype-plugin 3.4.1 + java 25

Open
#988 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
148
Forks
181
Avg merge
1d 20h
Merged PRs (30d)
8

Description

### Affected version

3.4.1

### Bug description

`archetype:create-from-project` may trigger OOM / java heap space error when used with java 25, where the same setup with java 17 is fine. This is not a near-the-max-threshold issue. It may be needed to double Xmx (1500m -> 3000m) to get rid of the OOM.

Memory threshold to trigger the issue may vary between environment (for my use-case, CI triggers with Xmx1500m, and my desktop needed a limit as low as 700m to trigger the same issue).

Error is triggered during `maven-archetype-plugin:jar` goal.

From my investigation, it seems caused by this plexus-archiver issue https://github.com/codehaus-plexus/plexus-archiver/issues/399. Affected versions are plexus-archiver 4.10.1-4.10.3.

It is fixed with https://github.com/codehaus-plexus/plexus-archiver/pull/408 (4.10.4).

Others encounter the same problem : related issue on maven-archiver -> https://github.com/apache/maven-archiver/issues/334

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the archetype:create-from-project flow and the maven-archetype-plugin:jar goal, then inspect how plexus-archiver is resolved. Compare the affected 4.10.1–4.10.3 versions with 4.10.4 and reproduce under Java 25 with a constrained Xmx; done means the goal no longer runs out of heap in the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.