com.lotaris.maven.plugin.glassfish.macro.DeployMacro Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lotaris-glassfish-maven-plugin Show documentation
Show all versions of lotaris-glassfish-maven-plugin Show documentation
Glassfish Asadmin maven plugin with full arguments supported through XML pom configuration.
package com.lotaris.maven.plugin.glassfish.macro;
import com.lotaris.maven.plugin.glassfish.model.Configuration;
import static com.lotaris.maven.plugin.glassfish.command.CommandFactory.*;
/**
* Deploy application macro take care of the requirements (like domain created and started)
*
* @author Laurent Prevost, [email protected]
*/
public class DeployMacro extends AbstractMacro {
/**
* Constructor
*
* @param configuration The configuration
*/
public DeployMacro(Configuration configuration) {
super(configuration);
// Take care of the domain operations if and only if the host is a local address
if (isLocalDomain()) {
// Check if the domain does not exist
if (!configuration.getDomain().exists()) {
registerCommand(new MacroMacroCommand(new CreateDomainMacro(configuration), "Creating domain."));
}
// Check if the domain is not started
else if (!configuration.getDomain().isStarted()) {
registerCommand(new MacroMacroCommand(new StartDomainMacro(configuration), "Starting domain."));
}
}
registerCommand(new MacroCommand(buildDeployCommand(configuration), "Deploying application [" + configuration.getDeployConfiguration().getName() + "]."));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy