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

com.lotaris.maven.plugin.glassfish.macro.UndedeployMacro Maven / Gradle / Ivy

package com.lotaris.maven.plugin.glassfish.macro;

import com.lotaris.maven.plugin.glassfish.model.Configuration;

import static com.lotaris.maven.plugin.glassfish.command.CommandFactory.*;

/**
 * Undeploy application macro take care of the requirements (like domain created and started)
 * 
 * @author Laurent Prevost, [email protected]
 */
public class UndedeployMacro extends AbstractMacro {
	/**
	 * Constructor
	 * 
	 * @param configuration The configuration
	 */
	public UndedeployMacro(Configuration configuration) {
		super(configuration);

		// Check if the domain does not exist
		if (!configuration.getDomain().exists()) {
			// Check if the domain is not started
			if (isLocalDomain() && !configuration.getDomain().isStarted()) {
				registerCommand(new MacroMacroCommand(new StartDomainMacro(configuration), "Starting domain."));
			}
		
			registerCommand(new MacroCommand(buildRedeployCommand(configuration), "Undeploying application + [" + configuration.getRedeployConfiguration().getName() + "]."));
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy