001 /* 002 * SonarQube, open source software quality management tool. 003 * Copyright (C) 2008-2013 SonarSource 004 * mailto:contact AT sonarsource DOT com 005 * 006 * SonarQube is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 3 of the License, or (at your option) any later version. 010 * 011 * SonarQube is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public License 017 * along with this program; if not, write to the Free Software Foundation, 018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 019 */ 020 package org.sonar.api.batch.maven; 021 022 import org.sonar.api.BatchExtension; 023 import org.sonar.api.resources.Project; 024 025 import javax.annotation.Nonnull; 026 import javax.annotation.Nullable; 027 028 /** 029 * @since 1.10 030 */ 031 public interface MavenPluginHandler extends BatchExtension { 032 033 /** 034 * The plugin group id 035 * 036 * @return the group id 037 */ 038 @Nonnull 039 String getGroupId(); 040 041 /** 042 * The plugin artifact id 043 * 044 * @return artifact id 045 */ 046 @Nonnull 047 String getArtifactId(); 048 049 /** 050 * The fixed plugin version to execute 051 * 052 * @return the plugin version 053 */ 054 @Nullable 055 String getVersion(); 056 057 /** 058 * Indicates if the plugin version should be fixed or not, it means that if your pom defines another version 059 * than the one defined by getVersion(), this version will be used 060 * 061 * @return true if the version should be fixed 062 */ 063 boolean isFixedVersion(); 064 065 /** 066 * The maven goals to execute 067 * 068 * @return an array of goals 069 */ 070 @Nonnull 071 String[] getGoals(); 072 073 /** 074 * Configures the pom being executed, add or remove plugin properties. 075 * This method is automatically executed by Sonar. Plugins do NOT have to execute it. 076 */ 077 void configure(Project project, MavenPlugin plugin); 078 079 }