首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >上传站点错误:未能传输文件:<site-url>返回代码为: 401 ->

上传站点错误:未能传输文件:<site-url>返回代码为: 401 ->
EN

Stack Overflow用户
提问于 2016-09-29 15:05:29
回答 2查看 518关注 0票数 1

我无法部署由maven站点插件创建的站点。

我遇到了类似于这个问题的错误:Maven site deploy logs filling with [WARNING] Required credentials to nexus 3,但是其中有一条评论说,这个问题是已知的,在这里是报道的,https://issues.sonatype.org/browse/NEXUS-10112,但是这个问题已经结束了。

我遵循了教程project.html,一切都很好,直到第20.6步站点:部署。

我为这个问题找到的唯一“解决方案”是在这里https://benkiew.wordpress.com/2009/11/27/status-code-401-on-mvn-sitedeploy/,但它不起作用。我的settings.xml和pom.xml匹配,所以这不是问题。

settings.xml服务器conf如下所示:

代码语言:javascript
复制
   </servers>
    <server>        
      <id>nexus</id>        
      <username>XXXX</username>
      <password>XXXX</password>
    </server>
   </servers>

以及父pom.xml:

代码语言:javascript
复制
      <site>
          <id>nexus</id>
          <name>service-agents-repository</name>
          <url>dav:https://!URL!/repo/content/sites/agents</url>
      </site>

由nexus提供的id与上面所示的两个不同,但我也尝试使用这个ID,而且我正在写这个问题,所以没有用。mvn站点输出错误:部署

代码语言:javascript
复制
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Services: IoT agents
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Services: IoT agents 1.3.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-site-plugin:3.5.1:deploy (default-cli) @ parent ---
https://!URL!/repo/content/sites/agents/ - Session: Opened
[INFO] Pushing D:\!URL!\target\site
[INFO]    >>> to https://!URL!/repo/content/sites/agents/./
[WARNING] Required credentials not available for BASIC <any realm>@!URL!:443
[WARNING] Preemptive authentication requested but no default credentials available
[INFO] basic authentication scheme selected
[INFO] Failure authenticating with BASIC 'Sonatype Nexus Repository Manager'@!URL!:443
[WARNING] Required credentials not available for BASIC <any realm>@!URL!:443
[WARNING] Preemptive authentication requested but no default credentials available
[INFO] basic authentication scheme selected
[INFO] Failure authenticating with BASIC 'Sonatype Nexus Repository Manager'@!URL!:443
[WARNING] Required credentials not available for BASIC <any realm>@!URL!:443
[WARNING] Preemptive authentication requested but no default credentials available
[WARNING] Required credentials not available for BASIC <any realm>@!URL!:443
[WARNING] Preemptive authentication requested but no default credentials available
[INFO] basic authentication scheme selected
[INFO] Failure authenticating with BASIC 'Sonatype Nexus Repository Manager'@!URL!:443
 Transfer error: java.io.IOException: Unable to create collection: https://!URL!/repo/content/sites/agents/; status code = 401
Uploading: .//apidocs/allclasses-frame.html to https://!URL!/repo/content/sites/agents/

[WARNING] Required credentials not available for BASIC <any realm>@linksmart.eu:443
[WARNING] Preemptive authentication requested but no default credentials available
#########[INFO] basic authentication scheme selected
[INFO] Failure authenticating with BASIC 'Sonatype Nexus Repository Manager'@!URL!:443
https://!URL!/repo/content/sites/agents/./apidocs/allclasses-frame.html - Status code: 401
 Transfer error: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: https://!URL!/repo/content/sites/agents/./apidocs/allclasses-frame.html. Return code is: 401
https://!URL!/repo/content/sites/agents/ - Session: Disconnecting
https://!URL!/repo/content/sites/agents/ - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Services: IoT agents ........................... FAILURE [  2.352 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.661 s
[INFO] Finished at: 2016-09-29T17:04:57+01:00
[INFO] Final Memory: 19M/219M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.5.1:deploy (default-cli) on project parent: Error uploading site: Failed to transfer file: https://!URL!/repo/content/sites/agents/./apidocs/allclasses-frame.html. Return code is: 401 -> [
Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

如果需要更多的信息,请直接问。

谢谢。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-09-30 08:03:42

对这个问题很抱歉。

有错误。问题是Maven指向错误的settings.xml文件而没有获得凭据。因此,这里显示的配置很好。

谢谢。

票数 0
EN

Stack Overflow用户

发布于 2016-09-29 19:27:33

似乎您已经遵循了2的文档。

如果这没有帮助,请让我知道您正在运行的Nexus 3版本,我们对3.0.2和3.0.0中的领域名称做了一些更改,尽管我不认为这是问题所在。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39773884

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档