Status code 401 on mvn site:deploy?

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

  1. check your pom.xml if the site-id in the distribution-section of the pom.xml matches any server-id setting in your settings.xml.
  2. 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>

How to recover a wand password in Opera?

I found this cool solution.

http://operawiki.info/PowerButtons#retrievewand

a) Add a javascript-based button to your toolbar.
b) Navigate to the site, where you want to retrieve your wand password.
c) Click the button (from step a) and an alert-window will show you the desired password.

maven-surefire-plugin only uses 67MB of heap?

Today iĀ  had to do some merging of artifacts (code and pom.xml). Then i wondered, why the tests didn’t run properly.

java.lang.OutOfMemoryError: Java heap space” was the reason. But why? I didn’t change the tests and i carefully merged the configuration. So i connected VisualVM to the surefire process and saw that only ca. 67MB max heap were available. I reviewed my MAVEN_OPTS, but my settings didn’t apply…

The culprit is a bug. See http://jira.codehaus.org/browse/SUREFIRE-501.

The workaround is to place your max heap configuration in the configuration section of the plugin. As seen in the linked bug issue:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <!-- http://jira.codehaus.org/browse/SUREFIRE-501 -->
    <argLine>-Xmx256m</argLine>
  </configuration>
</plugin>