Package ci

Class MavenHandler

java.lang.Object
ci.MavenHandler

public class MavenHandler extends Object
MavenHandler class responsible for compilation and test of repository.
  • Method Details

    • getInstance

      public static MavenHandler getInstance(String dir)
      Ensures that the class only has one instance.
      Parameters:
      dir - the path of the files
      Returns:
      an instance of the MavenHandler class
    • compileProgram

      public boolean compileProgram() throws IOException
      Compiles the repo with command mvn compile.
      Returns:
      boolean if the compilation were successful or not
      Throws:
      IOException - if the command input fails
    • runTests

      public boolean runTests() throws IOException
      Tests the repo with command mvn test.
      Returns:
      boolean if the tests were successful or not
      Throws:
      IOException - if the command input fails
    • getTestLog

      public String getTestLog()
      Gets the test log.
      Returns:
      testLog
    • getCompileLog

      public String getCompileLog()
      Gets the compilation log.
      Returns:
      compileLog