Description of problem: We have a use case where we build with the maven30 collection enabled. That collections' maven uses objectweb-asm v3 for runtime. In that dependent collection we've built felix-scr-maven-plugin. What's more, the project we are building also requires objectweb-asm v5 (for JDK 8 class file support). That combination of maven30-maven + rh-java-common-objectweb-asm + rh-java-common-objectweb-asm5 + thermostat1-felix-scr-maven-plugin seems to trigger a bug resulting in this: [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.21.0:scr (generate-scr-scrdescriptor) on project thermostat-vm-heap-analysis-common: Execution generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.21.0:scr failed: An API incompatibility was encountered while executing org.apache.felix:maven-scr-plugin:1.21.0:scr: java.lang.IncompatibleClassChangeError: class org.objectweb.asm.tree.ClassNode has interface org.objectweb.asm.ClassVisitor as super class [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.apache.felix:maven-scr-plugin:1.20.0 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/opt/rh/thermostat1/root/usr/share/java/felix-scr-maven-plugin/maven-scr-plugin.jar [ERROR] urls[1] = file:/opt/rh/maven30/root/usr/share/java/plexus-containers/plexus-component-annotations.jar [ERROR] urls[2] = file:/opt/rh/maven30/root/usr/share/java/sisu/sisu-inject-bean.jar [ERROR] urls[3] = file:/opt/rh/rh-java-common/root/usr/share/java/atinject.jar [ERROR] urls[4] = file:/opt/rh/rh-java-common/root/usr/share/java/objectweb-asm/asm.jar [ERROR] urls[5] = file:/opt/rh/maven30/root/usr/share/java/guice/google-guice-no_aop.jar [ERROR] urls[6] = file:/opt/rh/rh-java-common/root/usr/share/java/slf4j/slf4j-api.jar [ERROR] urls[7] = file:/opt/rh/rh-java-common/root/usr/share/java/guava.jar [ERROR] urls[8] = file:/opt/rh/maven30/root/usr/share/java/cglib.jar [ERROR] urls[9] = file:/opt/rh/maven30/root/usr/share/java/maven-archiver/maven-archiver.jar [ERROR] urls[10] = file:/opt/rh/maven30/root/usr/share/java/aether/aether-util.jar [ERROR] urls[11] = file:/opt/rh/maven30/root/usr/share/java/plexus/plexus-sec-dispatcher.jar [ERROR] urls[12] = file:/opt/rh/maven30/root/usr/share/java/plexus/plexus-cipher.jar [ERROR] urls[13] = file:/opt/rh/maven30/root/usr/share/java/plexus/archiver.jar [ERROR] urls[14] = file:/opt/rh/rh-java-common/root/usr/share/java/xbean/xbean-reflect.jar [ERROR] urls[15] = file:/opt/rh/rh-java-common/root/usr/lib/java/log4j.jar [ERROR] urls[16] = file:/opt/rh/rh-java-common/root/usr/share/java/apache-commons-logging-api.jar [ERROR] urls[17] = file:/opt/rh/rh-java-common/root/usr/share/java/junit.jar [ERROR] urls[18] = file:/opt/rh/rh-java-common/root/usr/share/java/hamcrest/core.jar [ERROR] urls[19] = file:/opt/rh/maven30/root/usr/share/java/plexus/io.jar [ERROR] urls[20] = file:/opt/rh/rh-java-common/root/usr/share/java/commons-compress.jar [ERROR] urls[21] = file:/opt/rh/rh-java-common/root/usr/share/java/xz-java.jar [ERROR] urls[22] = file:/opt/rh/maven30/root/usr/share/java/plexus/utils.jar [ERROR] urls[23] = file:/opt/rh/maven30/root/usr/share/java/plexus/interpolation.jar [ERROR] urls[24] = file:/opt/rh/thermostat1/root/usr/share/java/felix/org.apache.felix.scr.generator.jar [ERROR] urls[25] = file:/opt/rh/rh-java-common/root/usr/share/java/objectweb-asm5/asm-all-5.jar [ERROR] urls[26] = file:/opt/rh/maven30/root/usr/share/java/felix/org.osgi.core.jar [ERROR] urls[27] = file:/opt/rh/maven30/root/usr/share/java/felix/org.osgi.compendium.jar [ERROR] urls[28] = file:/opt/rh/rh-java-common/root/usr/share/java/tomcat-servlet-3.0-api.jar [ERROR] urls[29] = file:/opt/rh/maven30/root/usr/share/java/felix/org.osgi.foundation.jar [ERROR] urls[30] = file:/opt/rh/maven30/root/usr/share/java/plexus/plexus-build-api.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[project>com.redhat.thermostat:thermostat-annotations:1.99.7, parent: ClassRealm[maven.api, parent: null]]] Version-Release number of selected component (if applicable): maven30 How reproducible: 100% Steps to Reproduce: 1. copr build jerboaa/thermostat-latest https://jerboaa.fedorapeople.org/scratch/thermostat-1.99.7-89.fedora.src.rpm Actual results: IncompatibleClassChangeError Expected results: build success, just as the one that succeeds for Fedora rawhide. Additional info: This might not be possible for maven30, but perhaps for a later updated maven collection.
Example failed build: https://copr.fedoraproject.org/coprs/jerboaa/thermostat-latest/build/142180/
AFAIK, objectweb-asm is only used by sisu. This is not a problem for upstream because they are using bundled and shaded ASM, while we are unbundling it. Using shaded ASM should solve this.
Hi Mokolaj, Is there any progress on that? We depend on the resolution of this bug to merge into Thermostat some important changes that are currently on hold. Thanks, Mario
Hi Mario, We'll definitely fix this issue in next RHSCL release, but unfortunately I can't give you an ETA at the moment. For now, I could try to prepare a copr repository with fixed maven30 maven+sisu. Would that help?
(In reply to Michal Srb from comment #4) > We'll definitely fix this issue in next RHSCL release, but unfortunately I > can't give you an ETA at the moment. That's good to know. > For now, I could try to prepare a copr repository with fixed maven30 > maven+sisu. Would that help? That would help a great deal, thanks!
It was a bit trickier than I thought. Not only sisu, but also google-guice package needed to be fixed. google-guice has optional dependency on cglib (which pulls in asm3), but the optional flag is ignored by XMvn and javapackages-tools in RHSCL 2.1. Anyway, this copr repository should, hopefully, do the trick: https://copr.fedoraproject.org/coprs/msrb/maven30-bundled-asm/
(In reply to Michal Srb from comment #6) > Anyway, this copr repository should, hopefully, do the trick: > https://copr.fedoraproject.org/coprs/msrb/maven30-bundled-asm/ Thanks a lot. I'm going to test this in the next couple of days.
(In reply to Severin Gehwolf from comment #7) > (In reply to Michal Srb from comment #6) > > Anyway, this copr repository should, hopefully, do the trick: > > https://copr.fedoraproject.org/coprs/msrb/maven30-bundled-asm/ > > Thanks a lot. I'm going to test this in the next couple of days. The copr repo works for us[1]. Thanks again! We are now unblocked. [1] https://copr.fedoraproject.org/coprs/jerboaa/thermostat-latest/build/146799/