我正在尝试通过以下位置的文章来构建CDAP源代码 -
https://github.com/caskdata/cdap
但是当我尝试使用mvn clean包时,它会给出构建错误 -
.
.
kConfigurer.java:69: First sentence should end with a period.
C:\Users\admin\cdap\cdap-api\src\main\java\co\cask\cdap\api\workflow\WorkflowForkNode.java:21: First sentence should end with a period.
C:\Users\admin\cdap\cdap-api\src\main\java\co\cask\cdap\api\workflow\WorkflowSpecification.java:30: First sentence should end with a period.
C:\Users\admin\cdap\cdap-api\src\main\java\co\cask\cdap\api\workflow\WorkflowToken.java:22: First sentence should end with a period.
Audit done.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Cask Data Application Platform (CDAP) ............. SUCCESS [1:52.768s]
[INFO] CDAP API .......................................... FAILURE [1:03.487s]
[INFO] CDAP Watchdog API ................................. SKIPPED
[INFO] CDAP Protocol ..................................... SKIPPED
[INFO] CDAP Build Common ................................. SKIPPED
[INFO] CDAP Common ....................................... SKIPPED
[INFO] CDAP Notifications APIs ........................... SKIPPED
[INFO] CDAP Explore Client ............................... SKIPPED
[INFO] CDAP Data-Fabric .................................. SKIPPED
[INFO] CDAP Watchdog ..................................... SKIPPED
[INFO] CDAP Notifications ................................ SKIPPED
[INFO] CDAP HBase 0.96 Compatibility ..................... SKIPPED
[INFO] CDAP Data-Fabric Tests ............................ SKIPPED
[INFO] CDAP Java Client .................................. SKIPPED
[INFO] CDAP Test Framework ............................... SKIPPED
[INFO] CDAP App-Fabric ................................... SKIPPED
[INFO] CDAP Explore JDBC Driver .......................... SKIPPED
[INFO] CDAP Explore ...................................... SKIPPED
[INFO] CDAP Unit Test Framework .......................... SKIPPED
[INFO] CDAP CLI .......................................... SKIPPED
[INFO] CDAP Security ..................................... SKIPPED
[INFO] CDAP Gateway ...................................... SKIPPED
[INFO] CDAP UI ........................................... SKIPPED
[INFO] CDAP Standalone ................................... SKIPPED
[INFO] CDAP Java Client Tests ............................ SKIPPED
[INFO] CDAP CLI Tests .................................... SKIPPED
[INFO] CDAP Kafka Server ................................. SKIPPED
[INFO] CDAP HBase 0.94 Compatibility ..................... SKIPPED
[INFO] CDAP HBase 0.98 Compatibility ..................... SKIPPED
[INFO] CDAP Master ....................................... SKIPPED
[INFO] CDAP Distributions ................................ SKIPPED
[INFO] CDAP Application Archetypes ....................... SKIPPED
[INFO] CDAP Spark Java Archetype ......................... SKIPPED
[INFO] CDAP Spark Scala Archetype ........................ SKIPPED
[INFO] CDAP Application Archetype ........................ SKIPPED
[INFO] CDAP Integration Test Framework ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:35.198s
[INFO] Finished at: Sat May 23 18:56:07 IST 2015
[INFO] Final Memory: 27M/100M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-
plugin:2.12.1:check (validate) on project cdap-api: Failed during checkstyle execution:
There are 68 checkstyle errors. -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :cdap-api C:\Users\admin\cdap>
请说明导致此构建失败的原因。
此致
答案 0 :(得分:1)
kConfigurer.java:69:第一句应以句号结束。
C:\ Users \ admin \ cdap \ cdap-api \ src \ main \ java \ co \ cask \ cdap \ api \ workflow \ WorkflowForkNode.java:21:第一句应以句号结尾。
C:\ Users \ admin \ cdap \ cdap-api \ src \ main \ java \ co \ cask \ cdap \ api \ workflow \ WorkflowSpecification.java:30:第一句应以句号结束。
C:\ Users \ admin \ cdap \ cdap-api \ src \ main \ java \ co \ cask \ cdap \ api \ workflow \ WorkflowToken.java:22:第一句应以句号结束。
我认为在第69行的类kConfigurer.java中,注释中的第一句应以句号结束。
与其他3个陈述类似。
结帐
"First sentence should end with a period."
或
http://apps.topcoder.com/forums/?module=Thread&threadID=505624&start=0&mc=9
如果你感到困惑。
Checkstyle主要在那里,所以你的代码看起来是统一的,所以要注意它经常这样做。值得庆幸的是,它通常很容易修复。
答案 1 :(得分:1)
此错误表示checkstyle存在问题,其中带有注释的第一行不会以突出显示的行上的句点结尾。但是对于这个项目而言,我没有看到任何错误来自开发。
1)你不是从开发分支建设?
2)您是否修改了suppressions.xml文件? - suppressions.xml第30行已禁用此检查&lt;抑制检查=&#34; JavadocStyle&#34;文件=&#34; / SRC /(主|积分)/ JAVA /.&#34。 /&gt;。因此,除非您修改了该文件,否则您不应该看到此特定的checkstyle错误。
3)项目中没有名为kConfigurer.java的文件。也许最好在尝试之前删除与CDAP无关的所有文件。
谢谢,
SREE