[ https://jira.codehaus.org/browse/MSHADE-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Neeme Praks updated MSHADE-156:
-------------------------------
Description:
I'm shading several third party libraries into a single JAR. In the context of this issue,
there are two important libraries:
1. com.nothome:javaxdelta:2.0.1 - this library is in "at.spardat.xma.xdelta" package.
2. ch.qos.logback:logback-classic:1.0.11 - in this library, in class ch.qos.logback.classic.spi.StackTraceElementProxy,
there is a method to convert stack trace elements into strings:
{code}
public String getSTEAsString() {
if (steAsString == null) {
steAsString = "at " + ste.toString();
}
return steAsString;
}
{code}
I use "org.myorgname.appname.shaded" package for shading.
During shading, the constant "at " is replaced with "org.myorgname.appname.shaded.at" -- shade
plugin thinks that the "at" in the beginning of that string is a package name and shades it.
This results in an unfortunate side-effect: all logged stack traces now look like this:
{noformat}
Caused by: java.util.zip.ZipException: error in opening zip file
org.myorgname.appname.shaded.at java.util.zip.ZipFile.open(Native Method) ~[na:1.6.0_19]
org.myorgname.appname.shaded.at java.util.zip.ZipFile.<init>(ZipFile.java:114) ~[na:1.6.0_19]
org.myorgname.appname.shaded.at java.util.zip.ZipFile.<init>(ZipFile.java:131) ~[na:1.6.0_19]
{noformat}
was:
I'm shading several third party libraries into a single JAR. In the context of this issue,
there are two important libraries:
1. com.nothome:javaxdelta:2.0.1 - this library is in "at.spardat.xma.xdelta" package.
2. ch.qos.logback:logback-classic:1.0.11 - in this library, in class ch.qos.logback.classic.spi.StackTraceElementProxy,
there is a method to convert stack trace elements into strings:
public String getSTEAsString() {
if (steAsString == null) {
steAsString = "at " + ste.toString();
}
return steAsString;
}
I use "org.myorgname.appname.shaded" package for shading.
During shading, the constant "at " is replaced with "org.myorgname.appname.shaded.at" -- shade
plugin thinks that the "at" in the beginning of that string is a package name and shades it.
This results in an unfortunate side-effect: all logged stack traces now look like this:
{noformat}
Caused by: java.util.zip.ZipException: error in opening zip file
org.myorgname.appname.shaded.at java.util.zip.ZipFile.open(Native Method) ~[na:1.6.0_19]
org.myorgname.appname.shaded.at java.util.zip.ZipFile.<init>(ZipFile.java:114) ~[na:1.6.0_19]
org.myorgname.appname.shaded.at java.util.zip.ZipFile.<init>(ZipFile.java:131) ~[na:1.6.0_19]
{noformat}
> shade plugin is transforming also strings that are not supposed to be transformed
> ---------------------------------------------------------------------------------
>
> Key: MSHADE-156
> URL: https://jira.codehaus.org/browse/MSHADE-156
> Project: Maven Shade Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Reporter: Neeme Praks
>
> I'm shading several third party libraries into a single JAR. In the context of this issue,
there are two important libraries:
> 1. com.nothome:javaxdelta:2.0.1 - this library is in "at.spardat.xma.xdelta" package.
> 2. ch.qos.logback:logback-classic:1.0.11 - in this library, in class ch.qos.logback.classic.spi.StackTraceElementProxy,
there is a method to convert stack trace elements into strings:
> {code}
> public String getSTEAsString() {
> if (steAsString == null) {
> steAsString = "at " + ste.toString();
> }
> return steAsString;
> }
> {code}
> I use "org.myorgname.appname.shaded" package for shading.
> During shading, the constant "at " is replaced with "org.myorgname.appname.shaded.at"
-- shade plugin thinks that the "at" in the beginning of that string is a package name and
shades it.
> This results in an unfortunate side-effect: all logged stack traces now look like this:
> {noformat}
> Caused by: java.util.zip.ZipException: error in opening zip file
> org.myorgname.appname.shaded.at java.util.zip.ZipFile.open(Native Method) ~[na:1.6.0_19]
> org.myorgname.appname.shaded.at java.util.zip.ZipFile.<init>(ZipFile.java:114)
~[na:1.6.0_19]
> org.myorgname.appname.shaded.at java.util.zip.ZipFile.<init>(ZipFile.java:131)
~[na:1.6.0_19]
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
|