AndroMDAppCleanMojo.java :  » UML » AndroMDA-3.2 » org » andromda » maven » plugin » andromdapp » Java Open Source

Java Open Source » UML » AndroMDA 3.2 
AndroMDA 3.2 » org » andromda » maven » plugin » andromdapp » AndroMDAppCleanMojo.java
package org.andromda.maven.plugin.andromdapp;

import org.andromda.andromdapp.AndroMDApp;
import org.apache.maven.plugin.MojoExecutionException;


/**
 * Removes the an AndroMDApp generated application structure.
 *
 * @author Chad Brandon
 * @goal clean-structure
 * @requiresProject false
 */
public class AndroMDAppCleanMojo
    extends AbstractAndroMDAppMojo
{
    /**
     * @see org.apache.maven.plugin.Mojo#execute()
     */
    public void execute()
        throws MojoExecutionException
    {
        try
        {
            final AndroMDApp andromdapp = new AndroMDApp();
            final String configuration = this.getConfigurationContents();
            if (configuration != null)
            {
                andromdapp.addConfiguration(this.getConfigurationContents());
            }
            andromdapp.clean();
        }
        catch (final Throwable throwable)
        {
            if (throwable instanceof MojoExecutionException)
            {
                throw (MojoExecutionException)throwable;
            }
            throw new MojoExecutionException("An error occurred while attempting to generate an application", throwable);
        }
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.