[原创]Cruisecontrol, Ant, Checkstyle集成
来源:配置管理之路(http://bbs.scmroad.com) 作者:laofo
首先我们到Cruisecontrol的官方网址,看看在Cruisecontrol中集成checkstyle的信息
http://confluence.public.thoughtworks.org/display/CC/CheckStyle
这里讲述了集成的三个步骤
Step 1 - Add CheckStyle to your ant build
(在Ant构建中加入CheckStyle的task)
Step 2 - Merge the output file into the log
(在Cruisecontro中把checkstyle的输出合并到Cruisecontrol的log文件中)
Step 3 - Enable the CheckStyle page in the web application
(在Cruisecontrol的web应用中启用Checkstyle页面)
其中第一点,我们已经做完了,你可以到这里找相应的文档.
Ant下使用checkstyle全攻略
http://bbs.scmroad.com/viewthread.php?tid=828&extra=page%3D1
第二点,我们只需要到Cruisecontrol中,相应项目的log部分,添加入以下的代码
<log>
<merge dir="projects/${project.name}/target/test-results"/>
<merge dir="projects/${project.name}/target/check-results"/>
</log>
第三点,我们按照官方的指示去做就可以了.
In the CruiseControl webapps directory, there is a file called main.jsp which we need to edit. Locate the section of code that creates a new tabrow which has been commented out. As part of the new tabrow, there is a tab for CheckStyle which calls the checkstyle.jsp. Uncomment the section of code that you want. Note that there is also a section of code that creates a tab for PMD that we do not need for this.
Rebuild the web application and redeploy it.
class="code-java" <%--
<cruisecontrol:tabrow/>
<cruisecontrol:tab name="checkstyle" label="CheckStyle">
<%@ include file="checkstyle.jsp" %>
</cruisecontrol:tab>
<cruisecontrol:tab name="pmd" label="PMD">
<%@ include file="pmd.jsp" %>
</cruisecontrol:tab>
--%>
第三部分启用Checkstyle页面,事实上这部分在Cruisecontrol中已经写好了,你只要找到相应的页面main.jsp,去掉注释就可以了.
转载请注明出处.欢迎大家来配置管理之路(scmroad.com)一起讨论软件配置管理的方方面面.谢谢.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
做到这里我们已经在Cruisecontrol中成功的集成了ant, svn, checkstyle