Class AbstractMavenCommand<RESULT>

java.lang.Object
org.ikasan.archetype.AbstractMavenCommand<RESULT>
All Implemented Interfaces:
MavenCommand<RESULT>
Direct Known Subclasses:
MavenArchetypeCommand, MavenGenericCommand

public class AbstractMavenCommand<RESULT> extends Object implements MavenCommand<RESULT>
Abstract class representing the base for a Maven Command.
Author:
Ikasan Development Team
  • Constructor Details

    • AbstractMavenCommand

      public AbstractMavenCommand(List<String> goals)
      Constructor
      Parameters:
      goals -
  • Method Details

    • getGoals

      public List<String> getGoals()
      Getter for goals.
      Returns:
    • setGoals

      public void setGoals(List<String> goals)
      Setter for goals.
      Parameters:
      goals -
    • isDebug

      public boolean isDebug()
      Getter for debug mode.
      Returns:
    • setDebug

      public void setDebug(boolean debug)
      Setter for debug mode.
      Specified by:
      setDebug in interface MavenCommand<RESULT>
      Parameters:
      debug -
    • isBatchMode

      public boolean isBatchMode()
      Setter for batch or interactive mode
      Returns:
    • setBatchMode

      public void setBatchMode(boolean batchMode)
      Getter for batch or interactive mode
      Specified by:
      setBatchMode in interface MavenCommand<RESULT>
      Parameters:
      batchMode -
    • getWorkingDir

      public File getWorkingDir()
      Getter for the working directory
      Returns:
    • setWorkingDir

      public void setWorkingDir(File workingDir)
      Setter for the working directory
      Specified by:
      setWorkingDir in interface MavenCommand<RESULT>
      Parameters:
      workingDir -
    • getCommandProperties

      public Properties getCommandProperties()
      Getter for returning the mvn configuration as command properties
      Returns:
    • execute

      public RESULT execute() throws org.apache.maven.shared.invoker.MavenInvocationException, org.apache.maven.shared.utils.cli.CommandLineException
      Description copied from interface: MavenCommand
      Execute the Maven command.
      Specified by:
      execute in interface MavenCommand<RESULT>
      Returns:
      Throws:
      org.apache.maven.shared.invoker.MavenInvocationException
      org.apache.maven.shared.utils.cli.CommandLineException