我正在使用 maven site-deploy
命令。我正在使用 maven 2.2.1
和 jdk 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/