项目分布管理中缺少站点信息spring-swagger-wordnik-client

Missing site information in the distribution management of the project spring-swagger-wordnik-client

我正在尝试为我的项目创建 Maven 存储库。

我项目的 pom.xml 文件中的相关行是:

<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>edu.mills.cs180a</groupId>
    <artifactId>spring-swagger-wordnik-client</artifactId>
    <packaging>jar</packaging>
    <name>spring-swagger-wordnik-client</name>
    <version>0.0.2A-SNAPSHOT</version>
...
  <distributionManagement>
    <repository>
      <id>CS180A site</id>
      <url>file:///C:/Users/ellen/Dropbox/Apps/site44/www.spertus.com/cs180a</url>
    </repository>
  </distributionManagement>
...
  <build> 
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.7.1</version>
      </plugin>
    ...
    </plugins>
</project>

我在尝试部署站点时遇到此错误:

$ mvn site:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] -----------< edu.mills.cs180a:spring-swagger-wordnik-client >-----------
[INFO] Building spring-swagger-wordnik-client 0.0.2A-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-site-plugin:3.7.1:deploy (default-cli) @ spring-swagger-wordnik-client ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.055 s
[INFO] Finished at: 2020-11-11T15:24:38-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7.1:deploy (default-cli) on project spring-swagger-wordnik-client: Missing site information in the distribution management of the project spring-swagger-wordnik-client (edu.mills.cs180a:spring-swagger-wordnik-client:0.0.2A-SNAPSHOT) -> [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

我不明白为什么会出现此错误:

 Missing site information in the distribution management of the project spring-swagger-wordnik-client

分销管理除了这个还应该有什么?

  <distributionManagement>
    <repository>
      <id>CS180A site</id>
      <url>file:///C:/Users/ellen/Dropbox/Apps/site44/www.spertus.com/cs180a</url>
    </repository>
  </distributionManagement>

查看您的配置,您需要按照此处的说明在 distributionManagement 中添加元素:https://maven.apache.org/plugins/maven-site-plugin/usage.html