2014-05-08 20 views
7

tworzę nową wtyczkę językowy dla sonarqube w Eclipse z projektu maven i stoi następujący błąd podczas budowania projektu:błąd wtyczki Sonar w projekcie Eclipse maven

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] 

Odpowiedz

-1

Sonar Server Instalacja:

Dodaj etapy:

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 

Instalacja 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. 

Na tym etapie pomyślnie podłączono Eclipse do skonfigurowanego wcześniej serwera Sonar.

Command: mvn sonar:sonar 

Dzięki.

6

Sam miałem ten problem podczas tworzenia wtyczki. Myślę, że używasz sonaru - archetypu wtyczki do tworzenia otoczenia. Jeśli to zrobisz, twój cały projekt jest objęty licencją GNU 3, a nagłówek w każdej klasie powinien tego powiedzieć. Predefiniowany plik pom.xml zawiera część, w której jest ona zdefiniowana. Wyszukaj "licencję" w swoim pliku pom.xml i usuń tę część.

Jeśli to nie rozwiązuje problemu, po prostu dodaj -Dlicense.skip=true do swojego maven goal.

Spodziewany jest jak nagłówek (proszę zauważyć, że pierwsze rzeczy są ustawiane podczas korzystania -sonar-archetyp)

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

Dla niecierpliwych osób takich jak ja działało tylko dodając '-Dlicense.skip = true' do' mvn install'. – frapen

0

Dodawanie -Dlicense.skip=true do bramki maven powinno pomóc.

W rzeczywistości to mi pomoże!

Powiązane problemy