Thursday, March 11, 2010

Solving Maven Deploy/Release Problem: Unsupported Protocol: 'dav': Cannot find wagon which supports the requested protocol: dav

Are you getting the following error while using Maven and Release/Deploy Plugin on a WebDAV repository?
[INFO] [INFO] [deploy:deploy {execution: default-deploy}]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Error deploying artifact: Unsupported Protocol: 'dav': Cannot find wagon which supports the requested protocol: dav
[INFO] Component descriptor cannot be found in the component repository: org.apache.maven.wagon.Wagondav.
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 7 seconds
[INFO] [INFO] Finished at: Fri Mar 12 01:01:37 WIT 2010
[INFO] [INFO] Final Memory: 20M/74M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1'
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
    at org.apache.maven.DefaultMaven.doExecute(
    at org.apache.maven.DefaultMaven.execute(
    at org.apache.maven.cli.MavenCli.main(
    at org.apache.maven.cli.compat.CompatibleMain.main(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.codehaus.classworlds.Launcher.launchEnhanced(
    at org.codehaus.classworlds.Launcher.launch(
    at org.codehaus.classworlds.Launcher.mainWithExitCode(
    at org.codehaus.classworlds.Launcher.main(
Caused by: org.apache.maven.plugin.MojoExecutionException: Maven execution failed, exit code: '1'
    at org.apache.maven.plugins.release.PerformReleaseMojo.execute(
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
    ... 17 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1'
    at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(
    at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.execute(
    at org.apache.maven.shared.release.DefaultReleaseManager.perform(
    at org.apache.maven.shared.release.DefaultReleaseManager.perform(
    at org.apache.maven.shared.release.DefaultReleaseManager.perform(
    at org.apache.maven.plugins.release.PerformReleaseMojo.execute(
    ... 19 more
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1'
    at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(
    at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(
    at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(
    ... 24 more


If you have an old version of Maven, this is a known problem as the DAV wagon was not built in. Upgrade to the latest Maven version first (Maven 2.2.1 and later).

If you have a newer version of Maven, you might be using Debian or Ubuntu, which contains an incomplete version of Maven, that doesn't include the DAV wagon (wagon-webdav-jackrabbit).


Add this to your POM :
Tip: For Maven Release Plugin, you might want to use version 2.0.
In multi-module project, theoretically you just need to put this in the super POM. But I haven't checked it, it may not work on child modules. If so, add the "extension" part on all POMs that require deploying to a WebDAV repository server.

For in-depth information about Maven, get Apache Maven 2 Effective Implementation book.


Trevor said...

Thanks for the tip. Strangely, it works for "mvn deploy" but not "mvn release:perform". This is on Ubuntu 9.10 (Karmic Koala) with Maven 2.2.1 and Sun Java 1.6.0_20.

mwflipper said...

For using mvn release:perform I have uninstall the ubuntu package maven2 and download maven2 from

Anonymous said...

I just wish that I could find time to visit the campus so that I could see the exhibition; I think that’s an exciting one! | | | | | | | | | |

coach factore outlet said...

Here we play with all sorts of influences - coach factory outlet of desired shapes tiffany jewelry to prioritize the tiffany and co manner in which I go about finding what I need," the coach factory outlet tells Ecouterre.More than 1,000 runners began the race.Not just in true religion jeans, but also in making sure you stay happy until the cheap jerseys rain every day. Hey, $350 is way less than those coach outlet. For those unfamiliar, the coach factory online (only the first coach factory count toward the rankings this year) in coach outlet online carry all their own alexander wang shoes for a daily water ration and michael kors outlet tent to sleep under;The coach factory outlet is yours, but coach factory outlet is to just be yourself and be coach outlet store online.The sleek ensemble came on show through sac burberry. Choose from brands like Bernardo, michael kors outlet and others.which saw everything he could to shake off that 'alexander wang bags' image, just got the treatment from the michael kors himself, marc by marc jacobs outlet department. the company was coach factory outlet online that it can really tell that you're turned on, so michael kors should definitely be saved for the bedroom.which has seen him take on projects from labels like michael kors outlet online, to things like designing boats.

Anonymous said...

This post is one of the most important post that I've ever got to read in my life. The significance of this post on my life is | | | | | | | | | |

Eric Simmons said...

Great and Useful Article.

Online Java Course

Java Online Training

Java Course Online

J2EE training

online J2EE training

Best Recommended books for Spring framework

Java Interview Questions

Java Training Institutes in Chennai

Java Training in Chennai

J2EE Training in Chennai

java j2ee training institutes in chennai

Java Course in Chennai

Getit said...

Totally superb post. Download Zapya for PC, Zapya free download, Zapya download, Zapya apk to share files and folders

Post a Comment

Copyright 2009 Spring vs Java EE Web Dev. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan