1:今天第一次使用CC是,console报
解决方法:原因是你的命令行不能执行SVN命令,所以装一个subversion就可以解决了,希望使用的subversion版本新一点,要不然还会报版本过旧的错误。
2.CC整合JDpend时候报:
解决方法:
可以将jdepend-frames.xsl中的xmlns:redirect="org.apache.xalan.lib.Redirect"改成xmlns:redirect="http://xml.apache.org/xalan/redirect"。
3.CC整合checkstyle时报:
报1:
failed to create task or type checkstyle
解决方法:是由于没有把checkstyle.jar包放进Ant的lib目录,导入包即可。
报2:
unable to create a Checker : cannot initialize module Packagehtml
解决方法:以下方法出自(http://bbs.scmroad.com/viewthread.php?tid=828)
我google这个错误的信息,得到以下的一些帮助内容.
http://checkstyle.sourceforge.net/5.x/config_javadoc.html#JavadocPackage
JavadocPackage
Description
Checks that each Java package has a Javadoc comment. By default it only allows a package-info.java file, but can be configured to allow a package.html file.
An error will be reported if both files exist as this is not allowed by the Javadoc tool.
经上边的提示,我打开sun_checks.xml文件
把检查package.html文件是否存在的一句给注释掉了.
<!-- Checks that a package.html file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
<!--注释掉下边这句
<module name="PackageHtml"/>
-->
报3:
unable to create a Checker : cannot initialize module TreeWalker TreeWalker is not allowed as a parent of Filelength
解决方法:
在<module name="TreeWalker"> 下加一个子module:
4.CC 整合 javadoc生成API文档时:
如果在ant输出发现很多乱码,并且在${javadocs.dir}没有相应的API文档生成,需要在<javadoc>里加上属性charset="UTF-8" encoding="UTF-8",其中的编码可以自己设置。
net.sourceforge.cruisecontrol.CruiseControlException: svn failed with exception
at net.sourceforge.cruisecontrol.util.CommandExecutor.executeAndWait(Com
mandExecutor.java:115)
at net.sourceforge.cruisecontrol.util.Commandline.executeAndWait(Command
line.java:617)
at net.sourceforge.cruisecontrol.bootstrappers.SVNBootstrapper.bootstrap
(SVNBootstrapper.java:134)
at net.sourceforge.cruisecontrol.Project.bootstrap(Project.java:760)
at net.sourceforge.cruisecontrol.Project.build(Project.java:192)
解决方法:原因是你的命令行不能执行SVN命令,所以装一个subversion就可以解决了,希望使用的subversion版本新一点,要不然还会报版本过旧的错误。
2.CC整合JDpend时候报:
javax.xml.transform.TransformException:java.lang.RuntimeException:
Unrecognized XSLTC extension 'org.apache.xalan.lib.Redirect:write'
解决方法:
可以将jdepend-frames.xsl中的xmlns:redirect="org.apache.xalan.lib.Redirect"改成xmlns:redirect="http://xml.apache.org/xalan/redirect"。
3.CC整合checkstyle时报:
报1:
failed to create task or type checkstyle
解决方法:是由于没有把checkstyle.jar包放进Ant的lib目录,导入包即可。
报2:
unable to create a Checker : cannot initialize module Packagehtml
解决方法:以下方法出自(http://bbs.scmroad.com/viewthread.php?tid=828)
我google这个错误的信息,得到以下的一些帮助内容.
http://checkstyle.sourceforge.net/5.x/config_javadoc.html#JavadocPackage
JavadocPackage
Description
Checks that each Java package has a Javadoc comment. By default it only allows a package-info.java file, but can be configured to allow a package.html file.
An error will be reported if both files exist as this is not allowed by the Javadoc tool.
经上边的提示,我打开sun_checks.xml文件
把检查package.html文件是否存在的一句给注释掉了.
<!-- Checks that a package.html file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
<!--注释掉下边这句
<module name="PackageHtml"/>
-->
报3:
unable to create a Checker : cannot initialize module TreeWalker TreeWalker is not allowed as a parent of Filelength
解决方法:
在<module name="TreeWalker"> 下加一个子module:
<module name="FileContentsHolder">
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CSOFF ([\w\|]+)"/>
<property name="onCommentFormat" value="CSON ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>
</module>
4.CC 整合 javadoc生成API文档时:
如果在ant输出发现很多乱码,并且在${javadocs.dir}没有相应的API文档生成,需要在<javadoc>里加上属性charset="UTF-8" encoding="UTF-8",其中的编码可以自己设置。
<target name="javadoc" description="creates the API documentation">
<delete dir="${javadocs.dir}"/>
<mkdir dir="${javadocs.dir}"/>
<javadoc packagenames="ccl.*" source="1.5" sourcepath="src" defaultexcludes="yes" destdir="${javadocs.dir}" charset="UTF-8" encoding="UTF-8"
author="true" version="true" use="true" windowtitle="Spring Componentlibrary Docs API" access="private" useexternalfile="yes"
overview="ci/javadoc/overview.html" maxmemory="256m">
<doctitle><![CDATA[<h1>Spring ComponentLibrary JavaDocs API</h1>]]></doctitle>
<bottom><![CDATA[<i>${app.copyright}</i>]]></bottom>
<classpath refid="all-libs"/>
</javadoc>
</target>