javadoc生成文档时总是报java.lang.IllegalArgumentException错误

 javadoc生成文档时总是报java.lang.IllegalArgumentException错误,是classpath里面字符冲突引起 的。我在classpath中包含了%JAVA_HOME%\lib;解决方法是重新设置classpath或者删除classpath.要注意设置完成 后重启下cmd或者editplus,重启后生效!
  
  见官方参考文档 http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html
  
   You are on Windows XP with Sun JDK 5 or JDK 6 freshly installed, and when you run mvn javadoc:javadoc, you are stick by an sun.net.www.ParseUtil.decode() exception like this one.
  
  ...
  [INFO] ------------------------------------------------------------------------
  [ERROR] BUILD ERROR
  [INFO] ------------------------------------------------------------------------
  [INFO] An error has occurred in JavaDocs report generation:Exit code: 1 - java.lang.IllegalArgumentException
   at sun.net.www.ParseUtil.decode(ParseUtil.java:189)
   at sun.misc.URLClassPath$FileLoader.(URLClassPath.java:953)
   at sun.misc.URLClassPath$3.run(URLClassPath.java:326)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.misc.URLClassPath.getLoader(URLClassPath.java:320)
   at sun.misc.URLClassPath.getLoader(URLClassPath.java:297)
   at sun.misc.URLClassPath.findResource(URLClassPath.java:144)
   at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findResource(URLClassLoader.java:359)
   at java.lang.ClassLoader.getResource(ClassLoader.java:977)
   at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)
   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)
  
   Command line was:C:\Java\jdk1.6.0_03\jre\..\bin\javadoc.exe @options @packages
   ...
  
  Your CLASSPATH environement variable is probably corrupted, i.e. something like:
  
  CLASSPATH=.;C:\Java\jdk1.6.0_03\jre\lib\ext\QTJava.zip;%JAVAHOME%
  
  with %JAVAHOME% not a valid environment variable.
  
  To resolve it, just reset the CLASSPATH environement variable, i.e.:
  
  set CLASSPATH=
  
  or set a new CLASSPATH environement variable, i.e.:
  
  set CLASSPATH=C:\Java\jdk1.6.0_03\jre\lib\ext\QTJava.zip
  
  or fix the wrong environment variable.

你可能感兴趣的:(maven)