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

com.kamomileware.maven.plugin.opencms.UndeployModuleMojo Maven / Gradle / Ivy

The newest version!
package com.kamomileware.maven.plugin.opencms;

import java.io.File;
import java.io.IOException;

import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;

import com.kamomileware.maven.plugin.opencms.util.OpenCmsScriptUtils;

/**
 * Generates and execute a script for deleting the module indicate by property
 * manifest.module.name. If no property as this exist searches for
 * the manifest properties descriptor in the working dir.
 * 
 * @author jagarcia
 */
@Mojo(name="undeploy", requiresProject=true)
public class UndeployModuleMojo extends ModuleBaseMojo {

	@Override
	protected void prepareExecution() throws MojoExecutionException {
		// Copy the module to the install directory
		OpenCmsScriptUtils.copyFileToModulesDir(getOpenCmsWebInfDir(), moduleFile);
	}

	protected File getScriptToExecute() throws IOException {
		return OpenCmsScriptUtils.buildUninstallScript(moduleName, openCmsUserName, openCmsUserPass);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy