ch.hortis.sonar.mvn.reports.ChangeLogHandler Maven / Gradle / Ivy
/*
* This program is copyright (c) 2007 Hortis-GRC SA.
*
* This file is part of Sonar.
* Sonar is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Sonar 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package ch.hortis.sonar.mvn.reports;
import ch.hortis.sonar.mvn.PrepareMojo;
import org.apache.maven.model.Plugin;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import java.util.Arrays;
import java.util.List;
public class ChangeLogHandler extends ReportHandler {
public void configurePlugin(MavenProject pom, Plugin plugin) {
unsetConfigParameter( plugin, "outputXML" );
setConfigParameter( plugin, "range", "1" );
}
public boolean execute(PrepareMojo mojo, Log log) {
return mojo.getExecutedProject().getScm() != null &&
mojo.getExecutedProject().getScm().getConnection() != null &&
mojo.getExecutedProject().getScm().getConnection().length() > 0;
}
public List getGoals() {
return Arrays.asList( new String[]{"changelog"} );
}
public boolean mustFailOnError() {
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy