An open API service indexing awesome lists of open source software.

https://github.com/yupiik/maven-shade-transformers

Extensions to use with Apache Maven Shade.
https://github.com/yupiik/maven-shade-transformers

java maven shade

Last synced: about 1 year ago
JSON representation

Extensions to use with Apache Maven Shade.

Awesome Lists containing this project

README

          

//
// Copyright (c) 2020-2023 - Yupiik SAS - https://www.yupiik.com
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//

= Yupiik Maven Shade Transformers

Extensions to use with Apache Maven Shade.

== Yupiik Fusion

Fusion provides some metadata files which need to be merged when used at runtime.
This is typically the case for configuration metadata, OpenRPC metadata and JSON schema metadata.

For the first one just register the transformer `FusionDocumentationTransformer`, `FusionOpenRPCTransformer` for the second and for last one use `FusionJsonSchemaTransformer`.
Both are in `io.yupiik.maven.shade.transformer` package:

[source,xml]
----



----

== Relocating Wrapper

This transformer aims at wrapping another transformer adding relocation capabilities to it (using relocations of the plugin).
It supports a list of delegate transformers if needed.

=== Usage

This provides two transformer implementations which use slightly different replacement algorithms.
* `io.yupiik.maven.shade.transformer.RelocationTransformer`: relocates class names
* `io.yupiik.maven.shade.transformer.SourceRelocationTransformer`: relocates class names in source-like files
* `io.yupiik.maven.shade.transformer.PathRelocationTransformer`: relocates paths (enabling to use `rawString` relocation configuration and use a plain `replaceAll`)
* `io.yupiik.maven.shade.transformer.ClassRelocationTransformer`: similar to default one but filter replacements to classes only (safer).

[source,xml]
----

...



org.apache.maven.plugins
maven-shade-plugin
${project.version}



shade






configuration/application.properties
ordinal









io.yupiik.maven
maven-shade-transformers
0.0.1





...

----

== Build

To build the project use:

[source,bash]
----
mvn clean verify -Prun-its
----