Maven site deploy issue

4.1k views Asked by At

I am using the maven site-deploy command. I am using maven 2.2.1 with jdk 6.

I get the following error:

org.apache.maven.lifecycle.LifecycleExecutionException: Wagon protocol '' doesn't support directory copying
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Wagon protocol '' doesn't support directory copying
    at org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:165)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    ... 17 more`

The pom.xml has the following distribution Management section:

    <site>
        <id>app123</id>
        <url>/app/il3/apache-tomcat-7.0.57/webapps/build/app123</url>
    </site>

Please advise.

Thanks, B

2

There are 2 answers

1
André On BEST ANSWER

I'm pretty sure you're just having trouble to configure your maven <site> tag. at the URL from the official documentation it states:

url: This is the core of the repository element. It specifies both the location and the transport protocol to be used to transfer a built artifact (and POM file, and checksum data) to the repository.

And you're missing your transport protocol on your URL. Therefore the

Wagon protocol '' doesn't support directory copying

Here is the list of supported protocols, from their site:

  • File
  • HTTP
  • HTTP lightweight
  • FTP
  • SSH/SCP
  • WebDAV

So why don't you try specifying a valid URL? <url>file://var/<url> Here are some more examples and a explanation

0
raisercostin On

I've got a similar problem but for protocol http Wagon protocol 'http' doesn't support directory copying on a nexus site.

I solved it by switching to dav protocol. It needs to be added as extension.

<project>
   ...
   <distributionManagement>
      <site>
        <id>uumds-site-repository</id>
        <name>Uumds Site Repository</name>
        <!--
        <url>http://vs-b1-repo1:8081/nexus/content/sites/uumds/${project.groupId}-${project.artifactId}-${project.version}</url>
        -->
        <url>dav:http://vs-b1-repo1:8081/nexus/content/sites/uumds/${project.groupId}-${project.artifactId}-${project.version}</url>
      </site>
  </distributionManagement>
  ...
  <build>
    <extensions>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-webdav-jackrabbit</artifactId>
            <version>2.10</version>
        </extension>
    </extensions>
  ...
  </build>
</project>