apache / apache/maven-shade-plugin

[MSHADE-354] Swap original jar and shaded one when specify outputDirectory and use finalname identical to original one

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

Description

**[Arnault Le Prévost-Corvellec](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=alpcom)** opened **[MSHADE-354](https://issues.apache.org/jira/browse/MSHADE-354?redirect=false)** and commented

Here is my use case i would like to have my shaded jar in target/bundle and i would like to keep the name of the original one. So i did this :
\
      \org.apache.maven.plugins\
      \maven-shade-plugin\
      \3.2.2\
      \
            \
                \create-bundle\
                \package\
                \
                    \shade\
                \
                \
                    \${project.artifactId}-${project.version}\
                    \${project.build.directory}/bundle\
                \
            \
        \
\
my expected result :
/target

 - my_original_jar

 - bundle

      - myshadedjar
But i get :
/target

      - myshadedjar

      - bundle

           - myoriginnalejar

I try to provide a test project to reproduce for the 08/03/2020
                                      

---

**Affects:** 3.2.2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the configuration in the issue with Maven Shade Plugin 3.2.2, using an outputDirectory of target/bundle and a finalName matching the original artifact. Inspect the resulting target layout and compare it with the expected original and shaded JAR locations. Done means the original JAR remains in target and the shaded JAR is written under target/bundle.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.