Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-418

Changes from WAGON-388 broke the WebDAV Wagon

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5, 2.6
    • 2.7
    • wagon-webdav
    • None

    Description

      While removing commons-logging from wagon-http-shared (as per the comments above), the dependency from commons-httpclient:3.1 was also removed. That also being excluded in wagon-webdav-jackrabbit causes any project that uses the webdav wagon as an extension (at least starting from version 2.5) to break when running an operation as the initialization of the HttpClient stack requires commons-logging:

      com.google.inject.ProvisionException: Guice provision errors:
      
      1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
        at org.apache.maven.wagon.providers.webdav.WebDavWagon.<init>(Unknown Source)
        while locating org.apache.maven.wagon.providers.webdav.WebDavWagon
      
      1 error
      	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1006)
      	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)
      	at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
      	at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
      	at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
      	at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
      	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
      	at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133)
      	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
      	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
      	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
      	at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
      	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
      	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:59)
      	at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
      	at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)
      	at org.apache.maven.repository.legacy.DefaultWagonManager.getWagon(DefaultWagonManager.java:796)
      	at org.apache.maven.repository.legacy.DefaultWagonManager.getWagon(DefaultWagonManager.java:779)
      	at org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(WagonUtils.java:59)
      	at org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo.java:82)
      	at org.codehaus.mojo.wagon.AbstractSingleWagonMojo.execute(AbstractSingleWagonMojo.java:63)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
      	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.<clinit>(MultiThreadedHttpConnectionManager.java:70)
      	at org.apache.maven.wagon.providers.webdav.AbstractHttpClientWagon.<init>(AbstractHttpClientWagon.java:178)
      	at org.apache.maven.wagon.providers.webdav.WebDavWagon.<init>(WebDavWagon.java:63)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      	at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:86)
      	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:109)
      	at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
      	at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
      	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
      	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:116)
      	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
      	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
      	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
      	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1054)
      	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
      	... 45 more
      Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
      	... 64 more
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 39.957s
      [INFO] Finished at: Tue Jul 22 15:20:12 EDT 2014
      [INFO] Final Memory: 41M/459M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-5:upload-single (upload-zip) on project XXXX: Unable to create a Wagon instance for dav:http://domain/path: Cannot find wagon which supports the requested protocol: dav: com.google.inject.ProvisionException: Guice provision errors:
      [ERROR]
      [ERROR] 1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
      [ERROR] at org.apache.maven.wagon.providers.webdav.WebDavWagon.<init>(Unknown Source)
      [ERROR] while locating org.apache.maven.wagon.providers.webdav.WebDavWagon
      [ERROR] at ClassRealm[extension>org.apache.maven.wagon:wagon-webdav-jackrabbit:2.7-SNAPSHOT, parent: sun.misc.Launcher$AppClassLoader@5b5fdf31]
      [ERROR] while locating org.apache.maven.wagon.Wagon annotated with @com.google.inject.name.Named(value=dav)
      [ERROR]
      [ERROR] 1 error
      [ERROR] role: org.apache.maven.wagon.Wagon
      [ERROR] roleHint: dav: org.apache.commons.logging.LogFactory
      [ERROR] -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
      

      This is fixable simply by adding the removed dependency (which was supposed to be moved as per the commit comments from WAGON-388) on wagon-webdav-jackrabbit.

      I'm submitting a PR via Github as a proposed fix.

      Attachments

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              roberto.andrade Roberto Andrade
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: