All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nuiton.jredmine.plugin.announcement.GenerateEmailAnnouncementMojo Maven / Gradle / Ivy

There is a newer version: 1.10
Show newest version
/*
 * #%L
 * JRedmine :: Maven plugin
 * 
 * $Id: GenerateEmailAnnouncementMojo.java 411 2013-08-08 12:31:31Z tchemit $
 * $HeadURL: https://svn.nuiton.org/jredmine/tags/jredmine-1.8.2/jredmine-maven-plugin/src/main/java/org/nuiton/jredmine/plugin/announcement/GenerateEmailAnnouncementMojo.java $
 * %%
 * Copyright (C) 2009 - 2012 Tony Chemit, CodeLutin
 * %%
 * 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 General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public 
 * License along with this program.  If not, see
 * .
 * #L%
 */
package org.nuiton.jredmine.plugin.announcement;

import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

/**
 * Generate the content of the release email announcement.
 *
 * @author tchemit 
 * @since 1.0.0
 */
@Mojo(name = "generate-email-announcement", requiresOnline = true, requiresProject = true)
public class GenerateEmailAnnouncementMojo extends AbstractAnnouncementMojo {

    ///////////////////////////////////////////////////////////////////////////
    /// Mojo parameters
    ///////////////////////////////////////////////////////////////////////////

    /**
     * The Velocity template used to format the release email announcement.
     *
     * @since 1.0.0
     */
    @Parameter(property = "redmine.emailAnnouncementTemplate", defaultValue = "release-email-announcement.vm", required = true)
    protected String emailAnnouncementTemplate = "release-email-announcement.vm";

    /**
     * A flag to skip the goal.
     *
     * @since 1.0.0
     */
    @Parameter(property = "changes.skipGenerateEmailAnnouncement", defaultValue = "false")
    protected boolean skipGenerateEmailAnnouncement;

    ///////////////////////////////////////////////////////////////////////////
    /// AbstractAnnouncementMojo
    ///////////////////////////////////////////////////////////////////////////

    @Override
    protected String getAnnouncementTemplate() {
        return emailAnnouncementTemplate;
    }

    ///////////////////////////////////////////////////////////////////////////
    /// SkipOrRunOnlyOnceAware
    ///////////////////////////////////////////////////////////////////////////

    @Override
    public String getSkipProperty() {
        return "skipGenerateEmailAnnouncement";
    }

    @Override
    public boolean isGoalSkip() {
        return skipGenerateEmailAnnouncement;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy