2012-07-17 108 views
1

執行「mvn site」命令時出現「生成頁面時出錯」的構建錯誤。如果有人遇到此錯誤,請告訴我如何解決此問題。執行「mvn site」命令時出現「生成頁面時出現錯誤」的構建錯誤

我沒有得到這個錯誤,當我從POM中刪除以下插件的詳細信息。

<groupId>org.apache.maven.plugins</groupId> 

<artifactId>maven-javadoc-plugin</artifactId> 

<version>2.7</version> 

<configuration> 

<charset>UTF-8</charset> 

<docencoding>UTF-8</docencoding> 

<docfilessubdirs>true</docfilessubdirs> 

<links> 

    <link>http://java.sun.com/j2se/1.5.0/docs/api/</link> 

</links> 

<source>1.5</source> 

<show>protected</show> 

</configuration> 

以下是我得到的輸出。

[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD ERROR 
[INFO] ------------------------------------------------------------------------ 
[INFO] Error during page generation 

Embedded error: Error rendering Maven report: Exit code: 1 - java.lang.IllegalArgumentException 
at sun.net.www.ParseUtil.decode(ParseUtil.java:189) 
at sun.misc.URLClassPath$FileLoader.<init>(URLClassPath.java:958) 
at sun.misc.URLClassPath$3.run(URLClassPath.java:328) 
at java.security.AccessController.doPrivileged(Native Method) 
at sun.misc.URLClassPath.getLoader(URLClassPath.java:322) 
at sun.misc.URLClassPath.getLoader(URLClassPath.java:299) 
at sun.misc.URLClassPath.findResource(URLClassPath.java:145) 
at java.net.URLClassLoader$2.run(URLClassLoader.java:385) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.net.URLClassLoader.findResource(URLClassLoader.java:382) 
at java.lang.ClassLoader.getResource(ClassLoader.java:1002) 
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1192) 
at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:96) 
at java.security.AccessController.doPrivileged(Native Method) 
at javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport.java:89) 
at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:250) 
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223) 
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:128) 
at com.sun.tools.doclets.internal.toolkit.builders.LayoutParser.parseXML(LayoutParser.java:72) 
at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(ClassBuilder.java:108) 
at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:155) 
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:164) 
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:106) 
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64) 
at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42) 
at com.sun.tools.doclets.standard.Standard.start(Standard.java:23) 
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:597) 
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269) 
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143) 
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340) 
at com.sun.tools.javadoc.Start.begin(Start.java:128) 
at com.sun.tools.javadoc.Main.execute(Main.java:41) 
at com.sun.tools.javadoc.Main.main(Main.java:31) 
com.sun.tools.doclets.internal.toolkit.util.DocletAbortException 
at com.sun.tools.doclets.internal.toolkit.builders.LayoutParser.parseXML(LayoutParser.java:79) 
at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(ClassBuilder.java:108) 
at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:155) 
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:164) 
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:106) 
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64) 
at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42) 
at com.sun.tools.doclets.standard.Standard.start(Standard.java:23) 
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:597) 
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269) 
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143) 
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340) 
at com.sun.tools.javadoc.Start.begin(Start.java:128) 
at com.sun.tools.javadoc.Main.execute(Main.java:41) 
at com.sun.tools.javadoc.Main.main(Main.java:31) 
com.sun.tools.doclets.internal.toolkit.util.DocletAbortException 
at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:159) 
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:164) 
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:106) 
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64) 
at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42) 
at com.sun.tools.doclets.standard.Standard.start(Standard.java:23) 
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:597) 
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269) 
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143) 
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340) 
at com.sun.tools.javadoc.Start.begin(Start.java:128) 
at com.sun.tools.javadoc.Main.execute(Main.java:41) 
at com.sun.tools.javadoc.Main.main(Main.java:31) 

Command line was:"C:\Program Files\Java\jdk1.6.0_26\jre\..\bin\javadoc.exe" @options @packages 
[INFO] ------------------------------------------------------------------------ 
[INFO] For more information, run Maven with the -e switch 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 3 minutes 43 seconds 
[INFO] Finished at: Mon Jul 16 15:09:01 IST 2012 
[INFO] Final Memory: 67M/170M 
[INFO] ------------------------------------------------------------------------ 
+0

我得到相同的錯誤。你有沒有設法解決它? – noMAD 2012-09-28 16:55:54

回答

-1

我有相同的錯誤,並通過刪除CLASSPATH環境變量解決它。看起來類路徑條目在執行「jar」目標時破壞了maven-javadoc-plugin。

+1

請嘗試詳細說明(完整)您的答案,感覺像未完成。所以你的答案可以更容易理解。 – 2014-11-06 09:51:58