[
https://issues.apache.org/jira/browse/MSHADE-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15326306#comment-15326306
]
MoonFruit commented on MSHADE-226:
----------------------------------
This is from mybatis-3.4.0 's pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<includes>
<include>org.mybatis:mybatis</include>
<include>ognl:ognl</include>
<include>org.javassist:javassist</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>ognl</pattern>
<shadedPattern>org.apache.ibatis.ognl</shadedPattern>
</relocation>
<relocation>
<pattern>javassist</pattern>
<shadedPattern>org.apache.ibatis.javassist</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
And I use this to build a mybatis-3.4.0.jar and deploy it and a independent
javassist.jar to my war, and it seems alright.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<includes>
<include>org.mybatis:mybatis</include>
<include>ognl:ognl</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>ognl</pattern>
<shadedPattern>org.apache.ibatis.ognl</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
> Shade with location for IBM's Websphere Application Server 8.5.5.9 load error
> -----------------------------------------------------------------------------
>
> Key: MSHADE-226
> URL: https://issues.apache.org/jira/browse/MSHADE-226
> Project: Maven Shade Plugin
> Issue Type: Bug
> Affects Versions: 2.4.3
> Environment: IBM's Websphere Application Server 8.5.5.9
> Reporter: MoonFruit
>
> Mybatis 3.4.0 use shade to integrate javassist and ognl with relocation.
> But when deploy war which has mybatis-3.4.0.jar to IBM's Websphere
> Application Server 8.5.5.9, the war cannot start because of the relocation of
> javassist.
> Then I create a mybatis-3.4.0.jar without javassist and a independent
> javassist jar put it to my war. And deploy it to IBM's Websphere Application
> Server 8.5.5.9, everything is right.
> So, I think maybe there is some error when shade plugin relocate javassist.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)