Maven Wagon
  1. Maven Wagon
  2. WAGON-370

Adding additional wagon provider as dependency does not work

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: wagon-webdav
    • Labels:
      None
    • Environment:
      Mac OS 10.7.2, Apple Java 1.6.0_29, Maven 3.0.3/3.0.4
      Windows XP, SUN Java 1.6.0_24, Maven 3.0.4
    • Testcase included:
      yes
    • Number of attachments :
      2

      Description

      According to http://maven.apache.org/plugins/maven-site-plugin/examples/adding-deploy-protocol.html is should be possible to add additional wagon provider as a dependency to the site plugin. For a project deploying via dav, doing so using the wagon-webdav-jackrabbit makes Maven through a NoClassDefFoundError. Of adding the wagon as a global extension it works.
      Not sure if this is a maven-site-plugin issue though, or possible something in the specific wagon.

      I'm attaching a test project as well as the console output showing the error.

        Issue Links

          Activity

          Hide
          Dennis Lundberg added a comment -

          I've tried this locally and was able to get past your error message, but ended up with another error due to the fact that I don't have a local Nexus installation. Can you try it and see if it works for you?

          Add the following as an extra dependency to maven-site-plugin:

                      <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-nop</artifactId>
                        <version>1.5.3</version>
                        <scope>runtime</scope>
                      </dependency>
          
          Show
          Dennis Lundberg added a comment - I've tried this locally and was able to get past your error message, but ended up with another error due to the fact that I don't have a local Nexus installation. Can you try it and see if it works for you? Add the following as an extra dependency to maven-site-plugin: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-nop</artifactId> <version>1.5.3</version> <scope>runtime</scope> </dependency>
          Hide
          Anders Hammar added a comment -

          Yes, that works!
          I was thinking of that solution, but at the time of writing this ticket I didn't think that I should be forced to add it manually. But now I'm not that sure any more. What I don't really understand is why it works without this extra dep when the wagon is added as a global extension. There has to be a slf4j impl somewhere on the classpath. Why isn't it available when the wagon is added as a dep to the m-site-p?

          Show
          Anders Hammar added a comment - Yes, that works! I was thinking of that solution, but at the time of writing this ticket I didn't think that I should be forced to add it manually. But now I'm not that sure any more. What I don't really understand is why it works without this extra dep when the wagon is added as a global extension. There has to be a slf4j impl somewhere on the classpath. Why isn't it available when the wagon is added as a dep to the m-site-p?
          Hide
          Anders Hammar added a comment -

          I see that it's one of the dependencies of the wagon (jackrabbit-webdav) that uses slf4j. Shouldn't the wagon then include this runtime dependency?

          Show
          Anders Hammar added a comment - I see that it's one of the dependencies of the wagon (jackrabbit-webdav) that uses slf4j. Shouldn't the wagon then include this runtime dependency?
          Hide
          Dennis Lundberg added a comment -

          I think wagon needs to have some dependency on slf4j. When I looked at svn history for the POM there was a commit that removed such a dependency. I'll go and add that back. Until then you can use the above as a temporary workaround.

          Show
          Dennis Lundberg added a comment - I think wagon needs to have some dependency on slf4j. When I looked at svn history for the POM there was a commit that removed such a dependency. I'll go and add that back. Until then you can use the above as a temporary workaround.
          Hide
          Dennis Lundberg added a comment -

          The commit that removed the dependency is here:
          https://svn.apache.org/viewvc?view=revision&revision=1127473

          Show
          Dennis Lundberg added a comment - The commit that removed the dependency is here: https://svn.apache.org/viewvc?view=revision&revision=1127473
          Hide
          Dennis Lundberg added a comment -

          The upgraded version of slf4j-api being used in 2.3-SNAPSHOT is more stable if no slf4j implementation is provided. It gracefully falls back to NOOP logger which is exactly what we wanted.

          Show
          Dennis Lundberg added a comment - The upgraded version of slf4j-api being used in 2.3-SNAPSHOT is more stable if no slf4j implementation is provided. It gracefully falls back to NOOP logger which is exactly what we wanted.

            People

            • Assignee:
              Unassigned
              Reporter:
              Anders Hammar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: