Ask Your Question
0

Checkstyle violations for the empty project

asked 2015-09-20 23:50:40 -0700

tripaam gravatar image

Hi, I am getting checkstyle error after creating a new project as yang-push using the archetype present at https://wiki.opendaylight.org/view/OpenDaylightController:MD-SAL:StartupProjectArchetype#Checkforbasicfunctioning.

Also tried the -DskipTests=true and -Dcheckstyle.skip=true. No help.

Is there any way to solve it?

[INFO] There are 2 checkstyle errors. [ERROR] src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/yang-push/impl/rev141210/Yang-pushModule.java[15:5] (extension) TreeWalker: Got an exception - expecting EOF, found '}' [ERROR] src/main/java/org/opendaylight/yang-push/impl/Yang-pushProvider.java[23:5] (extension) TreeWalker: Got an exception - expecting EOF, found '}' [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] yang-push-api ...................................... SUCCESS [ 25.448 s] [INFO] yang-push-impl ..................................... FAILURE [ 7.178 s] [INFO] yang-push-features ................................. SKIPPED [INFO] yang-push-karaf .................................... SKIPPED [INFO] yang-push-artifacts ................................ SKIPPED [INFO] yang-push .......................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 39.796 s [INFO] Finished at: 2015-09-21T12:13:25+05:30 [INFO] Final Memory: 47M/353M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.14:check (default) on project yang-push-impl: You have 2 Checkstyle violations. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.14:check (default) on project yang-push-impl: You have 2 Checkstyle violations. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286) at org.apache.maven.cli.MavenCli.main(MavenCli.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoFailureException: You have 2 Checkstyle violations. at org.apache.maven.plugin.checkstyle.CheckstyleViolationCheckMojo.execute(CheckstyleViolationCheckMojo.java:582) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 20 more [ERROR] [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/MojoFailureException [ERROR] [ERROR] After ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-09-21 03:46:43 -0700

Denis gravatar image

Correct the code so that it fits the checkstyle rules. The error message shows, where to find the typo..

 [ERROR] src/main/java/org/opendaylight/yang-push/impl/Yang-pushProvider.java[23:5]

Check line 23 in the mentioned class

edit flag offensive delete publish link more

Comments

The issue i found in class name not allowed with "-". When i replaced Yang-pushProvider with YangpushProvider, the issue got resolved. i think this is a bug in archetype.

tripaam ( 2015-09-21 22:17:26 -0700 )edit
0

answered 2015-09-21 07:46:19 -0700

faizan gravatar image

what about " src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/yang-push/impl/rev141210/Yang-pushModule.java[15:5] (extension) TreeWalker: Got an exception - expecting EOF, found '}' [ERROR] " did you look at it ?

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2015-09-20 23:50:40 -0700

Seen: 164 times

Last updated: Sep 21 '15