使用webdav将Maven站点部署到nexus

时间:2016-11-07 09:57:10

标签: maven nexus webdav

我无法将网站部署到Nexus。我已经在maven设置中设置了<server>用户名/密码设置,但它仍然无法获取凭据,并且想知道为什么连接到端口80而不是我的Nexus端口8081。

[DEBUG]  configureWagon 
[DEBUG] configureWagon server nexus
[DEBUG] configureWagon server nexus-admin
[DEBUG] repository protocol dav
[DEBUG] found dav protocol so transform to real transport protocol http
[DEBUG] getProxy 'protocol': http no ProxyInfo found
[DEBUG] Mapped url: dav:http://localhost:8081/nexus/content/sites/site/ to relative path: 
[DEBUG] authenticationInfo with id 'nexus-admin': admin
[DEBUG] connect with authenticationInfo and without proxyInfo
[DEBUG] Set parameter http.protocol.cookie-policy = compatibility
http://localhost:8081/nexus/content/sites/site/ - Session: Opened  
[INFO] Pushing C:\work\MavenWork\projectA\target\site
[INFO]    >>> to http://localhost:8081/nexus/content/sites/site/./
[DEBUG] Set parameter http.authentication.preemptive = true
[DEBUG] Set parameter http.socket.timeout = 60000
[DEBUG] HttpConnectionManager.getConnection:  config = HostConfiguration[host=http://localhost], timeout = 0
[DEBUG] Allocating new connection, hostConfig=HostConfiguration[host=http://localhost]
[DEBUG] Preemptively sending default basic credentials
[DEBUG] Authenticating with BASIC <any realm>@localhost:80
[WARNING] Required credentials not available for BASIC <any realm>@localhost:80
[WARNING] Preemptive authentication requested but no default credentials available
[DEBUG] Open connection to localhost:80
[DEBUG] Closing the connection.
[INFO] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
[DEBUG] Connection refused: connect
java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at java.net.Socket.connect(Socket.java:538)
    at java.net.Socket.<init>(Socket.java:434)
    at java.net.Socket.<init>(Socket.java:286)

[DEBUG] configureWagon [DEBUG] configureWagon server nexus [DEBUG] configureWagon server nexus-admin [DEBUG] repository protocol dav [DEBUG] found dav protocol so transform to real transport protocol http [DEBUG] getProxy 'protocol': http no ProxyInfo found [DEBUG] Mapped url: dav:http://localhost:8081/nexus/content/sites/site/ to relative path: [DEBUG] authenticationInfo with id 'nexus-admin': admin [DEBUG] connect with authenticationInfo and without proxyInfo [DEBUG] Set parameter http.protocol.cookie-policy = compatibility http://localhost:8081/nexus/content/sites/site/ - Session: Opened [INFO] Pushing C:\work\MavenWork\projectA\target\site [INFO] >>> to http://localhost:8081/nexus/content/sites/site/./ [DEBUG] Set parameter http.authentication.preemptive = true [DEBUG] Set parameter http.socket.timeout = 60000 [DEBUG] HttpConnectionManager.getConnection: config = HostConfiguration[host=http://localhost], timeout = 0 [DEBUG] Allocating new connection, hostConfig=HostConfiguration[host=http://localhost] [DEBUG] Preemptively sending default basic credentials [DEBUG] Authenticating with BASIC <any realm>@localhost:80 [WARNING] Required credentials not available for BASIC <any realm>@localhost:80 [WARNING] Preemptive authentication requested but no default credentials available [DEBUG] Open connection to localhost:80 [DEBUG] Closing the connection. [INFO] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect [DEBUG] Connection refused: connect java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.<init>(Socket.java:434) at java.net.Socket.<init>(Socket.java:286) 以下是我的POM发行管理:

仅供参考,我正在使用wagon-webdav-jackrabbit 2.10版

<distributionManagement>
        <site>
            <id>nexus-admin</id>
            <url>dav:http://localhost:8081/nexus/content/sites/site/</url>
        </site>
    </distributionManagement>

这是来自Maven settings.xml的我的服务器凭据:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.5.1</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-webdav-jackrabbit</artifactId>
                        <version>2.10</version>
                    </dependency>
                </dependencies>
            </plugin>

0 个答案:

没有答案