我自己在开发插件时遇到了这个问题。我认为您正在使用 sonar--plugin-archetype 来创建您的环境。如果您这样做,您的整个项目都在 GNU 3 许可下,并且每个类中的标题都应该说明这一点。预定义的 pom.xml 包含定义 this 的部分。在你的 pom.xml 中搜索“license”并删除这部分。
如果这不能解决您的问题,只需添加-Dlicense.skip=true
到您的 Maven 目标。
预期的标题是这样的(请注意,在您使用 -sonar-archetype 时设置了第一件事)
/*
* MyLanguage Plugin
* Copyright (C) MyYear MyCompany
* dev@sonar.codehaus.org
*
* 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
*/