Package ci
Class MavenHandler
java.lang.Object
ci.MavenHandler
MavenHandler class responsible for compilation and test of repository.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCompiles the repo with command mvn compile.Gets the compilation log.static MavenHandlergetInstance(String dir) Ensures that the class only has one instance.Gets the test log.booleanrunTests()Tests the repo with command mvn test.
-
Method Details
-
getInstance
Ensures that the class only has one instance.- Parameters:
dir- the path of the files- Returns:
- an instance of the MavenHandler class
-
compileProgram
Compiles the repo with command mvn compile.- Returns:
- boolean if the compilation were successful or not
- Throws:
IOException- if the command input fails
-
runTests
Tests the repo with command mvn test.- Returns:
- boolean if the tests were successful or not
- Throws:
IOException- if the command input fails
-
getTestLog
Gets the test log.- Returns:
- testLog
-
getCompileLog
Gets the compilation log.- Returns:
- compileLog
-