maven-shade-plugin
maven-shade-plugin copied to clipboard
[MSHADE-269] Ability to replace also target/classes with modified classes
Ivan Balashov opened MSHADE-269 and commented
Relocated classes are only included into artifact jar bypassing module's target / classes directory. IDEs pick up unmodified classes which is undesirable.
Following the corresponding Intellij Idea Issue: https://youtrack.jetbrains.com/issue/IDEA-93855
4 votes, 4 watchers
Clebert Suconic commented
I think this should be closed as explained...
shade creating this sort of dependencies between projects will probably cause more harm than good.
I just been through issues where I was trying to make these sort of things.. and it would work originally but it would become un-manageable in the long term.
after my experience, I think it's a big no to depend on shaded classes within the same project. That's my experience and after an interaction on the maven user's forum.
As for the IDEA-93855 I think they should also close it as won't fix. this will create more harm than good.
for future reference: https://lists.apache.org/thread/cxg27j5bypdktjhqlzv79z71kt2oqls7
Gili commented
Clebert Suconic I don't understand. You wrote:
creating this sort of dependencies between projects will probably cause more harm than good.
What sort of dependencies? When someone builds a project, and it uses shade to rewrite its own JAR then I believe this issue is asking to rewrite target/classes as well. We are not talking about rewriting other projects but rather our own. So what "dependencies between projects" are we creating that don't already exist?
Clebert Suconic commented
Gilibased on the discussion on the user's forum, this would open a Pandora box.
It's one thing to build a shaded Jar, another thing is to consume inside your maven project.
there are phases on the build, calculations on the build.. that will not work at all.
Introducing such feature would only open a Pandora box. I don't think it should be done.
Gili commented
Clebert Suconic So what you're saying is that shaded JARs cannot be tested by the same project that packages it. So integration tests fly out the window, not to mention any other sort of inter-module dependency.
Something doesn't make sense here.