private String localFilePath ( File downloadDirectory ) throws MojoFailureException { if ( downloadDirectory . exists ( ) ) { if ( downloadDirectory . isDirectory ( ) ) { return downloadDirectory . getAbsolutePath ( ) ; } else { throw new MojoFailureException ( "'" + downloadDirectory . getAbsolutePath ( ) + "' is not a directory!" ) ; } } if ( downloadDirectory . mkdirs ( ) ) { return downloadDirectory . getAbsolutePath ( ) ; } else { throw new MojoFailureException ( "Unable to create download directory!" ) ; } }
Set the location directory where files will be downloaded to