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

org.bluestemsoftware.open.eoa.plugin.AbstractDeploymentMojo Maven / Gradle / Ivy

Go to download

Defines goals for building, testing and installing your alakai extension projects.

The newest version!
/**
 * Copyright 2008 Bluestem Software LLC.  All Rights Reserved.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 * 
 * 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 Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 * 
 */

package org.bluestemsoftware.open.eoa.plugin;

import java.io.File;
import java.util.List;

import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.installer.ArtifactInstaller;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.project.MavenProject;
import org.bluestemsoftware.open.eoa.plugin.surefire.cfg.Test;
import org.codehaus.plexus.logging.LogEnabled;
import org.codehaus.plexus.logging.Logger;

public abstract class AbstractDeploymentMojo extends AbstractMojo implements LogEnabled {
    
    /**
     * The directory for the generated EOA extension type File.
     * 
     * @parameter expression="${project.build.directory}"
     * @required
     */
    protected File buildDirectory;

    /**
     * The name of the EOA extension file to generate.
     * 
     * @parameter alias="eoaExtName" expression="${project.build.finalName}"
     * @required
     */
    protected String finalName;

    /**
     * The maven project.
     * 
     * @parameter expression="${project}"
     * @required
     * @readonly
     * @description "the maven project to use"
     */
    protected MavenProject project;

    /**
     * @parameter expression="${component.org.apache.maven.artifact.installer.ArtifactInstaller}"
     * @required
     * @readonly
     */
    protected ArtifactInstaller installer;

    /**
     * Set this to 'true' to bypass tests entirely. Its use is NOT RECOMMENDED, but quite
     * convenient on occasion.
     * 
     * @parameter expression="${maven.test.skip}"
     */
    protected boolean skip;

    /**
     * The base directory of the project being tested.
     * 
     * @parameter expression="${basedir}"
     * @required
     */
    protected File basedir;

    /**
     * Creates the artifact
     * 
     * @component
     */
    protected ArtifactFactory artifactFactory;

    /**
     * The plugin remote repositories declared in the pom.
     * 
     * @parameter expression="${project.pluginArtifactRepositories}"
     */
    protected List remoteRepositories;

    /**
     * Resolves the artifacts needed.
     * 
     * @component
     */
    protected ArtifactResolver artifactResolver;

    /**
     * The localRepository. To obtain the directory of localRepository in unit tests use
     * System.setProperty( "localRepository").
     * 
     * @parameter expression="${localRepository}"
     * @required
     * @readonly
     */
    protected ArtifactRepository localRepository;

    /**
     * Test related configuration which may be used to configure test compilation and/or
     * execution.
     * 
     * @parameter
     */
    protected Test test;
    
    protected Logger logger;
    
    /**
     * @see org.codehaus.plexus.logging.LogEnabled#enableLogging(org.codehaus.plexus.logging.Logger)
     */
    public void enableLogging(Logger logger) {
        this.logger = logger;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy