Ah. I see.... Is there a fundamental reason why we have to use Powermock or would there be interest in a patch that removed that dependency replacing it with some sort of alternative?
After googling, it seems like waiting for Powermock to support Java 1.8 before depending on it isn't entirely a bad thing. Unless I misunderstand, Powermock is only used in one of the tests(at least in a fashion that fails). On Mon, May 18, 2015 at 11:18 AM, Robert Sandell <[email protected]> wrote: > The PowerMock version used by the tests doesn't work on Java 8. Should work > on Java 7 > > On Mon, May 18, 2015 at 8:30 AM, Øyvind Harboe <[email protected]> > wrote: >> >> Hi, >> >> I'm having problems building the gerrit-trigger-plugin. It fails with the >> error below when running tests. This is with the latest from >> gerrit-trigger-plugin master. >> >> Any ideas on how to fix this? >> >> Configuration details at the bottom of this post. I guess I'm on the >> bleeding edge by running Java 1.8 and Ubuntu 14 and that there's some >> versioning issue here, but it would be nice if I could create patches with >> the gerrit-trigger-plugin with the latest Java and OS that I use for other >> work. >> >> Here's what I do: >> >> 1. cd gerrit-trigger-plugin >> 2. mvn install >> >> >> results in => >> >> >> ------------------------------------------------------------------------------- >> Test set: >> com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerTest >> >> ------------------------------------------------------------------------------- >> Tests run: 38, Failures: 0, Errors: 9, Skipped: 0, Time elapsed: 3.93 sec >> <<< FAILURE! - in >> com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerTest >> >> testRetriggerThisBuild(com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerTest) >> Time elapsed: 0.029 sec <<< ERROR! >> java.lang.LinkageError: loader constraint violation in interface itable >> initialization: when resolving method >> "org.acegisecurity.Authentication$$EnhancerByMockitoWithCGLIB$$41aef083.implies(Ljavax/security/auth/Subject;)Z" >> the class loader (instance of >> org/powermock/core/classloader/MockClassLoader) of the current class, >> org/acegisecurity/Authentication$$EnhancerByMockitoWithCGLIB$$41aef083, and >> the class loader (instance of <bootloader>) for interface >> java/security/Principal have different Class objects for the type >> javax/security/auth/Subject used in the signature >> at >> sun.reflect.GeneratedSerializationConstructorAccessor15.newInstance(Unknown >> Source) >> at java.lang.reflect.Constructor.newInstance(Constructor.java:422) >> at >> org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.newInstance(SunReflectionFactoryInstantiator.java:56) >> at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73) >> at >> org.mockito.internal.creation.jmock.ClassImposterizer.createProxy(ClassImposterizer.java:128) >> at >> org.mockito.internal.creation.jmock.ClassImposterizer.imposterise(ClassImposterizer.java:63) >> at >> org.powermock.api.mockito.internal.mockcreation.MockCreator.createMethodInvocationControl(MockCreator.java:111) >> at >> org.powermock.api.mockito.internal.mockcreation.MockCreator.mock(MockCreator.java:60) >> at org.powermock.api.mockito.PowerMockito.mock(PowerMockito.java:143) >> at >> com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerTest.mockConfig(GerritTriggerTest.java:1626) >> at >> com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerTest.testRetriggerThisBuild(GerritTriggerTest.java:834) >> >> >> >> >> $ uname -a >> Linux rider 3.13.0-51-generic #84-Ubuntu SMP Wed Apr 15 12:08:34 UTC 2015 >> x86_64 x86_64 x86_64 GNU/Linux >> $ mvn --version >> Apache Maven 3.0.5 >> Maven home: /usr/share/maven >> Java version: 1.8.0_45, vendor: Oracle Corporation >> Java home: /usr/lib/jvm/java-8-oracle/jre >> Default locale: en_US, platform encoding: UTF-8 >> OS name: "linux", version: "3.13.0-51-generic", arch: "amd64", family: >> "unix" >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/9f1ed53a-82be-4e97-861f-6fce6b3efe6c%40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > > > > -- > Robert Sandell > Software Engineer > CloudBees Inc. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-dev/n5sdCxrccSk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS0Yt%3DDbRXbjyobPzQ%3DtsuJtbfkNWro_AozgrK%3DCKukpkQ%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- Øyvind Harboe - Can Zylin Consulting help on your project? http://www.zylin.com/ -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CACELUGdjd2RpAyDezvyXBKNzax5bh8zu8NjME1pcPhqdQ8hVnA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
