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.
- Host: GitHub
- URL: https://github.com/yupiik/maven-shade-transformers
- Owner: yupiik
- License: apache-2.0
- Created: 2020-04-23T15:38:59.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-10T11:41:40.000Z (over 2 years ago)
- Last Synced: 2025-03-27T11:11:59.128Z (over 1 year ago)
- Topics: java, maven, shade
- Language: Java
- Homepage: https://www.yupiik.com
- Size: 46.9 KB
- Stars: 9
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Funding: .github/FUNDING.yml
- License: LICENSE
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
----