@ Override public void execute ( ) throws BuildException { populateSettings ( ) ; try ( Engine engine = new Engine ( Update . class . getClassLoader ( ) , getSettings ( ) ) ) { try { engine . doUpdates ( ) ; } catch ( UpdateException ex ) { if ( this . isFailOnError ( ) ) { throw new BuildException ( ex ) ; } log ( ex . getMessage ( ) , Project . MSG_ERR ) ; } } catch ( DatabaseException ex ) { final String msg = "Unable to connect to the dependency-check database; unable to update the NVD data" ; if ( this . isFailOnError ( ) ) { throw new BuildException ( msg , ex ) ; } log ( msg , Project . MSG_ERR ) ; } finally { getSettings ( ) . cleanup ( ) ; } }
Executes the update by initializing the settings downloads the NVD XML data and then processes the data storing it in the local database .