net.officefloor.maven.StopWoofGoal Maven / Gradle / Ivy
/*
* OfficeFloor - http://www.officefloor.net
* Copyright (C) 2005-2013 Daniel Sagenschneider
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 net.officefloor.maven;
import net.officefloor.console.OfficeBuilding;
import net.officefloor.plugin.woof.WoofOfficeFloorSource;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
/**
* Maven goal to stop the {@link WoofOfficeFloorSource}.
*/
@Mojo(name = "stop", requiresDependencyResolution = ResolutionScope.COMPILE)
public class StopWoofGoal extends AbstractMojo {
/**
* Port that {@link OfficeBuilding} is running on.
*
* @parameter
*/
@Parameter
private Integer port;
/**
* Time to wait in stopping the {@link OfficeBuilding}.
*/
@Parameter
private Long waitTime;
/*
* ======================== Mojo ==========================
*/
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
// Create the stop goal
StopOfficeBuildingGoal goal = StopOfficeBuildingGoal
.createStopOfficeBuildingGoal(this.port, this.waitTime,
this.getLog());
// Stop WoOF
goal.execute();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy