Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonar plugin error in eclipse maven project

I am creating a new language plugin for sonarqube in Eclipse with maven project and facing following error while building the project:

Failed to execute goal com.mycila.maven-license-plugin:maven-license-plugin:1.9.0:
check (enforce-license-headers) on project sonar-java-plugin:
Some files do not have the expected license header -> [Help 1]
like image 998
Vishnu Avatar asked May 08 '14 11:05

Vishnu


1 Answers

I had this problem by myself while developing a plugin. I think you were using the sonar--plugin-archetype to create your surrounding. If you do so your whole project is under GNU 3 license and a header within every class is expected telling this. The predefined pom.xml contains a part where this is defined. Search for "license" in your pom.xml and delete this part.

If this is not fixing you problem just add -Dlicense.skip=true to your maven goal.

The expected header is like (please notice that the first things are set while you use -sonar-archetype)

/*
 * MyLanguage Plugin
 * Copyright (C) MyYear MyCompany
 * [email protected]
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
 */
like image 101
Krummy Avatar answered Oct 05 '22 22:10

Krummy