apache / apache/maven-shade-plugin

[MSHADE-266] Make more clear that ManifestResourceTransformer can add *any* entry

Open
#630 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority:minor
Dominant language
Java
Stars
188
Forks
103
Avg merge
16h 39m
Merged PRs (30d)
4

Description

**[Bradley Turek](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=turekbot)** opened **[MSHADE-266](https://issues.apache.org/jira/browse/MSHADE-266?redirect=false)** and commented

I suggest that it be made blatantly clear that the ManifestResourceTransformer can add any name-value pair.

Maybe by example. What if we add the following?

> ## Setting Manifest Entries with the ManifestResourceTransformer
>
> The ManifestResourceTransformer allows existing entries in the MANIFEST to be replaced and new entries added.
>
> Manifest entries are added using the following format:
> `Value`
>
> For example, having a configuration of
>
> ```xml
> "org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>
> com.foo.Main
> 1.5.0
> arbitrary value
>
>
> ```
>
> will result in a `MANIFEST.MF` of
>
> ```
> ...
> Main-Class: com.foo.Main
> Implementation-Version: 1.5.0
> Arbitrary-Entry: arbitrary value
> ...
> ```
>
>
> Here's a full example configuration with, the following sample entries and values
>
> the Main-Class entry to the value of the app.main.class property,
> the X-Compile-Source-JDK entry to the value of the maven.compile.source property and
> the X-Compile-Target-JDK entry to the value of the maven.compile.target property.
> ...

---

**Affects:** 3.1.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the documentation for ManifestResourceTransformer and its manifestEntries configuration. Update the explanation with an example showing that arbitrary name-value entries can be added, then verify that the rendered documentation clearly reflects the requested MANIFEST.MF output.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.