[ 
https://issues.apache.org/jira/browse/LUCENE-8156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16353526#comment-16353526
 ] 

Uwe Schindler edited comment on LUCENE-8156 at 2/6/18 7:58 AM:
---------------------------------------------------------------

Unfortunately no, there is no way: We had three people looking at it yesterday. 
The includeAntRuntime stuff only works for classpaths of javac - because they 
are outside JVM's loading mechanisms and do not have to do anything with 
classloaders (the classpath passed to javac is different).

Here the transformation of class files are done by ant's JVM, so it uses Ant's 
classloader at thetop level. Ant has options to violate classloading by 
inverting the parent search order (parentLast), but I did not get that running. 
Another option would be to fork - but that did not work, as it would then 
require a local installation of Groovy.

I can fix the typo, sure :)


was (Author: thetaphi):
Unfortunately no, there is no way: We had three people looking at it yesterday. 
The includeAntRuntime stuff only works for classpaths of javac - becausethey 
are outside and do not have to do anything with classloaders (the classpath 
passed to javac is different).

Here the transformation of class files are done by ant's JVM, so it uses Ant's 
classloader at thetop level. Ant has options to violate classloading by 
inverting the parent search order (parentLast), but I did not get that running. 
Another option would be to fork - but that did not work, as it would then 
require a local installation of Groovy.

I can fix the typo, sure :)

> patch-mrjar-classes fails if an old version of ASM is on the Ant classpath
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-8156
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8156
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Adrien Grand
>            Assignee: Uwe Schindler
>            Priority: Major
>         Attachments: LUCENE-8156.patch, image-2018-02-06-00-00-35-434.png
>
>
> If some optional tasks that depend on an old version of ASM are installed, 
> patching fails with the following error: 
> {{/home/jpountz/src/lucene-solr/lucene/common-build.xml:565: 
> java.lang.IncompatibleClassChangeError: class 
> org.objectweb.asm.commons.ClassRemapper has interface 
> org.objectweb.asm.ClassVisitor as super class}}
> The reason is that ClassRemapper is loaded from the right place, but 
> ClassVisitor, its parent class, is loaded from the parent classpath which may 
> be a different version.
> It is easy to reproduce:
>  - download and extract ant-1.10.1 (latest version)
>  - run {{bin/ant -f fetch.xml -Ddest=system}}, this will add 
> {{lib/asm-2.2.3.jar}} among other files
>  - run {{ant clean test}} at the root of lucene-solr.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to