Ask Your Question
0

Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.15:check

asked 2015-09-08 05:34:18 -0700

anonymous user

Anonymous

Hi,

While implementing HelloWorld RPC I am getting an error mentioned in subject field. I am following Application development tutorial of Opendaylight Summit 2015. I did the same what the Cisco guys did in the video and also i copied and paste the same code from the Lithium developer guide. I tested it on several VMs. But always get stuck on same error. Below you can see the maven version and error:

Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00) Maven home: /usr/local/apache-maven-3.2.5 Java version: 1.8.045, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-oracle/jre Default locale: enUS, platform encoding: ANSI_X3.4-1968 OS name: "linux", version: "3.16.0-38-generic", arch: "amd64", family: "unix"

INFO] --- maven-checkstyle-plugin:2.15:check (check-license) @ hello-impl --- [INFO] Starting audit... /home/odldev/git/hello/impl/src/main/java/org/opendaylight/hello/impl/HelloWorldImpl.java:1: Line does not match expected header line of '^/[]+$'. Audit done. [INFO] There is 1 error reported by Checkstyle 6.1.1 with check-license.xml ruleset. [ERROR] src/main/java/org/opendaylight/hello/impl/HelloWorldImpl.java[1] (header) RegexpHeader: Line does not match expected header line of '^/[]+$'. [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] hello-api .......................................... SUCCESS [ 29.467 s] [INFO] hello-impl ......................................... FAILURE [ 3.636 s] [INFO] hello-features ..................................... SKIPPED [INFO] hello-karaf ........................................ SKIPPED [INFO] hello-artifacts .................................... SKIPPED [INFO] hello-it ........................................... SKIPPED [INFO] hello .............................................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 44.687 s [INFO] Finished at: 2015-09-08T12:40:46+01:00 [INFO] Final Memory: 59M/142M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.15:check (check-license) on project hello-impl: You have 1 Checkstyle violation. -> [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.

edit retag flag offensive close merge delete

Comments

any one answer this problem.. even i am facing same issue

satlight ( 2016-01-19 00:56:11 -0700 )edit

2 answers

Sort by » oldest newest most voted
1

answered 2016-02-17 05:16:57 -0700

miguel2 gravatar image

updated 2016-02-19 00:52:17 -0700

I had the same problem. Copyright Header problem reported by Checkstyle

[ERROR] src/main/java/org/opendaylight/hello/impl/HelloWorldImpl.java[1] (header) RegexpHeader: Line does not match expected header line of '^/[]+$'.

You have a problem in this file.

HelloWorldImpl.java[1] (header).

You have changed Copyright Header. I fixed with:

/*
 * Copyright © 2015 Yoyodyne, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
edit flag offensive delete publish link more
0

answered 2017-02-02 14:50:37 -0700

Probably your HelloWorldImpl.java doesn't include the Copyright Header. Try to add one.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-09-08 05:34:18 -0700

Seen: 944 times

Last updated: Feb 02