Home » Java » java – Deploy Maven Site failing with Connection Refused-Exceptionshub

java – Deploy Maven Site failing with Connection Refused-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I’m new to hosting project documentation and I’m trying to host a maven site with project details and code documentation.

My mvn site is working fine and I can open the target/site/index.html and navigate correctly.

Now I’m trying to deploy the site using mvn site:deploy but my deploy is failing with

Error uploading site: Connection refused -> [Help 1]

[INFO]    >>> to http://127.0.0.1/sites/./
[INFO] I/O exception (java.net.ConnectException) caught when processing request: Connection refused
[INFO] Retrying request
[INFO] I/O exception (java.net.ConnectException) caught when processing request: Connection refused
[INFO] Retrying request
[INFO] I/O exception (java.net.ConnectException) caught when processing request: Connection refused
[INFO] Retrying request
[INFO] I/O exception (java.net.ConnectException) caught when processing request: Connection refused
[INFO] Retrying request
[INFO] I/O exception (java.net.ConnectException) caught when processing request: Connection refused
[INFO] Retrying request
[INFO] I/O exception (java.net.ConnectException) caught when processing request: Connection refused
[INFO] Retrying request
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------

in settings.xml I have

    <servers>
        <server>
            <id>testserver</id>
            <username>test</username>
            <password>test</password>
        </server>
    </servers>

and my pom has

        <site>
            <id>testserver</id>
            <url>dav:http://127.0.0.1/sites/</url>
        </site>
    </distributionManagement>
    <build>
    <extensions>
        <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-webdav-jackrabbit</artifactId>
                <version>2.10</version>
        </extension>
    </extensions>
    </build>
    <plugins>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.8.2</version>
      </plugin>
    </plugins>

What Am I doing wrong? I do not have any local jetty or tomcat server running. Do I need that? Can someone explain the best way to do all these connections and dependencies to deploy maven site?

How to&Answers: