Maven shade plugin relocate file to main folder

Maven shade plugin relocate file to main folder

I am using maven-shade-plugin version 3.2.1 to include/exclude some classes. I am trying to relocate files inside a folder to main folder in a jar.

I am using maven-shade-plugin version 3.2.1 to include/exclude some classes. I am trying to relocate files inside a folder to main folder in a jar.

<configuration>
        <filters>
                ...
        </filters>
        <relocations>
                <relocation>
                        <pattern>org/example</pattern>
                        <shadedPattern>org/example/example2</shadedPattern>
                </relocation>
        </relocations>
</configuration>

If I use it as above, it moves files under org.example to org.example.example2 (just to make sure it is working). If I use just "/", then it creates folder and subfolder with empty names and places files under them. And nothing happens if i keep </shadedPattern> empty.

I want to place files in the main directory but i am not able to do it so far.

Is there any way to achieve this through shade plugin or with something else?

Thanks

java maven intellij-idea

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

IntelliJ IDEA for Beginners - Learn IntelliJ IDEA from Scratch

IntelliJ IDEA for Beginners - Learn IntelliJ IDEA from Scratch. How to become an expert IntelliJ IDEA developer. Learn how to use all the features of Intellij IDEA 2020. Complete IntelliJ IDEA 2020 course for Beginners.

Using Java 14 with IntelliJ IDEA

Using Java 14 with IntelliJ IDEA. What's New in IntelliJ IDEA 2020? What's New in Java 14? Java 14 has a lot of exciting language features for us developers: Records, Pattern Matching for instanceof, Text Blocks, Switch Expressions

How to import an existing Maven project into IntelliJ IDEA?

This tutorial explains how to import an existing Maven project into IntelliJ IDEA and how to create a running configuration for a Maven goal. This is useful, for example, when using the Jetty Maven plugin that allows you to quickly deploy and run a Java web application using this popular server.

Java 12 and IntelliJ IDEA

Java 12 and IntelliJ IDEA. In this article, we’ll cover the pain points of using existing switch statements, define switch expressions, and explain why they are good for you.

Creating your first Java Application with IntelliJ IDEA

In this Java tutorial, you will learn how to create, run, and package a simple Java application that prints Hello, World! to the system output. Along the way, you will get familiar with IntelliJ IDEA features for boosting your productivity as a developer: coding assistance and supplementary tools.