diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index e34959b..b91689a 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -103,4 +103,60 @@
             main.cleanup()
             main.exit()
 
+    def clean_install(self):
+        '''
+        Runs mvn clean install in the root of the ONOS directory. 
+        This will clean all ONOS artifacts then compile each module 
 
+        Returns: main.TRUE on success 
+        On Failure, exits the test
+        '''
+        try:
+            self.handle.sendline("mvn clean install")
+            while 1:
+                i=self.handle.expect([
+                    'There\sis\sinsufficient\smemory\sfor\sthe\sJava\s\
+                            Runtime\sEnvironment\sto\scontinue',
+                    'BUILD\sFAILURE',
+                    'BUILD\sSUCCESS',
+                    'ONOS\$',
+                    pexpect.TIMEOUT],timeout=600)
+                if i == 0:
+                    main.log.error(self.name + ":There is insufficient memory \
+                            for the Java Runtime Environment to continue.")
+                    #return main.FALSE
+                    main.cleanup()
+                    main.exit()
+                if i == 1:
+                    main.log.error(self.name + ": Build failure!")
+                    #return main.FALSE
+                    main.cleanup()
+                    main.exit()
+                elif i == 2:
+                    main.log.info(self.name + ": Build success!")
+                elif i == 3:
+                    main.log.info(self.name + ": Build complete")
+                    self.handle.expect("\$", timeout=60)
+                    return main.TRUE
+                elif i == 4:
+                    main.log.error(self.name + ": mvn clean install TIMEOUT!")
+                    #return main.FALSE
+                    main.cleanup()
+                    main.exit()
+                else:
+                    main.log.error(self.name + ": unexpected response from \
+                            mvn clean install")
+                    #return main.FALSE
+                    main.cleanup()
+                    main.exit()
+        except pexpect.EOF:
+            main.log.error(self.name + ": EOF exception found")
+            main.log.error(self.name + ":     " + self.handle.before)
+            main.cleanup()
+            main.exit()
+        except:
+            main.log.info(self.name + ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.error( traceback.print_exc() )
+            main.log.info(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.cleanup()
+            main.exit()
