You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Holger Hoffstätte (JIRA)" <xa...@xml.apache.org> on 2008/03/03 15:44:50 UTC

[jira] Commented: (XALANJ-2436) Xalan must not expose bundled classes (bcel, regexp)

    [ https://issues.apache.org/jira/browse/XALANJ-2436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574533#action_12574533 ] 

Holger Hoffstätte commented on XALANJ-2436:
-------------------------------------------

Btw it is easy to try this without ant. Just run:
java -jar jarjar-1.0rc6.jar process <rulesfile> xalan-2.7.1.jar xalan-2.7.1-fixed.jar

Look inside the fixed jar and you will see that the bcel/regexp packages have been moved, and all references to them have been rewritten.


> Xalan must not expose bundled classes (bcel, regexp)
> ----------------------------------------------------
>
>                 Key: XALANJ-2436
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2436
>             Project: XalanJ2
>          Issue Type: Bug
>          Components: Xalan
>    Affects Versions: 2.7.1
>         Environment: any
>            Reporter: Holger Hoffstätte
>            Priority: Critical
>         Attachments: rewrite-packages.rules
>
>
> I just spent the better part of half a day figuring out what caused the problem outlined in https://sourceforge.net/tracker/?func=detail&atid=614693&aid=1902137&group_id=96405.
> Xalan bundles regexp and bcel, however since one of the recommened ways of installing xalan is via the endorsed mechanism this will wreak serious havoc on any other apps that use bcel. That would be less of a problem is xalan's version were up to date, but as of 2.7.1 it still includes a version from the early stone age (see XALANJ-2423). The solution is easy: when building the aggregate jar, add an ant task to rewrite the bundled packages via jarjar (http://code.google.com/p/jarjar/). This can be trivially added to the build and creates a completely self-contained xalan jar that will not blow up the world when endorsed.
> I will attach a trivial rule file for jarjar that rewrites the embedded packages which should immediately fix any collision problems. For more information about how to use jarjar, see http://code.google.com/p/jarjar/wiki/GettingStarted

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org