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

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

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.

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.