martinspielmann / nexus3-crowd-plugin

Sonatype Nexus plugin for Atlassian Crowd integration
Apache License 2.0
39 stars 15 forks source link

Plugin v3.2.6 jar install fails on Nexus 3.4.0 #31

Closed jrshitanishi closed 6 years ago

jrshitanishi commented 6 years ago

Cool that this is now in a jar! Unfortunately, when I follow the README exactly (minus crowd.properties content) the install seems to fail. Nothing appears in my GUI and when I check nexus.log after restarting Nexus:

2017-10-17 13:18:54,336-0700 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - org.osgi.framework.BundleException: Unable to resolve nexus3-crowd-plugin [46](R 46.0): missing requirement [nexus3-crowd-plugin [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.sonatype.nexus.security.authz)(version>=3.6.0)) Unresolved requirements: [[nexus3-crowd-plugin [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.sonatype.nexus.security.authz)(version>=3.6.0))]
2017-10-17 13:18:54,336-0700 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable -      at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
2017-10-17 13:18:54,336-0700 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable -      at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
2017-10-17 13:18:54,336-0700 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable -      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
2017-10-17 13:18:54,336-0700 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable -      at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
2017-10-17 13:18:54,336-0700 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable -      at java.lang.Thread.run(Thread.java:748)
2017-10-17 13:18:54,337-0700 INFO  [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusBundleTracker - ACTIVATING wrap_file__var_opt_nexus-3.4.0-02_system_com_sonatype_licensing_license-bundle_1.4.3_license-bundle-1.4.3.jar [248]
2017-10-17 13:18:54,337-0700 ERROR [FelixDispatchQueue] *SYSTEM nexus3-crowd-plugin - FrameworkEvent ERROR - nexus3-crowd-plugin
org.osgi.framework.BundleException: Unable to resolve nexus3-crowd-plugin [46](R 46.0): missing requirement [nexus3-crowd-plugin [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.sonatype.nexus.security.authz)(version>=3.6.0)) Unresolved requirements: [[nexus3-crowd-plugin [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.sonatype.nexus.security.authz)(version>=3.6.0))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Thread.java:748)
martinspielmann commented 6 years ago

Seems like the new nexus-plugins parent pom.xml drops backward compatibility here :(

As Nexus 3.4.0 already uses the new startup.properties format and there was no new feature added to nexus3-crowd-plugin, you should be able to work with the jar file downloadable from here: https://github.com/pingunaut/nexus3-crowd-plugin/releases/tag/nexus3-crowd-plugin-3.2.4

I will add a comment in the documentation to inform about the backward compatibility break. Thanks a lot for your feedback. Would be glad to here if nexus3-crowd-plugin-3.2.4.jar works for you.

Best regards Martin

jrshitanishi commented 6 years ago

I suspected as much when I took a closer look at the pom. Just for kicks while waiting on the response I recompiled it with nexus-plugins version 3.4.0-02 then installed that and it worked. I'll try plugin version 3.2.4 now and let you know. Many thanks.

jrshitanishi commented 6 years ago

The 3.2.4 jar I pulled works.

martinspielmann commented 6 years ago

👍 perfect, thanks for your feedback!