java - Maven站点部署问题

标签 java maven deployment jdk6

我正在使用 maven site-deploy 命令。我正在使用 maven 2.2.1jdk 6

我收到以下错误:

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`

pom.xml 具有以下分发管理部分:

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

请指教。

谢谢, B

最佳答案

我很确定你只是在配置你的 maven 时遇到了问题 <site>标签。在 URL从官方文档中可以看出:

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.

并且您在 URL 上丢失了传输协议(protocol)。因此

Wagon protocol '' doesn't support directory copying

这是支持的协议(protocol)列表,来自他们的 site :

  • 文件
  • HTTP
  • HTTP 轻量级
  • FTP
  • SSH/SCP
  • WebDAV

那么您为什么不尝试指定一个有效的 URL? <url>file://var/<url> 这里还有一些examples and a explanation

关于java - Maven站点部署问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27602445/

相关文章:

deployment - WSO2 ESB 部署在应用程序服务器上,例如网络逻辑

java - 单元格渲染器不格式化时间戳

java - 运行maven安装失败?

python - 在不使用IIS的情况下将django站点部署到Windows服务器

java - “gpg2”未被识别为内部或外部命令

maven - Java从命令行编译而不是从Maven编译

java - Hibernate:如何使用 CONCAT 和 GROUP_CONCAT

java - 共享首选项无法获取数据

java - JSch 多个隧道/跳跃站

maven - 在哪里指定 Artifactory 发布的存储库元素?