protected final File createDirectoryArtifact ( final File outputDirectory , final String artifact ) { // Construct artifact path based on output directory String path = asPath ( outputDirectory . getAbsolutePath ( ) , artifact ) ; final File ret = new File ( path ) ; if ( ! ret . isDirectory ( ) ) { // Fail if the directory artifact couldn't be created if ( ! ret . mkdir ( ) ) { error ( DIRECTORY_CREATION_FAILED + ret ) ; bail ( ExitCode . BAD_OUTPUT_DIRECTORY ) ; } } return ret ; }
Creates the directory artifact failing if the directory couldn t be created .