> Doxia 1.2 is not used...
I had problems with the site plugin 3.0-beta-3, so I tried beta-4-SNAPSHOT.
> Is this a regression?
Probably. My guess is that recent code changes unveiled a whole set of errors.
> where does this image come from...
The image comes from the folder src/site/resources/images/
I'm not the maintainer of the project, so I have no idea how Doxia includes the image. All I have is the error message and the filename. I can't see any reference to the image in site.xml, so it must be included from somewhere else, probably the skin.
> Is it documented somewhere that image/file references...?
A URL can contain only some characters. See http://www.blooberry.com/indexdot/html/topics/urlencoding.htm for a pretty good explanation.
File names on Unix can contain anything except "/" (slash) and 0-bytes.
So if you accept Unix file names anywhere in Doxia, you must escape them as soon as they are converted to URLs and you must unescape them when they are converted back to file names.
My suggestion is a new type which can be both and which has accessor methods to get a OS-specific path or a RFC-compliant URL and to get rid of the type String as soon as you can to make sure you don't have any gaps in the chain.
In an external project, there are image files which contain spaces. Instead of replacing the spaces with %20 or calling java.net.URLEncoder.encode(), Doxia tries to call new java.net.URL("images/The ExTeX Project.png" which fails.
I tried a fix but couldn't get it to work in a couple of hours. The problem is that you use a lot of Strings when you should be using URLs (or at least a URL-like type). Without such a type, it's impossible to know when a URL must be encoded/decoded.
Example stacktrace:
Caused by: java.lang.IllegalArgumentException at java.net.URI.create(URI.java:842) at org.apache.maven.doxia.site.decoration.inheritance.URIPathDescriptor.<init>(URIPathDescriptor.java:69) at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.rebaseLink(DefaultDecorationModelInheritanceAssembler.java:361) at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.rebaseBannerPaths(DefaultDecorationModelInheritanceAssembler.java:162) at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.assembleModelInheritance(DefaultDecorationModelInheritanceAssembler.java:61) at org.apache.maven.doxia.tools.DefaultSiteTool.getDecorationModel(DefaultSiteTool.java:1221) at org.apache.maven.doxia.tools.DefaultSiteTool.getDecorationModel(DefaultSiteTool.java:458) at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.createSiteRenderingContext(AbstractSiteRenderingMojo.java:285) at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:140) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:124) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) ... 20 more Caused by: java.net.URISyntaxException: Illegal character in path at index 10: images/The ExTeX Project.png at java.net.URI$Parser.fail(URI.java:2809) at java.net.URI$Parser.checkChars(URI.java:2982) at java.net.URI$Parser.parseHierarchical(URI.java:3066) at java.net.URI$Parser.parse(URI.java:3024) at java.net.URI.<init>(URI.java:578) at java.net.URI.create(URI.java:840) ... 30 more