You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you try to relocate a certain path for a certain source package it doesn't work. #1059 this PR was fixing that specific issue. i cannot use the plugin just because of this problem, and i'll keep using my fork for now to avoid this bug.
Expected and Results
@Test
funtest() {
val relocator1 =SimpleRelocator(
"a.b.c",
"x.y.z.shade.a.b.c",
)
val relocator2 =SimpleRelocator(
"d.e.f",
"x.y.z.shade.d.e.f"
)
relocator1.include("x/y/z/onlyabc/**")
relocator2.include("x/y/z/onlydef/**")
assertThat(
relocator2.applyToSourceContent(
relocator1.applyToSourceContent(complexSourceFile)
)
).isEqualTo(complexRelocatedFile)
}
privatecompanionobject {
val complexSourceFile =""" package x.y.z.onlyabc; import a.b.c.Example; import a.b.c.d.Example; import d.e.f.Example; import d.e.f.g.Example; final class MyClass {} package x.y.z.onlydef; import a.b.c.Example; import a.b.c.d.Example; import d.e.f.Example; import d.e.f.g.Example; final class MyClass {} package x.y.z.nochanges; import a.b.c.Example; import a.b.c.d.Example; import d.e.f.Example; import d.e.f.g.Example; final class MyClass {}""".trimIndent()
val complexRelocatedFile =""" package x.y.z.onlyabc; import x.y.z.shade.a.b.c.Example; import x.y.z.shade.a.b.c.d.Example; import d.e.f.Example; import d.e.f.g.Example; final class MyClass {} package x.y.z.onlydef; import a.b.c.Example; import a.b.c.d.Example; import x.y.z.shade.d.e.f.Example; import x.y.z.shade.d.e.f.g.Example; final class MyClass {} package x.y.z.nochanges; import a.b.c.Example; import a.b.c.d.Example; import d.e.f.Example; import d.e.f.g.Example; final class MyClass {}""".trimIndent()
}
portlek
changed the title
Include/Exclude for source paths do not work as it should be.
Include/Exclude for source paths cannot be relocated specifically.
Dec 9, 2024
portlek
changed the title
Include/Exclude for source paths cannot be relocated specifically.
Source paths cannot be relocated specifically using include/exclude.
Dec 9, 2024
I added a test for this in maven-shade-plugin, see Goooler/maven-shade-plugin@23c2a6b, it doesn't work here. We haven't called applyToSourceContent as I commented. If this function has any issue, please file it to maven-shade-plugin first.
When you try to relocate a certain path for a certain source package it doesn't work. #1059 this PR was fixing that specific issue. i cannot use the plugin just because of this problem, and i'll keep using my fork for now to avoid this bug.
Expected and Results
And this is the result it prints:
Related environent and versions
Shadow 9.0.0-SNAPSHOT
The text was updated successfully, but these errors were encountered: