001 /*
002 * Sonar, open source software quality management tool.
003 * Copyright (C) 2008-2012 SonarSource
004 * mailto:contact AT sonarsource DOT com
005 *
006 * Sonar 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 * Sonar 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
017 * License along with Sonar; if not, write to the Free Software
018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
019 */
020 package org.sonar.api.batch.maven;
021
022 import org.sonar.api.BatchExtension;
023 import org.sonar.api.resources.Project;
024
025 /**
026 * @since 1.10
027 */
028 public interface MavenPluginHandler extends BatchExtension {
029
030 /**
031 * The plugin group id
032 *
033 * @return the group id
034 */
035 String getGroupId();
036
037 /**
038 * The plugin artifact id
039 *
040 * @return artifact id
041 */
042 String getArtifactId();
043
044 /**
045 * The fixed plugin version to execute
046 *
047 * @return the plugin version
048 */
049 String getVersion();
050
051 /**
052 * Indicates if the plugin version should be fixed or not, it means that if your pom defines another version
053 * than the one defined by getVersion(), this version will be used
054 *
055 * @return true if the version should be fixed
056 */
057 boolean isFixedVersion();
058
059 /**
060 * The maven goals to execute
061 *
062 * @return an array of goals
063 */
064 String[] getGoals();
065
066 /**
067 * Configures the pom being executed, add or remove plugin properties.
068 * This method is automatically executed by Sonar. Plugins do NOT have to execute it.
069 */
070 void configure(Project project, MavenPlugin plugin);
071
072 }