Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.1.4
-
None
-
Windows XP, Java 1.6, Maven 3
Description
I am using the snippet macro to produce my sites documentation, however if there is a trailling space after the closing "}", the snippet macro cannot find the file.
For example this works:
"%{snippet|id=myid|file=src/main/resources/myfile.xml}"
Whereas this generates an error:
"%{snippet|id=myid|file=src/main/resources/myfile.xml} "
The error being:
Caused by: java.io.FileNotFoundException: D:\Development\Projects\XXX\src\main\resources\myfile.xml} (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileInputStream.<init>(FileInputStream.java:66) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161) at java.net.URL.openStream(URL.java:1007) at org.apache.maven.doxia.macro.snippet.SnippetReader.readLines(SnippetReader.java:126) at org.apache.maven.doxia.macro.snippet.SnippetReader.readSnippet(SnippetReader.java:66) at org.apache.maven.doxia.macro.snippet.SnippetMacro.getSnippet(SnippetMacro.java:165) at org.apache.maven.doxia.macro.snippet.SnippetMacro.execute(SnippetMacro.java:118) at org.apache.maven.doxia.parser.AbstractParser.executeMacro(AbstractParser.java:79) at org.apache.maven.doxia.module.apt.AptParser$MacroBlock.traverse(AptParser.java:2924) at org.apache.maven.doxia.module.apt.AptParser.traverseSectionBlocks(AptParser.java:862) at org.apache.maven.doxia.module.apt.AptParser.traverseSection(AptParser.java:808) at org.apache.maven.doxia.module.apt.AptParser.traverseSection(AptParser.java:817) at org.apache.maven.doxia.module.apt.AptParser.traverseBody(AptParser.java:759) at org.apache.maven.doxia.module.apt.AptParser.parse(AptParser.java:229) at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:63) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:410) at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:53) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:330) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:134) at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:154) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:118) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)