`
ihyperwin
  • 浏览: 434737 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar

 
阅读更多
用maven编译项目报错,不是项目问题,如下:
具体报错:
Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar (attach-javadocs) on project ****: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - java.lang.IllegalArgumentException
[ERROR] at sun.net.www.ParseUtil.decode(ParseUtil.java:189) (http://www.ParseUtil.decode%28ParseUtil.java:189%29)
[ERROR] at sun.misc.URLClassPath$FileLoader.<init>(URLClassPath.java:958)
[ERROR] at sun.misc.URLClassPath$3.run(URLClassPath.java:328)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at sun.misc.URLClassPath.getLoader(URLClassPath.java:322)
[ERROR] at sun.misc.URLClassPath.getLoader(URLClassPath.java:299)
[ERROR] at sun.misc.URLClassPath.findResource(URLClassPath.java:145)
[ERROR] at java.net.URLClassLoader$2.run(URLClassLoader.java:385)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findResource(URLClassLoader.java:382)
[ERROR] at java.lang.ClassLoader.getResource(ClassLoader.java:1002)
[ERROR] at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1192)
[ERROR] at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:96)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport.java:89)
[ERROR] at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:250)
[ERROR] at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223)
[ERROR] at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:128)
[ERROR] at com.sun.tools.doclets.internal.toolkit.builders.LayoutParser.parseXML(LayoutParser.java:72)
[ERROR] at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(ClassBuilder.java:108)
[ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:155)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:164)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:106)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)
[ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
[ERROR] at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
[ERROR] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
[ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:128)
[ERROR] at com.sun.tools.javadoc.Main.execute(Main.java:41)
[ERROR] at com.sun.tools.javadoc.Main.main(Main.java:31)
[ERROR] com.sun.tools.doclets.internal.toolkit.util.DocletAbortException
[ERROR] at com.sun.tools.doclets.internal.toolkit.builders.LayoutParser.parseXML(LayoutParser.java:79)
[ERROR] at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(ClassBuilder.java:108)
[ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:155)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:164)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:106)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)
[ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
[ERROR] at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
[ERROR] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
[ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:128)
[ERROR] at com.sun.tools.javadoc.Main.execute(Main.java:41)
[ERROR] at com.sun.tools.javadoc.Main.main(Main.java:31)
[ERROR] com.sun.tools.doclets.internal.toolkit.util.DocletAbortException
[ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:159)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:164)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:106)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)
[ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
[ERROR] at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
[ERROR] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
[ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:128)
[ERROR] at com.sun.tools.javadoc.Main.execute(Main.java:41)
[ERROR] at com.sun.tools.javadoc.Main.main(Main.java:31)
[ERROR]
[ERROR] Command line was: D:\jdk\bin\javadoc.exe @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '***\target\apidocs' dir.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

经查找,发现错误原因如下:
classpath配置有误,有一段配置出错(系统环境变量)  在windows中就是 我的电脑-属性-高级-环境变量
linux中 可以 echo $CLASSPATH查看


此种报错,一般都是classpath的问题


参考网址:http://www.blogjava.net/Man/archive/2010/08/11/328513.html
http://mail-archives.apache.org/mod_mbox/maven-users/200802.mbox/%3C88c1b40802070425t44cb46a4w9c4314c282b2220a@mail.gmail.com%3E


分享到:
评论
3 楼 goycejin 2014-12-26  
感谢楼主,我也要及笔记了,这记性
2 楼 ZZtiWater 2013-12-23  
如果在Linux下改classpathde 路径的话,应该改成什么?求指教         
1 楼 ihyperwin 2012-12-23  
后记:今天再次验证到了这个方法是对的,就是classpath的问题。用google搜索到了自己的博客解决了问题,汗。所以好记性,不如烂笔头。

相关推荐

Global site tag (gtag.js) - Google Analytics