1   package com.atlassian.maven.plugins.amps;
2   
3   import org.apache.maven.plugin.MojoExecutionException;
4   import org.apache.maven.plugin.MojoFailureException;
5   import org.jfrog.maven.annomojo.annotations.MojoGoal;
6   import java.util.List;
7   
8   /**
9    * Stop the webapps started by RunMojo.
10   * This may be useful when you use -Dwait=false for the RunMojo and you want
11   * the products to make a clean shutdown.
12   */
13  @MojoGoal ("stop")
14  public class StopMojo extends RunMojo
15  {
16      protected void doExecute() throws MojoExecutionException, MojoFailureException
17      {
18          final List<ProductExecution> productExecutions = getProductExecutions();
19          setParallelMode(productExecutions);
20          stopProducts(productExecutions);
21      }
22  
23  }