2014-05-08 12 views
7

Ich erstelle eine neue Sprache Plugin für Sonarqube in Eclipse mit Maven Projekt und folgenden Fehler auftritt, während das Projekt Aufbau:Sonar-Plugin Fehler in Eclipse Maven Projekt

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] 

Antwort

-1

Sonar Server-Installation:

Fügen Sie die einzelnen Schritte:

Download Sonar Setup File from http://www.sonarqube.org/downloads/ 
Extract the Zip file on your location. e.g. /home/<yourname>/sonar-version 

Running SonarQube Server: 

~/sonar-version/bin/{your_os} > ./sonar.sh start 

After the server is started you can check it on your browser using url localhost:9000 

Installation Sonar Eclipse-Plugin:

From your Eclipse search for Sonar in Eclipse Marketplace and install the plugin. 

In your Eclipse go to. 
    Windows > Preference > Sonar > Server 

Click Add and in Add Window the Sonar Server URL must be http://localhost:9000. Then you should get the Successfully Connected ! message. Click Finish. 
Close all the Eclipse pop up windows. 

In diesem Stadium haben Sie Ihren Eclipse erfolgreich mit dem Sonar-Server verbunden, den Sie zuvor eingerichtet haben.

Command: mvn sonar:sonar 

Danke.

6

Ich hatte dieses Problem selbst während der Entwicklung eines Plugins. Ich glaube, Sie haben das Sonar - Plugin-Archetyp verwendet, um Ihre Umgebung zu erstellen. Wenn Sie dies tun, ist Ihr gesamtes Projekt unter GNU 3-Lizenz und ein Header in jeder Klasse wird erwartet, dies zu sagen. Die vordefinierte pom.xml enthält einen Teil, in dem dies definiert ist. Suchen Sie in Ihrer pom.xml nach "license" und löschen Sie diesen Teil.

Wenn das Problem nicht behoben wird, fügen Sie einfach -Dlicense.skip=true zu Ihrem Maven Ziel hinzu.

Der erwartete Header ist wie (bitte beachten Sie, dass die ersten Dinge eingestellt werden, während Sie -sonar-Urbild verwenden)

/* 
* 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 
*/ 
+0

Für die ungeduldigen Leute wie mich funktionierte es nur das Hinzufügen von '-Dlice.skip = true' zu' mvn install'. – frapen

0

-Dlicense.skip=true zum Maven Ziel Hinzufügen sollte helfen.

In der Tat, es hilft mir!

Verwandte Themen