apache / apache/maven-jmod-plugin

[MJMOD-27] Implement unpack goal

Open
#64 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
16
Forks
11
Avg merge
7h 10m
Merged PRs (30d)
1

Description

**[Alexander Kriegisch](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kriegaex)** opened **[MJMOD-27](https://issues.apache.org/jira/browse/MJMOD-27?redirect=false)** and commented

There has not been another alpha release for 2.5 years (2017/09 to 2020/05), so I am not sure if this project is dead or alive. But in case development is still active, I would like to have an option to not only to create a JMOD but also to **unpack** one. Maybe this could also be implemented in Maven Assembly. I am not sure where it would fit best, but I think here.

Background:
* Sometimes I want to instrument JRE/JDK classes using ASM, ByteBuddy, Javassist or similar byte code engineering tools during build time in order to then either prepend the resulting JAR file to the boot classpath (Java <= 8) or to use `--patch-module` (Java >= 9).
* In order to do that in Java 9+ environments, I have to use JDK command line tools like _jmod.exe_ (unpack single JMOD from _jmods_ directory) or _jimage.exe_ (unpack _lib/modules_).
* The result is a partly scripted build, using a Beanshell script via Build Helper or something like Antrun.

The benefit of having an unpack feature accessible via a Maven plugin is obvious, I think. Who likes scripted builds?

---

**Affects:** 3.0.0-alpha-1

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by examining the existing Maven JMod Plugin goal that creates JMODs and the JDK jmod/jimage unpack commands described in the issue. Verify the desired unpacked module contents against those tools; no project files or tests are named, so the relevant entry point and test coverage must be located first.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.