Status code 401 on mvn site:deploy?
27/11/2009
Leave a comment
Are you faced to a 401 status code when invoking mvn site:deploy?
Like this one?
Embedded error: Failed to transfer file: http://server:port/dir/projectname//./changes-report.html. Return code is: 401
Then
- check your pom.xml if the site-id in the distribution-section of the
pom.xmlmatches any server-id setting in yoursettings.xml. - check if the password is still valid!
For example the following pom.xml and settings.xml DO NOT match. Note the difference between BARNAME and FOONAME! This cannot work.
pom.xml:
<distributionManagement>
<site>
<!-- does not match FOONAME -->
<id>BARNAME</id>
<url>${site-base-url}/projectname/</url>
</site>
</distributionManagement>
.m2/settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings 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/xsd/settings-1.0.0.xsd">
<servers>
<server>
<!-- does not match BARNAME -->
<id>FOONAME</id>
<username>XXXXXX</username>
<password>XXXXXX</password>
</server>
</servers>
</settings>
Recent Comments