Monday, 23 August 2010

Archiva gives the maven site plugin an invalid site_en.xml

I got the following nasty error since friday:

$ mvn -U -e -X clean site
[DEBUG] Reading site descriptor from /home/amanica/.m2/repository/za/co/my_company/super-pom/1.0.3/super-pom-1.0.3-site_en.xml
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] SiteToolException: Error parsing site descriptor

Expected root element 'project' but found 'html' (position: START_TAG seen ... Transitional//EN" "">\r\n<html>... @8:7)
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: SiteToolException: Error parsing site descriptor
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
at org.apache.maven.DefaultMaven.doExecute(
at org.apache.maven.DefaultMaven.execute(
at org.apache.maven.cli.MavenCli.main(
at org.apache.maven.cli.compat.CompatibleMain.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.codehaus.classworlds.Launcher.launchEnhanced(
at org.codehaus.classworlds.Launcher.launch(
at org.codehaus.classworlds.Launcher.mainWithExitCode(
at org.codehaus.classworlds.Launcher.main(
Caused by: org.apache.maven.plugin.MojoExecutionException: SiteToolException: Error parsing site descriptor
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
... 17 more
Caused by: Error parsing site descriptor
... 21 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Expected root element 'project' but found 'html' (position: START_TAG seen ... Transitional//EN" "">\r\n<html>... @8:7)

It turns out that maven looks for a site_en.xml for my parent project on archiva and archiva seems to generate a return file which is actually an error message.
The maven site plugin then tries to parse it and fails horribly :(
I worked around this by just adding the following content to src/site/site_en.xml in my parent project and everything was well!

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""

I got really frustrated by this cryptic error message. I wanted to bash my head against the table and throw my laptop against the wall. Instead I cried out to God and not long after that I figured it out. Some would say thats just coincidence, I say: "Thank God", "Praise God" and "Why didn't I ask You sooner?".

Friday, 20 August 2010

Chromium happy again

After getting the message below on each chromium start for months, I finally googled it:

Your profile could not be opened correctly.
Some features may be unavailable.
Please check that the profile exists and you have permission to read and write its contents.

The solution for me was simple:
rm ~/.config/chromium/Default/History

I can't believe I suffered so long with a broken awesomebar which never found new history :(
Previously I assumed its something broken in chromium that would get fixed by a newer Ubuntu packages. The fix never came so I'm really happy that I finally found the solution today:
see Ariel's solution.